# ============================================================================ # Anthropic -> OpenAI proxy server configuration # Copy this file to .env and fill in the values: # cp .env.example .env # ============================================================================ # --- Proxy server network settings --- # The host the server will listen on (0.0.0.0 — reachable from outside) HOST=0.0.0.0 # Proxy server port PORT=8082 # --- Upstream settings (the target OpenAI-compatible API) --- # Base URL of the OpenAI-compatible API (WITHOUT a trailing slash) # Examples: # OpenAI: https://api.openai.com/v1 # OpenRouter: https://openrouter.ai/api/v1 # Local (LM Studio / Ollama / vLLM): http://localhost:1234/v1 OPENAI_BASE_URL=https://api.openai.com/v1 # The API key for the upstream. This is the key used for all upstream requests. # The client key (x-api-key / Authorization) is ignored for security reasons. OPENAI_API_KEY=sk-your-openai-key-here # --- Anthropic -> OpenAI model mapping --- # Any Anthropic model containing the substring "opus" -> BIG_MODEL # Any Anthropic model containing the substring "sonnet" -> MIDDLE_MODEL # Any Anthropic model containing the substring "haiku" -> SMALL_MODEL BIG_MODEL=gpt-4o MIDDLE_MODEL=gpt-4o SMALL_MODEL=gpt-4o-mini # --- Other settings --- # Upstream request timeout in seconds REQUEST_TIMEOUT=120 # Logging level: DEBUG, INFO, WARNING, ERROR LOG_LEVEL=INFO # Default max tokens cap if the client sends too large a value (0 = no limit) MAX_TOKENS_LIMIT=0