Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/webuiapps/src/components/ChatPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,7 @@ const SettingsModal: React.FC<{
<option value="minimax">MiniMax</option>
<option value="z.ai">Z.ai</option>
<option value="kimi">Kimi</option>
<option value="openrouter">OpenRouter</option>
</select>
</div>

Expand Down
7 changes: 7 additions & 0 deletions apps/webuiapps/src/lib/__tests__/llmClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ describe('getDefaultProviderConfig()', () => {
expect(cfg.model).toBe('kimi-k2-5');
});

it('returns correct defaults for openrouter', () => {
const cfg = getDefaultProviderConfig('openrouter');
expect(cfg.provider).toBe('openrouter');
expect(cfg.baseUrl).toBe('https://openrouter.ai/api/v1');
expect(cfg.model).toBe('minimax/MiniMax-M2.5');
});

it('returns consistent values for the same provider', () => {
const a = getDefaultProviderConfig('openai');
const b = getDefaultProviderConfig('openai');
Expand Down
26 changes: 25 additions & 1 deletion apps/webuiapps/src/lib/llmModels.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
export type LLMProvider = 'openai' | 'anthropic' | 'deepseek' | 'minimax' | 'z.ai' | 'kimi';
export type LLMProvider =
| 'openai'
| 'anthropic'
| 'deepseek'
| 'minimax'
| 'z.ai'
| 'kimi'
| 'openrouter';

export type ModelCategory = 'flagship' | 'general' | 'coding' | 'lightweight' | 'thinking';

Expand Down Expand Up @@ -116,6 +123,23 @@ export const LLM_PROVIDER_CONFIGS: Record<LLMProvider, ProviderModelConfig> = {
{ id: 'kimi-k2-turbo', name: 'Kimi K2 Turbo', category: 'general' },
],
},

openrouter: {
displayName: 'OpenRouter',
baseUrl: 'https://openrouter.ai/api/v1',
defaultModel: 'minimax/MiniMax-M2.5',
models: [
{ id: 'minimax/MiniMax-M2.5', name: 'MiniMax M2.5', category: 'flagship' },
{ id: 'minimax/MiniMax-M2.5-highspeed', name: 'MiniMax M2.5 Highspeed', category: 'general' },
{ id: 'minimax/MiniMax-M2.7', name: 'MiniMax M2.7', category: 'flagship' },
{ id: 'minimax/MiniMax-M2.7-highspeed', name: 'MiniMax M2.7 Highspeed', category: 'general' },
{ id: 'minimax/MiniMax-M2.1', name: 'MiniMax M2.1', category: 'coding' },
{ id: 'anthropic/claude-sonnet-4-6', name: 'Claude Sonnet 4.6', category: 'general' },
{ id: 'openai/gpt-5.4', name: 'GPT-5.4', category: 'flagship' },
{ id: 'deepseek/deepseek-chat', name: 'DeepSeek Chat', category: 'general' },
{ id: 'google/gemini-2.5-pro', name: 'Gemini 2.5 Pro', category: 'flagship' },
],
},
};

export const PROVIDER_MODELS: Record<LLMProvider, string[]> = Object.fromEntries(
Expand Down
Loading