feat(llm): add OrcaRouter provider 🤖🤖🤖🤖 - #2756
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
Conversation
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.
Description
This adds a dedicated OrcaRouter provider to the
giskard-llmrouting layer, mirroring how the existing named providers (azure/,azure_ai/) are wired. A model string likeorcarouter/anthropic/claude-haiku-4.5now routes through the neworcarouterregistry entry tohttps://api.orcarouter.ai/v1using anORCAROUTER_API_KEY.Why a named provider rather than the generic OpenAI-compatible endpoint? Named providers are the established pattern in this library (
azure/,azure_ai/,google/,anthropic/), and named routers such asorcarouter/autopick an upstream per request, so the registry entry keeps model routing and error attribution consistent with the other named providers. OrcaRouter is an OpenAI-compatible gateway that exposes 150+ models from OpenAI, Anthropic, Google, DeepSeek, Qwen, MiniMax and xAI behind one API key, and it also provides gateway-level security controls for AI agents.Changes:
libs/giskard-llm/src/giskard/llm/providers/orcarouter.py—OrcaRouterProvider, anOpenAIProvidersubclass that defaultsbase_urltohttps://api.orcarouter.ai/v1and readsORCAROUTER_API_KEY(mirrors theAzureOpenAIProviderpattern).libs/giskard-llm/src/giskard/llm/routing.py— registerorcarouterin_PROVIDER_REGISTRY.libs/giskard-llm/README.md— add theorcarouter/row to the provider reference table.test_providers.py(transport config, env-key + endpoint defaults) andtest_routing.py(model-string parsing, unconfigured registry lookup).Verification:
uv run --directory libs/giskard-llm pytest tests -m "not functional"— 222 passed, 7 skipped.ruff check/ruff format --check— clean;basedpyright --level error— 0 errors.acompletion("orcarouter/openai/gpt-5.5", ...)andaembedding("orcarouter/openai/text-embedding-3-small", ...)againsthttps://api.orcarouter.ai/v1both returned HTTP 200.Related Issue
N/A
Type of Change
Coding agents
This PR was opened by an autonomous agent; per the repo's PR rules the title ends with the required
🤖🤖🤖🤖marker, and the author read AUTONOMOUS.md before opening it.Checklist
CODE_OF_CONDUCT.mddocument.CONTRIBUTING.mdguide.uv.lockrunninguv lock(only applicable whenpyproject.tomlhas been modified)I'm an engineer on the OrcaRouter team.