Skip to content

feat: add OrcaRouter as a named provider preset - #668

Open
XiaoHuo888-hue wants to merge 1 commit into
nashsu:mainfrom
XiaoHuo888-hue:feat/orcarouter-provider
Open

feat: add OrcaRouter as a named provider preset#668
XiaoHuo888-hue wants to merge 1 commit into
nashsu:mainfrom
XiaoHuo888-hue:feat/orcarouter-provider

Conversation

@XiaoHuo888-hue

Copy link
Copy Markdown

Summary

Adds a dedicated OrcaRouter provider preset rather than relying on the generic OpenAI-compatible custom endpoint, mirroring how this repo already treats Atlas Cloud, DeepSeek, Groq and xAI style aggregators. Named routers such as orcarouter/auto pick an upstream per request. OrcaRouter is an OpenAI-compatible gateway that exposes 150+ models behind one API key, and it also runs gateway-level, zero-trust security for AI agents on the same endpoint — screening every prompt/response and governing every tool call on a default-deny basis, with no application code changes.

I'm an engineer on the OrcaRouter team.

What this changes

  • src/components/settings/llm-presets.ts: registers the OrcaRouter preset with provider custom, base URL https://api.orcarouter.ai/v1, apiMode chat_completions, default model openai/gpt-5.5, and a suggested-models list spanning the OpenAI, Anthropic, Google, DeepSeek, GLM and Kimi families plus the orcarouter/auto and orcarouter/free routers.
  • src/components/settings/preset-resolver.test.ts: adds unit tests for the preset shape and for resolveConfig producing a custom chat-completions config with customEndpoint set to https://api.orcarouter.ai/v1.

Why a separate provider rather than the OpenAI-compatible escape hatch

This mirrors how the existing Atlas Cloud gateway is wired in this repo, so the model picker, config reference and docs stay consistent for users. Named routers such as orcarouter/auto pick an upstream per request.

How to use it

  1. Get an API key at https://www.orcarouter.ai/console (keys start with sk-orca-).
  2. In Settings, choose the OrcaRouter preset and paste the key.
  3. Pick a model id such as openai/gpt-5.5, anthropic/claude-sonnet-4.6 or google/gemini-2.5-flash. The full catalog is at https://www.orcarouter.ai/models.

Verification

  • Unit tests: preset-resolver suite passes (14/14).
  • Typecheck: tsc --build clean.
  • Full mocked test suite: 1806/1806 pass.
  • Live API: a real-key end-to-end stream through streamChat returns the expected marker for the default model and for orcarouter/auto; an invalid key fails with an explicit auth error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant