Files
homelab-configs/docs/testing/litellm-models-update.md
jgitta 290aedf82d Add complete homelab documentation and configurations
Documentation:
- OpenCode + LiteLLM integration guide
- LiteLLM complete setup with 16 models
- Gitea centralized configuration guide
- Testing procedures and verification
- API keys setup instructions

Configurations:
- OpenCode config pointing to LiteLLM
- Updated LiteLLM config with all models
- Nextcloud docker-compose template

Scripts:
- Gitea setup automation
- OpenCode testing script

Infrastructure:
- Gitea: 192.168.88.200:3000
- LiteLLM: 192.168.88.27:4000
- Nextcloud: 192.168.88.62
2026-04-25 10:56:21 -05:00

201 lines
4.4 KiB
Markdown

# LiteLLM Models Update - Complete Latest API Support
**Date**: April 25, 2026
**Update Type**: Configuration expansion
**Action Required**: Replace `/opt/litellm/config/litellm_config.yaml` on docker-server
---
## 📊 Before vs After
### Previous Configuration (10 models)
- OpenAI: 3 models
- Claude: 4 models
- Gemini: 3 models
### Updated Configuration (16 models) ✨
- OpenAI: 5 models (+2)
- Claude: 6 models (+2)
- Gemini: 5 models (+2)
---
## 🆕 New Models Added
### OpenAI (+2 Models)
-**`gpt-4o`** - Latest omni model (vision + text, multimodal)
-**`gpt-4o-mini`** - Faster, cheaper variant of GPT-4o
- Kept: gpt-4-turbo, gpt-4, gpt-3.5-turbo
### Anthropic Claude (+2 Models)
-**`claude-3.5-sonnet`** - Latest Claude, best performance/cost ratio
-**`claude-opus-4`** - Next-gen flagship model
- Kept: claude-3-opus, claude-3-sonnet, claude-3-haiku, claude-2.1
### Google Gemini (+2 Models)
-**`gemini-2.0-flash`** - Latest, ultra-fast with vision
-**`gemini-2.0-pro`** - Latest pro variant
- Kept: gemini-1.5-pro, gemini-1.5-flash, gemini-pro
---
## 🚀 How to Update
### Option 1: Copy File via SCP (Easiest)
```bash
# From your local machine:
scp /path/to/litellm_config_updated.yaml jgitta@192.168.88.27:/opt/litellm/config/litellm_config.yaml
# Then restart:
ssh jgitta@192.168.88.27 "cd /opt/litellm && docker-compose restart"
```
### Option 2: SSH and Edit
```bash
ssh jgitta@192.168.88.27
cd /opt/litellm/config
nano litellm_config.yaml
# Replace entire contents with the updated config
# Ctrl+X, Y, Enter to save
cd ..
docker-compose restart
```
### Option 3: Copy-Paste the File
1. Open `litellm_config_updated.yaml` in your editor
2. SSH to docker-server: `ssh jgitta@192.168.88.27`
3. Edit the config: `nano /opt/litellm/config/litellm_config.yaml`
4. Select all (`Ctrl+A`), paste the new content
5. Save (`Ctrl+X`, `Y`, `Enter`)
6. Restart: `docker-compose restart`
---
## ✅ Verify the Update
After restarting, all 16 models should be available:
```bash
curl http://192.168.88.27:4000/models \
-H "Authorization: Bearer litellm-local-key-change-in-production" | jq '.data | length'
```
Should return: `16`
List all models:
```bash
curl http://192.168.88.27:4000/models \
-H "Authorization: Bearer litellm-local-key-change-in-production" | jq '.data[].id'
```
Expected output:
```
"gpt-4o"
"gpt-4o-mini"
"gpt-4-turbo"
"gpt-4"
"gpt-3.5-turbo"
"claude-3.5-sonnet"
"claude-opus-4"
"claude-3-opus"
"claude-3-sonnet"
"claude-3-haiku"
"claude-2.1"
"gemini-2.0-flash"
"gemini-2.0-pro"
"gemini-1.5-pro"
"gemini-1.5-flash"
"gemini-pro"
```
---
## 📝 What Changed in the Config
### Model Names (Full Anthropic IDs)
The config now uses the **full model identifiers** from each provider:
#### OpenAI Format
```yaml
model: openai/gpt-4o
```
#### Anthropic Format
```yaml
model: claude/claude-3-5-sonnet-20241022
model: claude/claude-opus-4-1-20250805
```
#### Google Format
```yaml
model: google/gemini-2.0-flash
model: google/gemini-2.0-pro
```
This ensures LiteLLM routes to the correct model versions.
---
## 🔑 API Keys Remain the Same
All new models use the same API keys:
- OpenAI: `OPENAI_API_KEY` (sk-...)
- Claude: `ANTHROPIC_API_KEY` (sk-ant-...)
- Gemini: `GOOGLE_API_KEY` (...)
**No new credentials needed** — same providers, newer models!
---
## 📋 Model Capability Comparison
### Best for Coding
- `gpt-4o` or `claude-3.5-sonnet`
### Best for Vision/Multimodal
- `gpt-4o` (native multimodal)
- `gemini-2.0-flash` (native multimodal)
### Best for Cost Efficiency
- `gpt-4o-mini` (fastest, cheapest)
- `gemini-1.5-flash` (fast, low cost)
- `claude-3.5-sonnet` (best balance)
### Most Powerful
- `claude-opus-4` (most advanced reasoning)
- `gpt-4o` (best overall)
- `gemini-2.0-pro` (next-gen pro variant)
### Fastest
- `gemini-2.0-flash` (ultra-fast)
- `gpt-4o-mini` (fast, cheap)
- `gemini-1.5-flash` (fast)
---
## 🔄 Rollback (If Needed)
If something goes wrong, your old config is here:
`/opt/litellm/config/litellm_config.yaml.backup` (if you made one)
Or simply restore from git if pushed to Gitea.
---
## ✨ Next Steps
1. Update the config file using one of the methods above
2. Restart LiteLLM: `docker-compose restart`
3. Verify all 16 models load: `curl http://192.168.88.27:4000/models ...`
4. Test with your real API keys
5. Update any VM scripts to use new models as needed
---
**Files Provided:**
- `litellm_config_updated.yaml` - Ready to copy to docker-server