-
Notifications
You must be signed in to change notification settings - Fork 0
Update LiteLLM model configurations and Ollama pull script to use latest model versions #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,16 +2,18 @@ | |
| description: Update LiteLLM config/config.yaml to use the latest model versions from each provider | ||
| --- | ||
|
|
||
| Update the LiteLLM model configuration to use the latest available model IDs, removing outdated versions. | ||
| Update the LiteLLM model configuration to use the latest available model IDs, removing outdated versions. Also update the Ollama pull script and sync LiteLLM's local Ollama entries. | ||
|
|
||
| ## Config file location | ||
| ## Config file locations | ||
|
|
||
| Read the current config via: | ||
| Read the current LiteLLM config via: | ||
| ```bash | ||
| docker exec litellm cat /app/config.yaml | ||
| ``` | ||
|
|
||
| The source file is at `docker/ai/litellm/config/config.yaml`. | ||
| Source files: | ||
| - `docker/ai/litellm/config/config.yaml` — LiteLLM model list | ||
| - `scripts/get-offline-data-ollama.sh` — Ollama model pull script | ||
|
|
||
| ## Step 1: Look up latest models per provider (run searches in parallel) | ||
|
|
||
|
|
@@ -23,38 +25,66 @@ Search the web for the current model IDs for each provider present in the config | |
| - **OpenRouter (Meta Llama)**: Search "Meta Llama latest models openrouter model IDs" | ||
| - **OpenRouter (DeepSeek)**: Search "DeepSeek latest models openrouter model IDs" | ||
| - **OpenRouter (xAI Grok)**: Search "xAI Grok latest models openrouter model IDs" | ||
| - **Ollama local (≤3B)**: Search "best 3B LLM model Ollama <year> benchmark" → check https://ollama.com/library | ||
| - **Ollama local (≤8B)**: Search "best 8B LLM model Ollama <year> benchmark" → check https://ollama.com/library | ||
|
|
||
| For each provider, identify: | ||
| 1. The **latest stable** model ID (not preview/experimental unless that's the only option) | ||
| 2. Whether the currently configured model has been **superseded** by a newer release | ||
| 3. The **exact API model ID string** to use in LiteLLM params | ||
|
|
||
| For Ollama local models, pick the **best-performing model** in each size class based on current benchmarks (HumanEval, MMLU, etc.), not just the newest release date. | ||
|
|
||
| ## Step 2: Determine what to change | ||
|
|
||
| ### LiteLLM cloud models | ||
|
|
||
| For each model in the config, decide: | ||
| - **Update**: A newer stable version exists → update the `model_name` key and `litellm_params.model` value | ||
| - **Keep**: Still the latest stable model → no change needed | ||
| - **Remove**: Superseded by a newer model already listed in the same config (avoid duplicates) | ||
|
|
||
| Preserve without changes: | ||
| - Local Ollama models (`ollama_chat/...`) — these are managed separately | ||
| - The overall YAML structure, comments, and provider groupings | ||
| - `api_key` and `api_base` references | ||
|
|
||
| ## Step 3: Update the file | ||
| ### Ollama local models (`scripts/get-offline-data-ollama.sh`) | ||
|
|
||
| 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 | ||
|
|
||
| Update both the pull tags and the inline comments with model size. | ||
|
|
||
| ### LiteLLM Ollama entries sync | ||
|
|
||
| After updating `get-offline-data-ollama.sh`, update the `ollama-local-*` entries in `config.yaml` to match: | ||
| - `ollama_chat/<model>` must reflect the exact tag used in the pull script | ||
| - Update the comment line above each entry (e.g. `# Local model - Phi 4 Mini (3.8B)`) | ||
| - Do **not** change `api_base` or `api_key` references | ||
|
|
||
| Write the updated config using: | ||
| ## Step 3: Update the files | ||
|
|
||
| Write the updated LiteLLM config using: | ||
| ```bash | ||
| tee "$(git rev-parse --show-toplevel)/docker/ai/litellm/config/config.yaml" > /dev/null << 'EOF' | ||
| <updated content> | ||
| EOF | ||
| ``` | ||
|
|
||
| Also update `router_settings.fallbacks` to reflect any renamed models. | ||
| Write the updated Ollama script using: | ||
| ```bash | ||
| tee "$(git rev-parse --show-toplevel)/scripts/get-offline-data-ollama.sh" > /dev/null << 'EOF' | ||
| <updated content> | ||
| EOF | ||
| ``` | ||
|
|
||
| Also update `router_settings.fallbacks` in `config.yaml` to reflect any renamed models. | ||
|
|
||
| ## Step 4: Verify | ||
|
|
||
| Confirm the file was written correctly: | ||
| Confirm the LiteLLM config was written correctly: | ||
| ```bash | ||
| docker exec litellm cat /app/config.yaml | ||
| ``` | ||
|
Comment on lines
85
to
90
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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: 🤖 Prompt for AI Agents |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,8 @@ ollama_pull() { | |
| } | ||
|
|
||
| # Large Language Models - https://ollama.com/search | ||
| ollama_pull llama3.2:latest | ||
| ollama_pull qwen2.5-coder:7b | ||
| 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 | ||
|
Comment on lines
+23
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sync the new 8B pull target with LiteLLM model routing.
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 |
||
|
|
||
| # Embedding Models - https://ollama.com/search?c=embedding | ||
| ollama_pull nomic-embed-text | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
📝 Committable suggestion
🤖 Prompt for AI Agents