feat(providers): add OrcaRouter as a named model provider - #579
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
feat(providers): add OrcaRouter as a named model provider#579XiaoHuo888-hue wants to merge 1 commit into
XiaoHuo888-hue wants to merge 1 commit into
Conversation
Add OrcaRouter to the model provider registry as an OpenAI-compatible gateway, mirroring the existing github/cohere providers. It resolves to the OrcaRouter endpoint (https://api.orcarouter.ai/v1) with the orcarouter/auto model by default, configurable via ORCAROUTER_API_KEY and ORCAROUTER_BASE_URL. Registration points: - create_model() dispatch -> strands.models.openai.OpenAIModel - get_provider_config() -> ORCAROUTER_API_KEY / ORCAROUTER_BASE_URL / STRANDS_MODEL_ID - get_available_providers() and get_provider_info() -> orcarouter entry - utils/models/__init__.py __all__ -> orcarouter - docstrings in use_agent/think/workflow, README env table + example - tests/test_model.py (new) and providers list in test_use_agent.py Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: XiaoHuo888-hue <jinhao.song@myflashcloud.com>
XiaoHuo888-hue
requested a deployment
to
manual-approval
August 23, 2026 02:46 — with
GitHub Actions
Waiting
Member
|
Hey @XiaoHuo888-hue, I think a better contribution would be adding Orcarouter as an entry in our docs site; This PR is a good example: https://github.com/strands-agents/harness-sdk/pull/3829/changes How it would look on the site: https://strandsagents.com/integrations/?q=openr&entry=openrouter |
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
Add OrcaRouter as a named model provider in
strands_tools. OrcaRouter is an OpenAI-compatible model gateway: point any OpenAI-compatible client athttps://api.orcarouter.ai/v1with ansk-orca-key and route to a broad catalog of models. 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 makes OrcaRouter a first-class
model_providerinuse_agent,think, andworkflow, mirroring the existinggithub/cohereprovider pattern (an OpenAI-compatible provider resolved throughstrands.models.openai.OpenAIModelwith a fixedbase_url).Registration points:
utils/models/model.py—create_model()dispatch,get_provider_config()(ORCAROUTER_API_KEY/ORCAROUTER_BASE_URLdefaulting tohttps://api.orcarouter.ai/v1, default modelorcarouter/auto),get_available_providers(), andget_provider_info()utils/models/__init__.py—__all__exportuse_agent.py,think.py,workflow.py— provider docstringsREADME.md— env var table row + usage exampletests/test_model.py(new) and the providers list intests/test_use_agent.pyRelated Issues
None.
Documentation PR
None (README updated in this PR).
Type of Change
This is not a new tool — it is an additional model provider entry in the existing model-provider registry used by
use_agent/think/workflow, following the exact pattern of the existinggithubandcohereproviders.Other (please describe): new named model provider for the existing provider registry
Testing
ruff checkandruff format --checkon all changed files: passpytest tests/test_model.py: 5 passed (new OrcaRouter provider tests)pytest tests/test_use_agent.py: 15 passed (incl.test_use_agent_with_all_model_providerswithorcarouter)pytest tests/test_think.py tests/test_workflow.py: 48 passedLive integration: exercised
create_model("orcarouter")against the real OrcaRouter endpoint (https://api.orcarouter.ai/v1, modelorcarouter/auto) with a real API key — request succeeded and returnedORCA-LIVE-OK.I ran
hatch run prepareChecklist
Disclosure: I'm an engineer on the OrcaRouter team.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.