Skip to content

feat(provider): add OrcaRouter as a named compatible provider - #387

Merged
Devin-AXIS merged 1 commit into
Devin-AXIS:mainfrom
JinhaoSong322:add-orcarouter-provider
Aug 20, 2026
Merged

Devin-AXIS merged 1 commit into
Devin-AXIS:mainfrom
JinhaoSong322:add-orcarouter-provider

Conversation

@JinhaoSong322

Copy link
Copy Markdown

Summary

Add OrcaRouter as a named, first-class compatible provider preset in the provider auth flow. Users can connect an OrcaRouter API key and use it from every supported agent engine, exactly like the existing DeepSeek / Qwen / TokenStar presets.

OrcaRouter is an AI gateway that routes each request to the best model for the task across OpenAI, Anthropic, Google, DeepSeek, MiniMax, and more through a single OpenAI-compatible endpoint (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.

Why

iPolloWork already ships named OpenAI-compatible provider presets (DeepSeek, Qwen, TokenStar). Adding OrcaRouter as a named preset makes it a one-click, discoverable provider rather than requiring users to configure a custom OpenAI-compatible endpoint.

Issue

N/A

Scope

  • New orcarouter-provider.ts with the preset definition (base URL, fallback model catalog, runtime model builder, OpenAI-compatible model parser).
  • store.ts: register the OrcaRouter preset in COMPATIBLE_PROVIDER_PRESETS and synthesize its API-key auth method.
  • Display name + icon fallback for the orcarouter provider id.
  • Provider auth modal copy, signup link, and sk-orca-... API key placeholder.
  • Unit tests for the preset and a store-level connection test.

Out of scope

  • No changes to the OpenCode engine, existing providers, or project config.

Testing

Ran

  • pnpm --filter @ipollowork/app typecheck
  • bun test apps/app/tests/orcarouter-provider.test.ts apps/app/tests/provider-engine-adapter.test.ts apps/app/tests/provider-auth-curation.test.ts apps/app/tests/settings-provider-branding.test.ts
  • bun test --isolate tests/ (full app suite)
  • node scripts/sync-readme-zh-hant.mjs --check
  • Live test: POST https://api.orcarouter.ai/v1/chat/completions with orcarouter/auto → HTTP 200, content ORCA-OK; all preset gateway models confirmed present in /v1/models.

Result

  • Typecheck: pass
  • Related tests: 36 pass, 0 fail
  • Full app suite: 862 pass, 4 fail — all 4 are pre-existing on clean main (composer model menu ×2, sidebar primary actions, managed brand header); none touch provider wiring.
  • README sync: synchronized
  • L3 live test: pass

CI status

  • Pending (fork first-PR; external auth action likely action_required until a maintainer approves CI).

Manual verification

  1. Open provider auth modal → OrcaRouter appears as a named provider.
  2. Connect with an API key → provider is materialized into opencode.json via @ai-sdk/openai-compatible with baseURL: https://api.orcarouter.ai/v1 and the fallback model catalog.
  3. Select an OrcaRouter model in the model picker → chat routes through the OrcaRouter gateway.

Evidence

Live API test (above) verifies the endpoint and model catalog end-to-end.

Contributor statement

  • I have the right to submit this contribution under CONTRIBUTING.md.
  • I preserved third-party copyright and license notices, or this change does not add third-party material.

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

Add OrcaRouter as a first-class compatible provider preset so users can
connect it with an API key and use it from every supported agent engine.

- orcarouter-provider.ts: preset with base URL https://api.orcarouter.ai/v1,
  fallback model catalog (orcarouter/auto adaptive router + flagship gateway
  models), runtime model builder and OpenAI-compatible model parser
- store.ts: register the OrcaRouter preset in COMPATIBLE_PROVIDER_PRESETS and
  synthesize its API-key auth method
- provider-auth-curation.ts / utils/index.ts / provider-icon.tsx: display name
  and icon fallback for the orcarouter provider id
- provider-auth-modal.tsx: OrcaRouter copy, signup link and sk-orca- placeholder
- tests: unit tests for the preset plus a store-level connection test

Co-Authored-By: jinhao.song <[email protected]>
Signed-off-by: JinhaoSong322 <[email protected]>
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