Skip to content

feat(providers): add OrcaRouter as a named model provider - #579

Open
XiaoHuo888-hue wants to merge 1 commit into
strands-agents:mainfrom
XiaoHuo888-hue:add-orcarouter-provider
Open

feat(providers): add OrcaRouter as a named model provider#579
XiaoHuo888-hue wants to merge 1 commit into
strands-agents:mainfrom
XiaoHuo888-hue:add-orcarouter-provider

Conversation

@XiaoHuo888-hue

Copy link
Copy Markdown

Description

Add OrcaRouter as a named model provider in strands_tools. OrcaRouter is an OpenAI-compatible model gateway: point any OpenAI-compatible client at https://api.orcarouter.ai/v1 with an sk-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_provider in use_agent, think, and workflow, mirroring the existing github / cohere provider pattern (an OpenAI-compatible provider resolved through strands.models.openai.OpenAIModel with a fixed base_url).

Registration points:

  • utils/models/model.pycreate_model() dispatch, get_provider_config() (ORCAROUTER_API_KEY / ORCAROUTER_BASE_URL defaulting to https://api.orcarouter.ai/v1, default model orcarouter/auto), get_available_providers(), and get_provider_info()
  • utils/models/__init__.py__all__ export
  • use_agent.py, think.py, workflow.py — provider docstrings
  • README.md — env var table row + usage example
  • tests/test_model.py (new) and the providers list in tests/test_use_agent.py

Related Issues

None.

Documentation PR

None (README updated in this PR).

Type of Change

Please note that we are not accepting new tools into this repository. Instead, we recommend using our extension template to publish your own tool package and get it featured in our community catalog.

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 existing github and cohere providers.

Other (please describe): new named model provider for the existing provider registry

Testing

  • ruff check and ruff format --check on all changed files: pass

  • pytest 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_providers with orcarouter)

  • pytest tests/test_think.py tests/test_workflow.py: 48 passed

  • Live integration: exercised create_model("orcarouter") against the real OrcaRouter endpoint (https://api.orcarouter.ai/v1, model orcarouter/auto) with a real API key — request succeeded and returned ORCA-LIVE-OK.

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

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.

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
XiaoHuo888-hue requested a review from a team as a code owner August 23, 2026 02:46
@yonib05

yonib05 commented Aug 24, 2026

Copy link
Copy Markdown
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

@yonib05 yonib05 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs PR in the main Repo

@mehtarac mehtarac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @yonib05! Would to redirect the PR be opened up in the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants