fix(llm-config): remove empty fallback blocks from override template - #207
Conversation
An empty fallback ({ "provider": "", "model": "" }) fails LLMConfig
validation, which causes parse_llm_config to silently discard the entire
user override and fall back to defaults. Users copying the template and
filling only the top-level provider/model hit this and saw defaults load.
- Remove empty fallback blocks from cortex and video_analyzer
- Document fallback as optional, with a valid commented example on cortex
- Warn that an empty fallback is invalid and will be rejected
- Fix filename typo in header comment (llm.override.jsonc -> llm-config.override.jsonc)
|
Warning Review limit reached
More reviews will be available in 19 minutes and 50 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
Problem
A user on Discord configured a local LLM via
llm-config.override.jsoncbut mobile-use kept loading the default models (gpt-5-nano/gpt-5).Root cause:
parse_llm_config()deep-merges the override then validates it. If validation throws, it catches the error and silently discards the entire override, falling back to defaults:The override template ships
cortexandvideo_analyzerwith an emptyfallbackblock ({ "provider": "", "model": "" }). Copying the template and filling only the top-level provider/model leaves that empty fallback in place —""is not a valid provider literal, so the whole override is dropped.Reproduced against a local Ollama, then confirmed the fix loads the override correctly.
Changes
fallbackblocks fromcortexandvideo_analyzerin the templatefallbackas optional, with a valid commented example oncortexllm.override.jsonc->llm-config.override.jsonc)Follow-up (not in this PR)
Consider making
parse_llm_configfail loudly or merge per-field instead of silently discarding the whole override on a single invalid field.