feat(llm): add OrcaRouter provider support - #927
Conversation
Add a named OrcaRouter provider for fast-agent, an OpenAI-compatible model routing gateway. Model ids are namespaced by upstream provider (e.g. orcarouter.openai/gpt-4o-mini, orcarouter.orcarouter/auto). - Provider enum member, factory mapping, config settings, picker entry, and check_config catalog scope - New OrcaRouterLLM provider class defaulting to openai/gpt-4o-mini and namespacing bare model ids (orcarouter/auto) so the gateway can route - Docs quick-reference row plus an OrcaRouter section in the additional providers guide, with a note about tool calling and the auto router - Unit tests for default models, base URL precedence, model-string parsing, catalog entries, and check_config output Co-Authored-By: Claude <noreply@anthropic.com>
|
Ran this rather than read it: Windows 11, CPython 3.14.7, One thing worth settling before merge. what a user types, what gets sentThe tests cover Smaller one: the picker ships No regressions in the targeted subset. The failing set is identical, not just the count, and all subset run, PR vs base, same machine and sessionKey wiring needs no map entry, so leaving |
This registers OrcaRouter the same way the existing OpenRouter provider is wired, so the model picker, config reference and docs stay consistent. OrcaRouter is an OpenAI-compatible gateway: one
ORCAROUTER_API_KEY(keys start withsk-orca-) unlocks 150+ models from OpenAI, Anthropic, Google, DeepSeek, Qwen, MiniMax and xAI behind a singlehttps://api.orcarouter.ai/v1endpoint. 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.I'm an engineer on the OrcaRouter team.
Changes
Provider.ORCAROUTERenum member,_PROVIDER_CLASS_PATHSfactory mapping,OrcaRouterSettings,check_configcatalog scope, and picker entry, mirroring the existing OpenRouter wiringOrcaRouterLLMprovider class: defaults toopenai/gpt-4o-miniand namespaces bare model ids (auto→orcarouter/auto) so the gateway can route themllm_providers.md, an OrcaRouter section in the additional providers guide, and a provider stub pagecheck_configoutputVerification
python scripts/lint.py— passedpython scripts/format.py --check— passedpython scripts/typecheck.py— no new diagnostics (only pre-existing diagnostics in unrelated files)uv build— succeededmain(prompt_toolkit console, Windows file-permission, and websocket-timing tests)https://api.orcarouter.ai/v1with a real key:orcarouter.openai/gpt-4o-miniparsed to the OrcaRouter provider, resolved toOrcaRouterLLM, and the gateway returned the expected reply