Skip to content

feat(providers): add OrcaRouter as a named provider - #247

Open
JinhaoSong322 wants to merge 1 commit into
AtomicBot-ai:mainfrom
JinhaoSong322:add-orcarouter-provider
Open

feat(providers): add OrcaRouter as a named provider#247
JinhaoSong322 wants to merge 1 commit into
AtomicBot-ai:mainfrom
JinhaoSong322:add-orcarouter-provider

Conversation

@JinhaoSong322

Copy link
Copy Markdown

Describe Your Changes

Add OrcaRouter as a first-class named remote provider, mirroring the existing OpenRouter wiring.

OrcaRouter is an AI gateway that routes every request to the best model for the job — mixing frontier models, open-weight models, and long-context specialists behind one unified, OpenAI-compatible API. 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

  • web-app/src/constants/models.ts — add an orcarouter capability entry (model list via /v1/models, tools, vision, JSON, streaming, n).
  • web-app/src/lib/utils.ts — provider logo and display title (OrcaRouter).
  • web-app/src/lib/model-factory.ts — route orcarouter through createOpenAICompatibleModel.
  • web-app/public/images/model-provider/orcarouter.svg — OrcaRouter brand mark (512×512, brand blue).
  • docs/.../remote-models/orcarouter.mdx + _meta.json — setup guide (API key, base URL https://api.orcarouter.ai/v1, orcarouter/auto smart router) and docs index entry.
  • Tests — unit coverage for logo/title/capabilities; provider-presence checklists (tests/checklist.md, autoqa/checklist.md) updated.

Verification

  • vitest run: 1977 tests pass / 186 files (11 skipped, pre-existing).
  • ESLint clean on changed source files.
  • Live L3 test against the OrcaRouter API with a real key: POST https://api.orcarouter.ai/v1/chat/completions with orcarouter/auto returns HTTP 200; GET /v1/models returns the model catalog.

Note: tsc -b currently reports one pre-existing error in web-app/src/lib/provider-api-key.ts (ServiceHub import) that also exists on upstream main and is unrelated to this change.

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

Add OrcaRouter as a first-class remote provider mirroring the existing
OpenRouter wiring:

- constants/models.ts: capability entry (models via /v1/models, tools,
  vision, JSON, streaming, n)
- lib/utils.ts: provider logo + title (OrcaRouter)
- lib/model-factory.ts: route orcaRouter through createOpenAICompatibleModel
- public/images/model-provider/orcarouter.svg: brand mark (512x512)
- docs: orcaRouter remote-models guide + _meta.json entry
- tests: unit coverage for logo/title/capabilities; provider-presence
  checklists updated

Local verification: 1977 vitest tests pass (186 files), eslint clean on
changed source, and a live call to https://api.orcarouter.ai/v1 with a real
key returns 200.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: JinhaoSong322 <jinhao.song@myflashcloud.com>
@JinhaoSong322
JinhaoSong322 requested a review from Vect0rM as a code owner August 19, 2026 14:43

Vect0rM commented Aug 20, 2026

Copy link
Copy Markdown
Member

Thanks for putting this together, @JinhaoSong322 — the diff is well-scoped and you found the right seams. In particular, adding the case 'orcarouter': to model-factory.ts is the correct call and not an obvious one: the default: branch hands providers the full local-inference parameter bag, so an unnamed OpenAI-compatible provider gets top_k and friends injected into its request bodies. Naming it routes it to the override-only path. That's the detail most provider PRs miss.

Verified on your branch merged onto current main:

  • vitest --run src/lib/__tests__/models.test.ts src/lib/__tests__/utils.test.ts — 98 passed.
  • tsc -b — exit 0. Merges cleanly.

There's one blocker, and it's structural rather than anything wrong in your code.

The provider won't appear anywhere

Cloud providers aren't defined in this repo any more. They're loaded at runtime from a manifest in atomic-chat-conf — see web-app/src/services/provider-registry.ts and the note at the top of web-app/src/constants/providers.ts:

Add a provider here ONLY if it cannot live in the remote registry (e.g. it requires per-user resource configuration like Azure OpenAI). Do NOT re-introduce providers that already exist in atomic-chat-conf/providers/registry.json.

I fetched the live manifest to be sure:

openai, anthropic, openrouter, mistral, groq, xai, gemini,
minimax, huggingface, nvidia, moonshot, qwen, ollama

No orcarouter. That manifest is what supplies base_url, the API-key setting and the explore_models_url — everything that makes a row show up under Settings → Model Providers. So as this PR stands, nothing in the UI changes: the logo and title mappings are never reached, and Step 2 of your docs page can't be followed.

What's needed is a companion PR against atomic-chat-conf adding an entry with:

  • base_url: https://api.orcarouter.ai/v1
  • the standard api-key + base-url settings pair (copy the openrouter entry's shape)
  • explore_models_url pointing at the model catalogue

Once that lands, most of this diff still applies — the model-factory case, getProviderLogo, getProviderTitle and the bundled SVG all live here. The providerModels['orcarouter'] entry may turn out to be redundant, since the registry is the canonical source for the catalogue and models: true means nothing is synthesised from it — happy to keep it for symmetry with openrouter though.

Three questions

  1. Are you affiliated with OrcaRouter? No problem either way — vendor-submitted integrations are welcome and several of ours arrived that way. We just want it stated on the PR.
  2. The logo. orcarouter.svg gets bundled into the shipped app, so I need confirmation that it's the official mark and that we're permitted to redistribute it.
  3. The model ids in the docs. anthropic/claude-sonnet-4.6 and google/gemini-3-flash-preview are given as examples — are those live on the gateway today? Docs that name a model which 404s generate support traffic.

Doc nits (optional)

## Integrate OrcaRouter with Atomic Chat appears twice, and the keywords front-matter still leads with Jan. Both are inherited from openrouter.mdx, which has the same problems, so I won't hold the PR on them — but if you're touching the file anyway, fixing them in the new page is welcome.

Happy to review again as soon as the registry PR is up 🐋


Generated by Claude Code

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.

2 participants