Skip to content

feat(agents): add OrcaRouter as a named model provider - #4764

Open
XiaoHuo888-hue wants to merge 1 commit into
electric-sql:mainfrom
XiaoHuo888-hue:add-orcarouter-provider
Open

feat(agents): add OrcaRouter as a named model provider#4764
XiaoHuo888-hue wants to merge 1 commit into
electric-sql:mainfrom
XiaoHuo888-hue:add-orcarouter-provider

Conversation

@XiaoHuo888-hue

Copy link
Copy Markdown

Add OrcaRouter as a named model provider

This adds OrcaRouter as a first-class, named LLM provider across the agents subsystem, mirroring the existing Moonshot OpenAI-compatible gateway wiring. Setting ORCAROUTER_API_KEY surfaces OrcaRouter models (orcarouter/auto, fusion, fusion-flash, fusion-mini) in the model picker and lets the built-in Horton/Worker agents route through https://api.orcarouter.ai/v1.

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.

What changed

  • @electric-ax/agents-runtime: new orcarouter-models.ts with 4 OpenAI-compatible gateway models routed to https://api.orcarouter.ai/v1; ORCAROUTER_API_KEY env detection, low-cost model selection, and pi-adapter model resolution.
  • @electric-ax/agents: model-catalog integration so built-in agents can use OrcaRouter models (provider label + API-key hook), plus the "no provider key" error text.
  • @electric-ax/agents-server-ui + @electric-ax/agents-desktop: OrcaRouter API key input, model-picker option, provider label, and onboarding/settings wiring.
  • examples/deep-survey: optional ORCAROUTER_API_KEY worker model.
  • Docs: provider env-key list updated.

Verification

  • agents-runtime: model-runner + pi-adapter tests pass (49 tests, incl. 7 new OrcaRouter ones).
  • agents: model-catalog tests pass (18 tests, incl. 2 new OrcaRouter ones).
  • agents-server-ui: 113 tests pass.
  • Typecheck: agents-runtime, agents, agents-server-ui, agents-desktop (touched files), examples/deep-survey all clean.
  • Prettier + ESLint clean on all touched files.
  • L3 live test: a real OrcaRouter key round-trips through the actual provider code path (getOrcaRouterModel('orcarouter/auto') + completeSimple) against https://api.orcarouter.ai/v1/chat/completions200, response contains ORCA-LIVE-OK.

Disclosure: I'm an engineer on the OrcaRouter team.

Add OrcaRouter as a first-class named provider across the agents
subsystem, mirroring the existing Moonshot OpenAI-compatible gateway
wiring.

- agents-runtime: new orcarouter-models.ts with 4 gateway models
  (orcarouter/auto, fusion, fusion-flash, fusion-mini) routed to
  https://api.orcarouter.ai/v1; ORCAROUTER_API_KEY env detection,
  low-cost model selection, and pi-adapter model resolution.
- agents: model-catalog integration so built-in Horton/Worker agents
  can use OrcaRouter models; provider label + API key hook.
- agents-server-ui + agents-desktop: OrcaRouter API key input, model
  picker option, provider labels, and onboarding/settings wiring.
- deep-survey example: optional ORCAROUTER_API_KEY worker model.
- docs: provider env key list updated; tests added for model
  resolution, catalog, detection, and low-cost selection.

L3 live-verified: real key round-trips through the OrcaRouter
chat/completions endpoint via the provider path.

Signed-off-by: XiaoHuo888-hue <jinhao.song@myflashcloud.com>
@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for electric-next ready!

Name Link
🔨 Latest commit 0aa5572
🔍 Latest deploy log https://app.netlify.com/projects/electric-next/deploys/6a86ac1c00ee670008f869ed
😎 Deploy Preview https://deploy-preview-4764--electric-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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