feat: add OrcaRouter as a named AI provider - #231
Open
Marc-oss-hub wants to merge 1 commit into
Open
Conversation
Adds OrcaRouter as a first-class provider alongside OpenRouter, Ollama and OpenAI-compatible. OrcaRouter is an OpenAI-compatible model routing gateway serving 150+ models from a single endpoint and API key. - Add ProviderType::OrcaRouter and orcarouter_* settings (api key, llm, agentic, embedding model, context length, timeout) - Back the provider with the shared OpenAI-compatible transport pinned to https://api.orcarouter.ai/v1 with OrcaRouter-valid default models - Add POST /api/settings/test-orcarouter for key validation against the gateway's /v1/models endpoint - Wire the provider into Settings UI (dropdown, key entry, model config, connection test) and document it in the AI providers guide 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.
Summary
Adds OrcaRouter as a named provider, mirroring the existing OpenRouter and OpenAI-compatible integrations. OrcaRouter is an OpenAI-compatible model routing gateway that exposes 150+ models from OpenAI, Anthropic, Google, DeepSeek, Qwen and others behind a single endpoint (
https://api.orcarouter.ai/v1) and one API key, using fully-namespaced model ids (e.g.openai/gpt-5-nano,openai/text-embedding-3-small). 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.Changes
crates/atomic-core/src/providers/mod.rs— newProviderType::OrcaRoutervariant andorcarouter_*config fields (api key, llm / agentic / embedding model, context length, timeout). The provider reuses the shared OpenAI-compatible transport pinned tohttps://api.orcarouter.ai/v1, with OrcaRouter-valid defaults (openai/text-embedding-3-smallat 1536 dims for embeddings,openai/gpt-5-nanofor LLM tasks).crates/atomic-core/src/settings.rs— registersorcarouter_api_keyas a workspace-only credential,orcarouter_embedding_modelas an embedding-space key, and seeds the new defaults.crates/atomic-core/src/agent.rs,src/lib.rs,src/reports/agentic.rs— resolve models for chat, wiki, tagging, and reports through the new provider.crates/atomic-cloud/src/tenant_plane.rs— validates OrcaRouter keys against the gateway's/v1/modelsendpoint for BYOK entry.crates/atomic-server/src/routes/settings.rs— newPOST /api/settings/test-orcarouterconnection-test endpoint (key checked against/v1/models, no credits spent).src/components/settings/SettingsModal.tsx— OrcaRouter option in the provider dropdown, API key entry with inline connection test, and model configuration.src/lib/api.ts,src/lib/transport/command-map.ts,src/stores/settings.ts,src/lib/settings.ts— frontend plumbing for the new setting and test endpoint.docs/manual/getting-started/ai-providers.md— OrcaRouter section and defaults table.Why a named provider rather than the OpenAI-compatible escape hatch
This mirrors how OpenRouter is wired in this repo: a named provider with its own API-key setting, connection test, and model defaults. A generic
openai_compatentry would require the user to hand-enterhttps://api.orcarouter.ai/v1plus the exact namespaced model ids every time; the dedicated provider sets those up by default and keeps the Settings UI consistent with the other providers.How to use it
sk-orca-).openai/text-embedding-3-small,openai/gpt-5-nano) work out of the box; any catalog model id can be entered.Verification
cargo test -p atomic-core --lib providers::— 86 passed, 0 failed.cargo check -p atomic-core -p atomic-cloud -p atomic-serverclean;tsc --noEmitclean.GET https://api.orcarouter.ai/v1/modelswith a realsk-orca-key returns 200; both default model ids (openai/text-embedding-3-small,openai/gpt-5-nano) are present in the catalog.I'm an engineer on the OrcaRouter team.