docs(models): add OrcaRouter OpenAI-compatible gateway example - #671
docs(models): add OrcaRouter OpenAI-compatible gateway example#671Marc-oss-hub wants to merge 1 commit into
Conversation
Add OrcaRouter as an OpenAI-compatible gateway configuration example in the Models docs page. OrcaRouter requires namespaced model IDs such as openai/gpt-5.5 and anthropic/claude-sonnet-4.6; orcarouter/auto is an adaptive router. The recommended models were verified to return reliable tool calls against the OrcaRouter API.
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89d57b8fdd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const pageAgent = new PageAgent({ | ||
| baseURL: 'https://api.orcarouter.ai/v1', | ||
| apiKey: 'sk-orca-...', | ||
| model: 'openai/gpt-5.5' // or 'anthropic/claude-sonnet-4.6', 'orcarouter/auto' |
There was a problem hiding this comment.
Do not recommend Claude through OrcaRouter without a patch
When users choose the documented anthropic/claude-sonnet-4.6 alternative, PageAgentCore always invokes the LLM with toolChoiceName: 'AgentOutput' (packages/core/src/PageAgentCore.ts:285-287), and modelPatch treats the OrcaRouter URL as a non-OpenRouter Claude provider, rewriting OpenAI tool_choice into Anthropic-native { type: 'tool', name: ... } (packages/llms/src/utils.ts:88-104). OrcaRouter's /v1/chat/completions docs describe OpenAI-compatible tools/tool_choice for this endpoint, so the copied configuration sends the wrong tool-choice shape for Claude and can fail before PageAgent gets a tool call; either omit this Claude alternative or document/fix the required request-body transform.
Useful? React with 👍 / 👎.
What
Add OrcaRouter as an OpenAI-compatible gateway configuration example in the Models docs page (
packages/website/src/pages/docs/features/models/page.tsx).OrcaRouter routes requests to upstream models from multiple providers (OpenAI, Anthropic, Google, and more) over a single OpenAI-compatible endpoint. It uses namespaced model IDs such as
openai/gpt-5.5andanthropic/claude-sonnet-4.6;orcarouter/autois an adaptive router that picks an upstream model per request.The recommended models were verified against the OrcaRouter API: requests using PageAgent's exact request shape (tools +
tool_choice,parallel_tool_calls, claude/gpt model patches) returned reliable tool calls foropenai/gpt-5.5,anthropic/claude-sonnet-4.6, andorcarouter/auto.Type
Testing
npm run typecheckpassesnpx eslint packages/website/src/pages/docs/features/models/page.tsxpassesnpm run build:websitepassesRequirements / 要求
I'm an engineer on the OrcaRouter team. This example documents the gateway's OpenAI-compatible configuration. No secrets are included — the API key is a placeholder (
sk-orca-...).