feat: add OrcaRouter as a named LLM provider (OpenAI-compatible gateway) - #141
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
feat: add OrcaRouter as a named LLM provider (OpenAI-compatible gateway)#141XiaoHuo888-hue wants to merge 1 commit into
XiaoHuo888-hue wants to merge 1 commit into
Conversation
Add OrcaRouter (OpenAI-compatible model routing gateway) as a named LLM provider alongside OpenRouter. Wires the generator, interactive wizard, generated backend (pydantic_ai + pydantic_deep), RAG embedding auto-derivation, env/docs, and tests. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: XiaoHuo888 <sjh00112233@outlook.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 model provider. OrcaRouter is an OpenAI-compatible model routing gateway that exposes 150+ models from OpenAI, Anthropic, Google, DeepSeek, Qwen, MiniMax, xAI and others behind a single endpoint and API key. It also provides gateway-level security controls for AI agents.
I'm an engineer on the OrcaRouter team.
Changes
fastapi_gen/): newLLMProviderType.ORCAROUTERenum value anduse_orcaroutercookiecutter flag (single-provider orall). OrcaRouter is accepted only forpydantic_ai/pydantic_deep(same constraint as OpenRouter). RAG embeddings auto-derive to sentence-transformers because OrcaRouter exposes chat/completions but not an embeddings endpoint.prompt_llm_provideroffers "OrcaRouter (model routing)" for PydanticAI / PydanticDeep;--llm-provider orcarouteradded to the CLI.core/config.py—ORCAROUTER_API_KEY, defaultAI_MODEL=anthropic/claude-sonnet-4.6, and anAI_AVAILABLE_MODELSlist (catalog-verified IDs).agents/assistant.py— OrcaRouter dispatch throughOpenAIResponsesModel+OpenAIProvider(base_url="https://api.orcarouter.ai/v1"), mirroring how OpenRouter is wired.agents/pydantic_deep_assistant.py— same model-object wiring for the PydanticDeep agent (a model string would resolve to the OpenAI endpoint instead).api/routes/v1/health.py— OrcaRouter included in the readiness LLM key map.backend/pyproject.toml— OrcaRouter usespydantic-ai-slim[openai,duckduckgo,web-fetch](OpenAI-compatible transport).ORCAROUTER_API_KEYin.env.example,ENV_VARS.md,kubernetes/secret.yaml,MANUAL_STEPS.md, anddocs/configuration.md.README.md,AGENTS.md,CLAUDE.md,docs/index.md,docs/guides/configuration.md,docs/rag.md, andtemplate/VARIABLES.md.Testing
pytest tests/test_config.py tests/test_prompts.py tests/test_rag_config.py— 205 passed, 0 failurespytest tests/test_rag_integration.py::TestRAGWithEmbeddingProviders— 4 passedruff check fastapi_gen testsandruff checkon three freshly generated OrcaRouter projects (pydantic_ai, pydantic_deep, all-providers) — cleanOpenAIResponsesModel+OpenAIProvider(base_url=https://api.orcarouter.ai/v1)code path:anthropic/claude-sonnet-4.6(default) → 200PONGorcarouter/auto→ 200PONGopenai/gpt-4o→ 200PONGtest_template_integration.pymatrix — the[orcarouter]instances generate and render cleanly; the ruff/ty checks in that module invokeuvx/uv, which are unavailable on this Windows box. The failure count there is 61 on this branch vs 59 on pristinemain— the +2 are exactly the addedorcarouterparametrization, failing for the sameuvx/uvnot-found reason as every other matrix config onmain. No config that passes onmainfails on this branch.ty check) — requiresuv, not run locallyRelated Issues
N/A
Notes for Reviewers
OrcaRouter is OpenAI-compatible, so the transport is
OpenAIResponsesModelpointed athttps://api.orcarouter.ai/v1rather than a dedicated model class. Model IDs inAI_AVAILABLE_MODELSwere checked against the live/v1/modelscatalog (189 models). Embeddings are intentionally not wired: the OrcaRouter/embeddingsendpoint returns 403, so RAG defaults to local sentence-transformers for this provider.