Skip to content

Add OrcaRouter provider-specific example scripts#1349

Open
xilema2 wants to merge 1 commit into
PrefectHQ:mainfrom
xilema2:add-orcarouter-examples
Open

Add OrcaRouter provider-specific example scripts#1349
xilema2 wants to merge 1 commit into
PrefectHQ:mainfrom
xilema2:add-orcarouter-examples

Conversation

@xilema2

@xilema2 xilema2 commented May 28, 2026

Copy link
Copy Markdown

Added three example scripts under examples/provider_specific/orcarouter, mirroring the structure of the existing aimlapi provider examples (#1243):

  • run_agent.py — agent execution with file-writing tool, using OrcaRouter's orcarouter/auto smart router
  • structured_output.py — structured JSON output via result_type (openai/gpt-5)
  • tools_agent.py — multi-tool agent (openai/gpt-5)

OrcaRouter (https://www.orcarouter.ai) exposes an OpenAI-compatible API at https://api.orcarouter.ai/v1, so it plugs into marvin through pydantic-ai's OpenAIProvider(base_url=...) with no changes to marvin internals.

Set ORCAROUTER_API_KEY before running:

ORCAROUTER_API_KEY=your-api-key uv run examples/provider_specific/orcarouter/run_agent.py

Disclosure: I'm an engineer on the OrcaRouter team.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant