Skip to content

fix(llm-config): remove empty fallback blocks from override template - #207

Merged
KYN4 merged 1 commit into
mainfrom
fix/llm-override-template-empty-fallback
Jun 24, 2026
Merged

fix(llm-config): remove empty fallback blocks from override template#207
KYN4 merged 1 commit into
mainfrom
fix/llm-override-template-empty-fallback

Conversation

@plfavreau

Copy link
Copy Markdown
Collaborator

Problem

A user on Discord configured a local LLM via llm-config.override.jsonc but 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:

except ValidationError as e:
    logger.error(f"Invalid llm config: {e}. Falling back to default config")
    return get_default_llm_config()

The override template ships cortex and video_analyzer with an empty fallback block ({ "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

  • Remove the empty fallback blocks from cortex and video_analyzer in the template
  • Document fallback as optional, with a valid commented example on cortex
  • Add a warning that an empty fallback is invalid and will be rejected
  • Fix filename typo in the header comment (llm.override.jsonc -> llm-config.override.jsonc)

Follow-up (not in this PR)

Consider making parse_llm_config fail loudly or merge per-field instead of silently discarding the whole override on a single invalid field.

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)
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@plfavreau, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dd95dba5-4a8d-4c97-88ec-a9a58abbb1ff

📥 Commits

Reviewing files that changed from the base of the PR and between 7f8346b and 72f6f87.

📒 Files selected for processing (1)
  • llm-config.override.template.jsonc

Comment @coderabbitai help to get the list of available commands.

@plfavreau
plfavreau marked this pull request as ready for review June 23, 2026 14:50
@plfavreau plfavreau self-assigned this Jun 23, 2026

@KYN4 KYN4 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KYN4
KYN4 merged commit 47cce16 into main Jun 24, 2026
5 of 6 checks passed
@KYN4
KYN4 deleted the fix/llm-override-template-empty-fallback branch June 24, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants