feat(reactor-cli): add OrcaRouter as a named built-in provider - #164
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
feat(reactor-cli): add OrcaRouter as a named built-in provider#164XiaoHuo888-hue wants to merge 1 commit into
XiaoHuo888-hue wants to merge 1 commit into
Conversation
Registers the orcarouter built-in in the KNOWN_PROVIDERS registry, so `model.provider: orcarouter` + `ORCAROUTER_API_KEY` resolve to https://api.orcarouter.ai/v1 through the same openai-compat path as the existing OpenRouter/OpenAI/Google built-ins. Updates the init scaffold comment, config docstring, README provider list, and adds a provider-plan unit test. Verified: typecheck clean, provider-plan suite 10/10, L3 live render through the OrcaRouter gateway (structured output + tool call). 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.
This 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 asorcarouter/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.I'm an engineer on the OrcaRouter team.
What & why
packages/reactor-cli'sKNOWN_PROVIDERSregistry documents its extension mechanism ("Add a row as new vendors are asked for in the wild"). This PR adds one row fororcarouter:baseURL: https://api.orcarouter.ai/v1apiKeyEnv: ORCAROUTER_API_KEYso a
reactor.ymlwithmodel.provider: orcarouterresolves the OrcaRouter gateway base URL + key env through the exact sameopenai-compat(Chat Completions) path the existingopenrouter/openai/googlebuilt-ins use —buildLiveProviderinjects a scopedOpenAIProviderwithuseResponses: false, unchanged.Changes
src/model/provider-plan.ts— addorcaroutertoKNOWN_PROVIDERS(base URL + key env)src/commands/init.ts— scaffoldreactor.ymlcomment listsorcarouter+ORCAROUTER_API_KEYsrc/config.ts—base_urldocstring listsorcarouterREADME.md— built-in provider list includesorcaroutersrc/__tests__/provider-plan.test.ts— new unit test asserting the orcarouter planVerification
pnpm --filter @openprose/reactor-cli typecheck— cleanpnpm --filter @openprose/reactor-cli build:test— cleannode --testoverdist-test: 210 pass / 1 fail — the single failure is thecontract-imagessymlink-cycle test on Windows (EPERM: operation not permitted, symlink), a pre-existing platform limitation unrelated to this changeresolveProviderPlan({ provider: 'orcarouter' })→https://api.orcarouter.ai/v1+ORCAROUTER_API_KEY;reactor doctor --livesmoke render OK (modelanthropic/claude-haiku-4.5, 38 tokens); a structured render + function tool through the gateway returned 1872 tokensreactor initscaffold →reactor.ymldocuments theorcarouterprovider;doctorrecognizesORCAROUTER_API_KEYNotes
No behavior change for existing users:
openrouterremains the default, and the SDK's lazy default-OpenRouter path is untouched (custom: trueonly for non-default providers).