feat: add OrcaRouter support for language models#3680
Open
xilema2 wants to merge 1 commit into
Open
Conversation
Add OrcaRouter (https://www.orcarouter.ai) as a new LLM supplier alongside the existing OpenAI / Anthropic / Mistral / Gemini / Groq providers. OrcaRouter is an OpenAI-compatible multi-vendor routing gateway: clients talk to a single endpoint with one API key and OrcaRouter routes each request to the appropriate upstream (or to a configurable router policy via the synthetic 'orcarouter/auto' model). - Add ORCAROUTER value to DefaultModelSuppliers. - Register eight flagship model entries in LLMModelConfig._model_defaults (auto router + one flagship per vendor). Any other OrcaRouter model ID is still accepted as a free-form string. - Wire up an ORCAROUTER branch in LLMEndpoint.from_config that uses ChatOpenAI against https://api.orcarouter.ai/v1 (overridable via llm_base_url). Reasoning models (claude-opus-4.7, gpt-5*, deepseek-reasoner) reject 'temperature' upstream, so it is passed as None for those. - Have LLMEndpoint.info() report the resolved base URL via a small _effective_base_url helper, so diagnostics show the real endpoint instead of the generic 'openai' placeholder. - Add unit tests covering: default base URL, reasoning-model temperature drop, custom base URL override, info() base URL reporting, env var resolution (ORCAROUTER_API_KEY), and non-mutation of the caller's config inside from_config.
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.
PR Description
Disclosure
I'm an engineer on the OrcaRouter team. Happy to iterate on naming, model
list, or default budgets — just let me know what fits Quivr's conventions
best.
Checklist before requesting a review
Summary by cubic
Add OrcaRouter as a new LLM supplier, enabling OpenAI-compatible routing to 150+ models through a single endpoint and a synthetic
orcarouter/autorouter. This adds default model configs, a default base URL, and small behavior tweaks for reasoning models.ORCAROUTERtoDefaultModelSuppliers.orcarouter/autoand vendor flagships); other OrcaRouter IDs still work with generic defaults.ChatOpenAItargetinghttps://api.orcarouter.ai/v1by default (override withllm_base_url); setstemperature=Nonefor reasoning models likeanthropic/claude-opus-4.7,openai/gpt-5*, anddeepseek-reasoner.info()now reports the resolved base URL using_effective_base_url.ORCAROUTER_API_KEYand avoids mutating the caller’s config infrom_config.Written for commit dc0a6f5. Summary will update on new commits. Review in cubic