feat: add OrcaRouter as a named LLM provider - #998
Open
JinhaoSong322 wants to merge 1 commit into
Open
Conversation
Register OrcaRouter in the backend provider registry and the frontend fallback provider list, pointing at https://api.orcarouter.ai/v1 with an openai-compatible protocol. Add registry tests. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: JinhaoSong322 <jinhao.song@myflashcloud.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
Add OrcaRouter as a first-class, named LLM provider.
OrcaRouter is an OpenAI-compatible LLM gateway (
https://api.orcarouter.ai/v1, keys prefixedsk-orca-) that routes to leading models behind one endpoint. 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.This change mirrors the existing
openrouterwiring:backend/app/services/llm/client.py— registerorcarouterinPROVIDER_REGISTRY(openai-compatible protocol,default_base_url=https://api.orcarouter.ai/v1,supports_tool_choice=True,default_max_tokens=16384).frontend/src/pages/enterprise-settings/tabs/LlmTab.tsx— addorcaroutertoFALLBACK_LLM_PROVIDERSso it appears in the Enterprise → LLM provider picker (the live/enterprise/llm-providersendpoint serves the same registry).backend/tests/test_orcarouter_provider.py— new tests pinning the registry entry, manifest round-trip, base-url resolution, and client creation.README.md— document the OrcaRouter provider.No database migration is needed: provider ids are stored as strings and the registry is the single source of truth for base URL / protocol.
Checklist
Verification
pytest tests/test_orcarouter_provider.py→ 4 passed; full suite → 2177 passed, 2 pre-existinghtml_to_pdfenv failures (missinglibgobject-2.0-0) + 1 pre-existingtest_sso_togglecollection error (missingtests.test_auth), both present on cleanmain.tsc --noEmit→ clean; existing 8 test failures are pre-existing onmain.create_llm_client(provider="orcarouter", ...)againsthttps://api.orcarouter.ai/v1/chat/completions→ HTTP 200, modelorcarouter/auto→qwen3.6-flash, returnedORCA-OK; streaming SSE path also returns 200.Disclosure: I'm an engineer on the OrcaRouter team.