feat: add OrcaRouter as a BYOK provider with a searchable model picker#1632
Open
zhenjunchen-png wants to merge 3 commits into
Open
feat: add OrcaRouter as a BYOK provider with a searchable model picker#1632zhenjunchen-png wants to merge 3 commits into
zhenjunchen-png wants to merge 3 commits into
Conversation
added 3 commits
May 12, 2026 15:38
Adds OrcaRouter (https://orcarouter.ai) as a dedicated BYOK provider card in Agents > Models. OrcaRouter is an OpenAI-compatible LLM gateway that routes each request to the cheapest or fastest provider across many upstream model providers. Follows the existing alias pattern for OpenAI-compatible gateways (ModelArk, grok, llama.cpp): provider id `orcarouter` is aliased to `openai-compatible-model` on the backend, so no CAMEL changes are required. - backend/app/model/model_platform.py: PLATFORM_ALIAS_MAPPING entry - src/lib/llm.ts: INIT_PROVODERS entry with default base URL, positioned at the end of the list to preserve existing ordering - src/assets/model/orcarouter.svg: official OrcaRouter brand logo - src/pages/Agents/Models.tsx: import + register icon - docs/core/models/byok.md: add row to Supported Providers table
Adds a generic `Provider.modelsEndpoint` field and a two-column searchable dropdown for picking a model when the field is set. Only OrcaRouter opts in; other providers are untouched (text input as-is). Also moves the OrcaRouter card up the list (after Anthropic, above OpenRouter) so gateway-style providers sit together near the top. - src/types/index.ts: add optional `modelsEndpoint` to Provider - src/lib/llm.ts: reorder OrcaRouter + set `modelsEndpoint: '/models'` - src/lib/providerModels.ts (new): fetch /v1/models with Bearer auth, filter chat-capable, group by id prefix, localStorage cache - src/pages/Agents/components/ProviderModelCombobox.tsx (new): Popover + Command combobox with provider list on the left, model list on the right, search filters the active provider's models, refresh button - src/pages/Agents/Models.tsx: state for fetched models, conditional render combobox vs input based on `modelsEndpoint`
Adds an optional `Provider.websiteUrl` field. When set, the BYOK card renders a "Visit <provider name>" link inline after the description. Only OrcaRouter opts in (https://www.orcarouter.ai); other existing providers are unchanged. Link text uses `item.name` so the field stays a generic primitive — future providers can opt in by adding the field with no copy changes.
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.
Related Issue
Closes #1631
Description
Adds OrcaRouter (https://www.orcarouter.ai) as a dedicated BYOK provider card in Agents → Models. OrcaRouter is an OpenAI-compatible LLM gateway that routes each request to the cheapest or fastest provider across many upstream providers.
Follows the existing alias pattern used by
ModelArk,grok,llama.cpp: provider idorcarouteris aliased toopenai-compatible-modelon the backend, so noModelPlatformType/ CAMEL changes are required.This PR additionally introduces two generic primitives on the
Providertype:modelsEndpoint— when set, the card renders a searchable model dropdown instead of a free-form text input.websiteUrl— when set, the card renders a small "Visit " link inline after the description.Only OrcaRouter opts in to both in this PR; all other existing providers (OpenAI, Anthropic, OpenRouter, …) are unchanged.
Files
backend/app/model/model_platform.py:PLATFORM_ALIAS_MAPPINGentry ("orcarouter": "openai-compatible-model").src/types/index.ts: add optionalmodelsEndpoint?: stringandwebsiteUrl?: stringto theProvidertype. Generic fields; no behavior change for existing providers.src/lib/llm.ts:INIT_PROVODERSentry with default base URLhttps://api.orcarouter.ai/v1,modelsEndpoint: '/models', andwebsiteUrl: 'https://www.orcarouter.ai'. Card is positioned immediately after Anthropic (above OpenRouter) so the two gateway-style providers sit together.src/assets/model/orcarouter.svg: official OrcaRouter brand logo.src/pages/Agents/Models.tsx: cloud-provider model fetch state, conditional render (Combobox whenmodelsEndpointis set, original Input otherwise), inline "Visit " link rendering, plus icon import / register ingetModelImage.src/lib/providerModels.ts(new):fetchProviderModels(Bearer-auth GET + filter chat-capable + group by id prefix) andlocalStoragecache helpers.src/pages/Agents/components/ProviderModelCombobox.tsx(new): Popover + Command-based combobox; left column lists upstream providers (<prefix>of<prefix>/<model>), right column shows that provider's models with search filter; refresh button next to the trigger.docs/core/models/byok.md: add row to Supported Providers table.Disclosure: I'm an engineer on the OrcaRouter team.
Testing Evidence (REQUIRED)
End-to-end tested locally (
node node_modules/vite/bin/vite.js):https://api.orcarouter.ai/v1API host.<provider>/<model>id.localStorage(keyed per provider id) without re-fetching; explicit refresh re-syncs.npm run type-checkandnpx eslintboth pass on the changed files; existing test files were not touched.Screenshot: drag the local Models-page screenshot into this section after opening the PR — GitHub will upload it to user-attachments automatically.
What is the purpose of this pull request?
Contribution Guidelines Acknowledgement