Skip to content
Open
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
31 changes: 31 additions & 0 deletions src/components/settings/llm-presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,37 @@ export const LLM_PRESETS: LlmPreset[] = [
],
suggestedContextSize: 128000,
},
{
id: "orcarouter",
label: "OrcaRouter",
hint: "api.orcarouter.ai",
provider: "custom",
baseUrl: "https://api.orcarouter.ai/v1",
defaultModel: "openai/gpt-5.5",
apiMode: "chat_completions",
// OrcaRouter is a multi-vendor model routing gateway exposing OpenAI,
// Anthropic, Google, DeepSeek, GLM, Kimi and other families behind a
// single OpenAI-compatible /v1/chat/completions endpoint, so it reuses
// the generic chat-completions wire like the other hosted gateways above.
// `orcarouter/auto` routes per request and is offered as a chip, but the
// default stays a concrete model. The full catalog is large and rotates;
// this is a practical subset and users can type any other id into the
// input.
suggestedModels: [
"orcarouter/auto",
"orcarouter/free",
"openai/gpt-5.5",
"openai/gpt-5.4-mini",
"anthropic/claude-sonnet-4.6",
"anthropic/claude-haiku-4.5",
"google/gemini-2.5-flash",
"deepseek/deepseek-v4-flash",
"deepseek/deepseek-v4-pro",
"z-ai/glm-5.2",
"kimi/kimi-k2.6",
],
suggestedContextSize: 128000,
},
{
id: "groq",
label: "Groq",
Expand Down
20 changes: 20 additions & 0 deletions src/components/settings/preset-resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ describe("resolveConfig", () => {
expect(atlas?.suggestedModels).toContain("deepseek-ai/deepseek-v4-pro")
})

it("exposes OrcaRouter as an OpenAI-compatible chat-completions preset", () => {
const orca = LLM_PRESETS.find((preset) => preset.id === "orcarouter")

expect(orca?.provider).toBe("custom")
expect(orca?.baseUrl).toBe("https://api.orcarouter.ai/v1")
expect(orca?.apiMode).toBe("chat_completions")
expect(orca?.defaultModel).toBe("openai/gpt-5.5")
expect(orca?.suggestedModels).toContain("orcarouter/auto")
})

it("resolves the OrcaRouter preset into a custom chat-completions config", () => {
const orca = LLM_PRESETS.find((preset) => preset.id === "orcarouter")!
const resolved = resolveConfig(orca, undefined, fallbackConfig())

expect(resolved.provider).toBe("custom")
expect(resolved.customEndpoint).toBe("https://api.orcarouter.ai/v1")
expect(resolved.apiMode).toBe("chat_completions")
expect(resolved.model).toBe("openai/gpt-5.5")
})

it("keeps Xiaomi MiMo presets aligned with current official and Token Plan endpoints", () => {
const mimo = LLM_PRESETS.find((preset) => preset.id === "xiaomi-mimo")

Expand Down