Skip to content

Update LiteLLM model configurations and Ollama pull script to use latest model versions - #312

Merged
bubacoder merged 1 commit into
mainfrom
feature/models
Apr 12, 2026
Merged

Update LiteLLM model configurations and Ollama pull script to use latest model versions#312
bubacoder merged 1 commit into
mainfrom
feature/models

Conversation

@bubacoder

@bubacoder bubacoder commented Apr 12, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

Release Notes

  • New Features

    • Added GLM-5.1 model availability through OpenRouter
  • Updates

    • Updated OpenAI models to GPT-5.4 and GPT-5.4-mini versions
    • Upgraded OpenRouter Grok model to version 4.1-fast
    • Refreshed offline local models with Phi-4 mini and Qwen 3 (8B)

@coderabbitai

coderabbitai Bot commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation and configuration updates to LiteLLM model management: expanded update procedures to include Ollama script synchronization, replaced model identifiers for OpenAI/OpenRouter models, added GLM-5.1 entry, replaced local Ollama models in configuration and pull script, and updated fallback references.

Changes

Cohort / File(s) Summary
Update Documentation
.claude/commands/update-litellm-models.md
Expanded documentation to include Ollama script (scripts/get-offline-data-ollama.sh) synchronization alongside LiteLLM config updates. Added discovery targets for local Ollama models (≤3B, ≤8B) with benchmarks-based selection criteria and explicit preservation rules for model consistency.
LiteLLM Configuration
docker/ai/litellm/config/config.yaml
Updated OpenAI model identifiers (gpt-5gpt-5.4, gpt-5-minigpt-5.4-mini), replaced OpenRouter Grok model (grok-code-fast-1grok-4.1-fast), added new GLM-5.1 model entry, replaced Ollama local phi backing (phi3.5:3.8bphi4-mini), and synced router fallback references.
Ollama Pull Script
scripts/get-offline-data-ollama.sh
Replaced offline models: removed llama3.2:latest and qwen2.5-coder:7b, added phi4-mini and qwen3:8b with inline size/benchmark descriptions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating LiteLLM model configurations and the Ollama pull script to use latest/newer model versions, which directly corresponds to the core modifications across all three files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/models

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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 53-56: The rule "One model ≤3B" conflicts with the example
"phi4-mini" (which is 3.8B); update the wording so the size-class and the
example match: either change the size bound to "≤4B" (and keep phi4-mini) or
replace the example with an actual ≤3B model; adjust the line that currently
reads "One model ≤3B — best benchmark performer in this size class (e.g.
`phi4-mini`)" accordingly and ensure other examples like `qwen3:8b` remain
consistent.
- Around line 85-90: Update the "Step 4: Verify" section to add lint checks in
addition to the container readback: run ShellCheck against the updated script
scripts/get-offline-data-ollama.sh and run YAML lint/validation against
docker/ai/litellm/config/config.yaml (or the config file referenced in the doc)
so verification includes shellcheck and yamllint as required by the repo
pre-commit rules; mention both commands in the verification step and ensure
paths point to the repository root as in the suggested snippet.

In `@scripts/get-offline-data-ollama.sh`:
- Around line 23-24: The 8B model pulled in scripts/get-offline-data-ollama.sh
(qwen3:8b) is not used because the LiteLLM routing still maps the 8B slot to
ollama_chat/mistral:7b-instruct (model_name: ollama-mac-mistral); update the
LiteLLM config to route the 8B slot to qwen3:8b (or rename the pull to match the
configured model) by changing the 8B model mapping that references model_name:
ollama-mac-mistral to point to qwen3:8b (or adjust the pull target to match the
existing model_name) so the pulled model and the routing are consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ecba4e4e-1301-475c-9dc9-1d5e9b211750

📥 Commits

Reviewing files that changed from the base of the PR and between 48d49ad and 5764ca8.

📒 Files selected for processing (3)
  • .claude/commands/update-litellm-models.md
  • docker/ai/litellm/config/config.yaml
  • scripts/get-offline-data-ollama.sh

Comment on lines +53 to +56
The script must always include exactly:
- **One model ≤3B** — best benchmark performer in this size class (e.g. `phi4-mini`)
- **One model ≤8B** — best benchmark performer in this size class (e.g. `qwen3:8b`)
- **Embedding models** — keep as-is unless a clearly better alternative exists

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix the size-class contradiction in the update rule.

The rule says “≤3B” but the included example (phi4-mini) is 3.8B. This is internally inconsistent and will cause drift between docs and implementation.

Suggested wording fix
-- **One model ≤3B** — best benchmark performer in this size class (e.g. `phi4-mini`)
+- **One model <4B** — best benchmark performer in this size class (e.g. `phi4-mini`)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The script must always include exactly:
- **One model ≤3B** — best benchmark performer in this size class (e.g. `phi4-mini`)
- **One model ≤8B** — best benchmark performer in this size class (e.g. `qwen3:8b`)
- **Embedding models** — keep as-is unless a clearly better alternative exists
The script must always include exactly:
- **One model <4B** — best benchmark performer in this size class (e.g. `phi4-mini`)
- **One model ≤8B** — best benchmark performer in this size class (e.g. `qwen3:8b`)
- **Embedding models** — keep as-is unless a clearly better alternative exists
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/commands/update-litellm-models.md around lines 53 - 56, The rule
"One model ≤3B" conflicts with the example "phi4-mini" (which is 3.8B); update
the wording so the size-class and the example match: either change the size
bound to "≤4B" (and keep phi4-mini) or replace the example with an actual ≤3B
model; adjust the line that currently reads "One model ≤3B — best benchmark
performer in this size class (e.g. `phi4-mini`)" accordingly and ensure other
examples like `qwen3:8b` remain consistent.

Comment on lines 85 to 90
## Step 4: Verify

Confirm the file was written correctly:
Confirm the LiteLLM config was written correctly:
```bash
docker exec litellm cat /app/config.yaml
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add required lint checks to the verification step.

Verification should include ShellCheck for the updated script and YAML lint/validation for config changes, not only container readback.

Suggested verification additions
 ## Step 4: Verify

 Confirm the LiteLLM config was written correctly:
 ```bash
 docker exec litellm cat /app/config.yaml

+Run required lint checks:
+bash +shellcheck "$(git rev-parse --show-toplevel)/scripts/get-offline-data-ollama.sh" +yamllint "$(git rev-parse --show-toplevel)/docker/ai/litellm/config/config.yaml" +

</details>

As per coding guidelines `**/*.sh`: "Shell scripts must pass ShellCheck validation as part of pre-commit checks" and `**/*.{yaml,yml}`: "YAML files must pass linting and validation as part of pre-commit checks".

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
## Step 4: Verify

Confirm the LiteLLM config was written correctly:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/commands/update-litellm-models.md around lines 85 - 90, Update the
"Step 4: Verify" section to add lint checks in addition to the container
readback: run ShellCheck against the updated script
scripts/get-offline-data-ollama.sh and run YAML lint/validation against
docker/ai/litellm/config/config.yaml (or the config file referenced in the doc)
so verification includes shellcheck and yamllint as required by the repo
pre-commit rules; mention both commands in the verification step and ensure
paths point to the repository root as in the suggested snippet.

Comment on lines +23 to +24
ollama_pull phi4-mini # 3.8B - best-in-class sub-4B; 128K ctx
ollama_pull qwen3:8b # 8B - best-in-class 7-8B; hybrid thinking, top HumanEval

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Sync the new 8B pull target with LiteLLM model routing.

qwen3:8b is pulled here, but LiteLLM config still routes the 8B slot to ollama_chat/mistral:7b-instruct (model_name: ollama-mac-mistral). That leaves the new pull target unused and the configured 8B route stale.

Suggested sync update (config side)
-  # Local model - Mistral 7b
-  - model_name: ollama-mac-mistral
+  # Local model - Qwen3 (8B)
+  - model_name: ollama-local-qwen
     litellm_params:
-      model: ollama_chat/mistral:7b-instruct
+      model: ollama_chat/qwen3:8b
       api_base: "os.environ/REMOTE_OLLAMA_API_BASE"
       api_key: "none"

 router_settings:
   fallbacks:
-    - ollama-mac-mistral:
+    - ollama-local-qwen:
         - ollama-local-phi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/get-offline-data-ollama.sh` around lines 23 - 24, The 8B model pulled
in scripts/get-offline-data-ollama.sh (qwen3:8b) is not used because the LiteLLM
routing still maps the 8B slot to ollama_chat/mistral:7b-instruct (model_name:
ollama-mac-mistral); update the LiteLLM config to route the 8B slot to qwen3:8b
(or rename the pull to match the configured model) by changing the 8B model
mapping that references model_name: ollama-mac-mistral to point to qwen3:8b (or
adjust the pull target to match the existing model_name) so the pulled model and
the routing are consistent.

@bubacoder
bubacoder merged commit c8c0b7a into main Apr 12, 2026
4 checks passed
@bubacoder
bubacoder deleted the feature/models branch April 12, 2026 21:38
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.

1 participant