# Upstream API base URL (any OpenAI chat/completions compatible endpoint) # The proxy auto-detects your provider and filters the model catalog accordingly. # Examples: # Z.AI (GLM): https://api.z.ai/api/coding/paas/v4 # Zhipu AI: https://open.bigmodel.cn/api/coding/paas/v4 # DeepSeek: https://api.deepseek.com/v1 # OpenAI: https://api.openai.com/v1 # OpenRouter: https://openrouter.ai/api/v1 (aggregator, shows all models) # Ollama: http://localhost:11434/v1 # vLLM: http://localhost:8000/v1 UPSTREAM_BASE_URL=https://openrouter.ai/api/v1 # API key for the upstream provider # Also reads OPENAI_API_KEY if API_KEY is not set API_KEY=sk-your-key-here # Proxy port (default: 8765) PORT=8765 # Test proxy port — bun run test.ts spawns a dedicated proxy on this port TEST_PORT=8790 # Filter out non-function tools like computer_use, web_search # that most providers don't support (default: true) FILTER_NON_FUNCTION_TOOLS=true # Model catalog filter — comma-separated model name patterns. # Only matching models appear in the catalog (prevents LLM picking wrong models for sub-agents). # If unset, auto-detects from UPSTREAM_BASE_URL and shows only that provider's models. # Examples: # MODELS_FILTER=glm # All GLM models # MODELS_FILTER=glm-5.1,glm-5-turbo # Only these two # MODELS_FILTER=glm,deepseek # All GLM + all DeepSeek # MODELS_FILTER=llama,qwen # All Llama + all Qwen MODELS_FILTER= # Exclude specific models from the catalog (applied after MODELS_FILTER). # Examples: # MODELS_EXCLUDE=glm-4.5-air # Hide this model # MODELS_EXCLUDE=glm-4.5-air,glm-5v-turbo # Hide these two MODELS_EXCLUDE=