feat: add LiteLLM proxy for Anthropic Claude models
Added LiteLLM as an OpenAI-compatible proxy for Anthropic's API to enable Claude models in Open WebUI. **New Service: litellm** - Image: ghcr.io/berriai/litellm:main-latest - Internal proxy on port 4000 - Converts Anthropic API to OpenAI-compatible format - Health check with 30s intervals - Not exposed via Traefik (internal only) **LiteLLM Configuration (litellm-config.yaml)** - Claude Sonnet 4 (claude-sonnet-4-20250514) - Claude Sonnet 4.5 (claude-sonnet-4-5-20250929) - Claude 3.5 Sonnet (claude-3-5-sonnet-20241022) - Claude 3 Opus (claude-3-opus-20240229) - Claude 3 Haiku (claude-3-haiku-20240307) **Open WebUI Configuration Updates** - Changed OPENAI_API_BASE_URLS to point to LiteLLM proxy - URL: http://litellm:4000/v1 - Added litellm as dependency for webui service - Dummy API key for proxy authentication **Why LiteLLM?** Anthropic's API uses different endpoint structure and authentication headers compared to OpenAI. LiteLLM acts as a translation layer, allowing Open WebUI to use Claude models through its OpenAI-compatible interface. **Available Models in Open WebUI** - claude-sonnet-4 (latest Claude Sonnet 4) - claude-sonnet-4.5 (Claude Sonnet 4.5) - claude-3-5-sonnet - claude-3-opus - claude-3-haiku 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
29
ai/litellm-config.yaml
Normal file
29
ai/litellm-config.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
model_list:
|
||||
- model_name: claude-sonnet-4
|
||||
litellm_params:
|
||||
model: anthropic/claude-sonnet-4-20250514
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
|
||||
- model_name: claude-sonnet-4.5
|
||||
litellm_params:
|
||||
model: anthropic/claude-sonnet-4-5-20250929
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
|
||||
- model_name: claude-3-5-sonnet
|
||||
litellm_params:
|
||||
model: anthropic/claude-3-5-sonnet-20241022
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
|
||||
- model_name: claude-3-opus
|
||||
litellm_params:
|
||||
model: anthropic/claude-3-opus-20240229
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
|
||||
- model_name: claude-3-haiku
|
||||
litellm_params:
|
||||
model: anthropic/claude-3-haiku-20240307
|
||||
api_key: ${ANTHROPIC_API_KEY}
|
||||
|
||||
litellm_settings:
|
||||
drop_params: true
|
||||
set_verbose: false
|
||||
Reference in New Issue
Block a user