feat: add custom API key header support for LLM providers
- Add LLM_API_KEY_HEADER for providers using non-standard auth headers - Support Xiaomi MiMo (uses "api-key" header instead of "x-api-key") - Add extra_headers to LiteLLM calls when custom header is configured - Document LITELLM_ANTHROPIC_DISABLE_URL_SUFFIX for full path URLs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
# =============================================================================
|
||||
# LLM_API_BASE=http://localhost:8000/v1
|
||||
# LLM_API_KEY=your-key
|
||||
# LLM_API_KEY_HEADER=api-key # Optional: custom header name for API key
|
||||
#
|
||||
# For OpenAI-compatible API:
|
||||
# LLM_MODEL=openai/your-model-name
|
||||
@@ -51,6 +52,15 @@
|
||||
# For Anthropic-compatible API:
|
||||
# LLM_MODEL=anthropic/your-model-name
|
||||
|
||||
# =============================================================================
|
||||
# Example: Xiaomi MiMo (Anthropic-compatible)
|
||||
# =============================================================================
|
||||
# LLM_API_BASE=https://api.xiaomimomo.com/anthropic/v1/messages
|
||||
# LLM_API_KEY=your-mimo-api-key
|
||||
# LLM_API_KEY_HEADER=api-key
|
||||
# LLM_MODEL=anthropic/mimo-v2-flash
|
||||
# LITELLM_ANTHROPIC_DISABLE_URL_SUFFIX=true # Prevent appending /v1/messages
|
||||
|
||||
# =============================================================================
|
||||
# Force mock mode (no API calls, uses predefined responses)
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user