From 36a6833d4bda541e32812548f2003c511b132f69 Mon Sep 17 00:00:00 2001 From: Buba Date: Fri, 27 Feb 2026 21:14:19 +0000 Subject: [PATCH] Update LiteLLM models --- .claude/commands/update-litellm-models.md | 80 +++++++++++++++++++++++ docker/ai/litellm/config/config.yaml | 43 ++++++------ 2 files changed, 99 insertions(+), 24 deletions(-) create mode 100644 .claude/commands/update-litellm-models.md diff --git a/.claude/commands/update-litellm-models.md b/.claude/commands/update-litellm-models.md new file mode 100644 index 00000000..d41a975c --- /dev/null +++ b/.claude/commands/update-litellm-models.md @@ -0,0 +1,80 @@ +--- +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. + +## Config file location + +Read the current config via: +```bash +docker exec litellm cat /app/config.yaml +``` + +The source file is at `docker/ai/litellm/config/config.yaml`. + +## Step 1: Look up latest models per provider (run searches in parallel) + +Search the web for the current model IDs for each provider present in the config: + +- **Anthropic**: Search "Anthropic Claude latest models API model IDs" → check https://docs.anthropic.com/en/docs/about-claude/models/overview +- **OpenAI**: Search "OpenAI latest models API model IDs" → check https://platform.openai.com/docs/models +- **Google Gemini**: Search "Google Gemini latest models API model IDs" → check https://ai.google.dev/gemini-api/docs/models +- **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" + +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 + +## Step 2: Determine what to change + +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 + +Write the updated config using: +```bash +tee "$(git rev-parse --show-toplevel)/docker/ai/litellm/config/config.yaml" > /dev/null << 'EOF' + +EOF +``` + +Also update `router_settings.fallbacks` to reflect any renamed models. + +## Step 4: Verify + +Confirm the file was written correctly: +```bash +docker exec litellm cat /app/config.yaml +``` + +## LiteLLM model ID format reference + +| Provider | LiteLLM format | +| ---------------------- | ---------------------------------- | +| Anthropic (direct) | `anthropic/` | +| OpenAI (direct) | `openai/` | +| Google Gemini (direct) | `gemini/` | +| OpenRouter | `openrouter//` | +| Ollama (local) | `ollama_chat/` | + +Example: `openrouter/meta-llama/llama-4-maverick`, `anthropic/claude-sonnet-4-6` + +## Summary output + +After completing the update, show a table of what changed: + +| Model | Old ID | New ID | Action | +| ----- | ------ | ------ | ------------------------ | +| ... | ... | ... | Updated / Removed / Kept | diff --git a/docker/ai/litellm/config/config.yaml b/docker/ai/litellm/config/config.yaml index fa216e63..6ada0b21 100644 --- a/docker/ai/litellm/config/config.yaml +++ b/docker/ai/litellm/config/config.yaml @@ -20,24 +20,19 @@ model_list: # Create API key: https://platform.claude.com/settings/keys # Buy credits: https://platform.claude.com/settings/billing - - model_name: claude-sonnet-4-0 # RECEIVED MODEL NAME + - model_name: claude-sonnet-4-6 # RECEIVED MODEL NAME litellm_params: # All params accepted by litellm.completion() - https://docs.litellm.ai/docs/completion/input - model: anthropic/claude-sonnet-4-0 # MODEL NAME sent to `litellm.completion()` + model: anthropic/claude-sonnet-4-6 # MODEL NAME sent to `litellm.completion()` api_key: "os.environ/ANTHROPIC_API_KEY" # Does os.getenv("ANTHROPIC_API_KEY") - - model_name: claude-sonnet-4-5 + - model_name: claude-opus-4-6 litellm_params: - model: anthropic/claude-sonnet-4-5 - api_key: "os.environ/ANTHROPIC_API_KEY" - - - model_name: claude-opus-4-5 - litellm_params: - model: anthropic/claude-opus-4-5 + model: anthropic/claude-opus-4-6 api_key: "os.environ/ANTHROPIC_API_KEY" - model_name: claude-haiku-4-5 litellm_params: - model: anthropic/claude-haiku-4-5 + model: anthropic/claude-haiku-4-5-20251001 api_key: "os.environ/ANTHROPIC_API_KEY" # --- Via OpenAI @@ -78,16 +73,16 @@ model_list: # Create API Key: https://openrouter.ai/settings/keys # Buy credits: https://openrouter.ai/settings/credits - # https://openrouter.ai/openai/openai/gpt-4o - - model_name: gpt-4o + # https://openrouter.ai/openai/gpt-4.1 + - model_name: gpt-4.1 litellm_params: - model: openrouter/openai/gpt-4o + model: openrouter/openai/gpt-4.1 api_key: "os.environ/OPENROUTER_API_KEY" - # https://openrouter.ai/openai/gpt-4o-mini - - model_name: gpt-4o-mini + # https://openrouter.ai/openai/gpt-4.1-mini + - model_name: gpt-4.1-mini litellm_params: - model: openrouter/openai/gpt-4o-mini + model: openrouter/openai/gpt-4.1-mini api_key: "os.environ/OPENROUTER_API_KEY" # https://openrouter.ai/openai/o4-mini-high @@ -96,16 +91,16 @@ model_list: model: openrouter/openai/o4-mini-high api_key: "os.environ/OPENROUTER_API_KEY" - # https://openrouter.ai/meta-llama/llama-3.3-70b-instruct - - model_name: llama-3.3-70b-instruct + # https://openrouter.ai/meta-llama/llama-4-maverick + - model_name: llama-4-maverick litellm_params: - model: openrouter/meta-llama/llama-3.3-70b-instruct + model: openrouter/meta-llama/llama-4-maverick api_key: "os.environ/OPENROUTER_API_KEY" - # https://openrouter.ai/deepseek/deepseek-r1-distill-llama-70b - - model_name: deepseek-r1-distill-llama-70b + # https://openrouter.ai/deepseek/deepseek-v3.2 + - model_name: deepseek-v3.2 litellm_params: - model: openrouter/deepseek/deepseek-r1-distill-llama-70b + model: openrouter/deepseek/deepseek-v3.2 api_key: "os.environ/OPENROUTER_API_KEY" # https://openrouter.ai/deepseek/deepseek-r1 @@ -141,8 +136,8 @@ model_list: router_settings: fallbacks: - gpt-5: - - gpt-4o + - gpt-4.1 - gpt-5-mini: - - gpt-4o-mini + - gpt-4.1-mini - ollama-mac-mistral: - ollama-local-phi