Skip to content

Commit 7b0d07f

Browse files
nioasoftclaude
andcommitted
Add OpenRouter as API provider option
Enables access to 200+ models via OpenRouter's unified API, including Claude, Gemini, GPT-4o, and DeepSeek variants. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c0aaac2 commit 7b0d07f

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

registry.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,20 @@ def get_all_settings() -> dict[str, str]:
658658
],
659659
"default_model": "qwen3-coder",
660660
},
661+
"openrouter": {
662+
"name": "OpenRouter",
663+
"base_url": "https://openrouter.ai/api/v1",
664+
"requires_auth": True,
665+
"auth_env_var": "ANTHROPIC_API_KEY",
666+
"models": [
667+
{"id": "anthropic/claude-sonnet-4-5", "name": "Claude Sonnet 4.5"},
668+
{"id": "anthropic/claude-opus-4", "name": "Claude Opus 4"},
669+
{"id": "google/gemini-2.5-pro", "name": "Gemini 2.5 Pro"},
670+
{"id": "openai/gpt-4o", "name": "GPT-4o"},
671+
{"id": "deepseek/deepseek-chat-v3-0324", "name": "DeepSeek V3"},
672+
],
673+
"default_model": "anthropic/claude-sonnet-4-5",
674+
},
661675
"custom": {
662676
"name": "Custom Provider",
663677
"base_url": "",

ui/src/components/SettingsModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const PROVIDER_INFO_TEXT: Record<string, string> = {
2424
kimi: 'Get an API key at kimi.com',
2525
glm: 'Get an API key at open.bigmodel.cn',
2626
ollama: 'Run models locally. Install from ollama.com',
27+
openrouter: 'Access 200+ models. Get an API key at openrouter.ai',
2728
custom: 'Connect to any OpenAI-compatible API endpoint.',
2829
}
2930

0 commit comments

Comments
 (0)