feat: add OrcaRouter as a named provider preset - #668
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/autopick 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 providercustom, base URLhttps://api.orcarouter.ai/v1, apiModechat_completions, default modelopenai/gpt-5.5, and a suggested-models list spanning the OpenAI, Anthropic, Google, DeepSeek, GLM and Kimi families plus theorcarouter/autoandorcarouter/freerouters.src/components/settings/preset-resolver.test.ts: adds unit tests for the preset shape and forresolveConfigproducing a custom chat-completions config withcustomEndpointset tohttps://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/autopick an upstream per request.How to use it
sk-orca-).openai/gpt-5.5,anthropic/claude-sonnet-4.6orgoogle/gemini-2.5-flash. The full catalog is at https://www.orcarouter.ai/models.Verification
tsc --buildclean.streamChatreturns the expected marker for the default model and fororcarouter/auto; an invalid key fails with an explicit auth error.