Add OrcaRouter as a named AI provider - #212
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
Conversation
Wire OrcaRouter end-to-end following the Z.AI/OpenRouter provider pattern: - new orcarouter service constant and model prefix (orcarouter@orcarouter/auto) - DEFAULT_ORCAROUTER_CONFIG and settings model (API key, URL, defaults) - OrcaRouterAdapter with /v1 path and /v1/models discovery - PROVIDER_DEFINITIONS entry with ownedSecretId for secret storage - settings schema rows, provider detection, docs, and tests Co-Authored-By: Claude <noreply@anthropic.com>
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.
Scope
Adds a dedicated OrcaRouter provider rather than relying on the generic OpenAI-compatible endpoint, mirroring how this repo already treats OpenRouter-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 provides gateway-level security controls for AI agents.The provider is wired end-to-end following the existing Z.AI/OpenRouter pattern:
orcarouterservice constant + model prefix (orcarouter@orcarouter/auto)DEFAULT_ORCAROUTER_CONFIG(https://api.orcarouter.ai)Config.ts(credential-backed, no plaintext-only storage)OrcaRouterAdapter— OpenAI-compatible/v1path with model discovery from/v1/modelsPROVIDER_DEFINITIONSentry with anownedSecretId(secret-storage migration included automatically)ProviderHelpersI'm an engineer on the OrcaRouter team.
Compatibility and privacy
DEFAULT_SETTINGSwith safe empty defaults; no migration needed.orcarouter@orcarouter/autoresolves to the new adapter; registry, URL-suffix, and credential tests updated.Validation
npm run format:checknpm run lintnpm run typechecknpm test -- --runInBand(193 passed)npm run buildManual checks
https://api.orcarouter.ai/v1/modelsreturns 192 models includingorcarouter/auto(verified live).