Update LiteLLM models - #288
Conversation
WalkthroughAdds a new procedural doc for updating LiteLLM provider model IDs and updates the LiteLLM config with multiple provider model replacements and fallback adjustments (Anthropic Claude variants, OpenRouter/OpenAI gpt-4.1 changes, llama/deepseek replacements, and minor restructuring). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/commands/update-litellm-models.md:
- Around line 48-50: The command currently writes to a machine-specific absolute
path (/mnt/local/storage/repos/infra/docker/ai/litellm/config/config.yaml);
change it to a repo-relative path (for example
infra/docker/ai/litellm/config/config.yaml or prefixed with $(git rev-parse
--show-toplevel)/infra/... or an environment variable like $REPO_ROOT) so the
tee invocation is portable across machines; update the tee target in the heredoc
invocation accordingly (replace the absolute path with the chosen repo-relative
or env-based path while keeping the heredoc content and EOF markers unchanged).
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.claude/commands/update-litellm-models.mddocker/ai/litellm/config/config.yaml
64afd4d to
36a6833
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.claude/commands/update-litellm-models.md (1)
55-60: Verification step may show stale config if container isn't restarted.Step 4 reads from the container's
/app/config.yaml, but after updating the source file on disk, the container may still have the old config mounted or cached. Consider adding a restart step or verifying the source file directly:Suggested enhancement
## Step 4: Verify Confirm the file was written correctly: ```bash -docker exec litellm cat /app/config.yaml +cat "$(git rev-parse --show-toplevel)/docker/ai/litellm/config/config.yaml" +``` + +Restart the container to apply changes: +```bash +docker restart litellm</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In @.claude/commands/update-litellm-models.md around lines 55 - 60, Update "Step
4: Verify" to avoid showing a stale in-container config: replace the direct
in-container cat command ("docker exec litellm cat /app/config.yaml") with a
verification of the host source file (the repo config path determined via git
root) and add a step to restart the container (docker restart litellm) so the
container picks up the updated config; ensure the doc shows verifying the host
config file first, then restarting the container, then (optionally) re-checking
the in-container /app/config.yaml.</details> </blockquote></details> <details> <summary>docker/ai/litellm/config/config.yaml (1)</summary><blockquote> `23-36`: **Anthropic model updates look structurally correct.** The claude-sonnet-4-6 and claude-opus-4-6 models are configured consistently. However, there's a naming mismatch for claude-haiku: the `model_name` is `claude-haiku-4-5` (alias) but the litellm model is `anthropic/claude-haiku-4-5-20251001` (full version ID). Consider aligning these for consistency. <details> <summary>Optional: Align model_name with the dated model ID</summary> ```diff - - model_name: claude-haiku-4-5 + - model_name: claude-haiku-4-5-20251001 litellm_params: model: anthropic/claude-haiku-4-5-20251001🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docker/ai/litellm/config/config.yaml` around lines 23 - 36, The claude-haiku entry has a naming mismatch: model_name is "claude-haiku-4-5" while litellm_params.model is "anthropic/claude-haiku-4-5-20251001"; update one to match the other for consistency (either change model_name to "claude-haiku-4-5-20251001" or set litellm_params.model to "anthropic/claude-haiku-4-5") so that the alias (model_name) and the actual model identifier in litellm_params align; locate the claude-haiku-4-5 block in the YAML and make the corresponding edit to model_name or litellm_params.model.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.claude/commands/update-litellm-models.md:
- Around line 55-60: Update "Step 4: Verify" to avoid showing a stale
in-container config: replace the direct in-container cat command ("docker exec
litellm cat /app/config.yaml") with a verification of the host source file (the
repo config path determined via git root) and add a step to restart the
container (docker restart litellm) so the container picks up the updated config;
ensure the doc shows verifying the host config file first, then restarting the
container, then (optionally) re-checking the in-container /app/config.yaml.
In `@docker/ai/litellm/config/config.yaml`:
- Around line 23-36: The claude-haiku entry has a naming mismatch: model_name is
"claude-haiku-4-5" while litellm_params.model is
"anthropic/claude-haiku-4-5-20251001"; update one to match the other for
consistency (either change model_name to "claude-haiku-4-5-20251001" or set
litellm_params.model to "anthropic/claude-haiku-4-5") so that the alias
(model_name) and the actual model identifier in litellm_params align; locate the
claude-haiku-4-5 block in the YAML and make the corresponding edit to model_name
or litellm_params.model.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.claude/commands/update-litellm-models.mddocker/ai/litellm/config/config.yaml
Summary by CodeRabbit
Documentation
Updates