Skip to content

docs(models): add OrcaRouter OpenAI-compatible gateway example - #671

Open
Marc-oss-hub wants to merge 1 commit into
alibaba:mainfrom
Marc-oss-hub:docs/orcarouter-gateway-example
Open

docs(models): add OrcaRouter OpenAI-compatible gateway example#671
Marc-oss-hub wants to merge 1 commit into
alibaba:mainfrom
Marc-oss-hub:docs/orcarouter-gateway-example

Conversation

@Marc-oss-hub

Copy link
Copy Markdown

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.5 and anthropic/claude-sonnet-4.6; orcarouter/auto is 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 for openai/gpt-5.5, anthropic/claude-sonnet-4.6, and orcarouter/auto.

Type

  • Breaking change
  • Bug fix
  • Feature / Improvement
  • Refactor / Chores
  • Documentation / Website / Demo / Testing

Testing

  • npm run typecheck passes
  • npx eslint packages/website/src/pages/docs/features/models/page.tsx passes
  • npm run build:website passes
  • Tested in modern browsers
  • Types/doc added

Requirements / 要求

  • I have read and follow the Code of Conduct and Contributing Guide . / 我已阅读并遵守行为准则。
  • This PR is NOT generated by a bot or AI agent acting autonomously. I have authored or meaningfully reviewed every change. / 此 PR 不是由 bot 或 AI 自主生成的,我已亲自编写或充分审查了每一处变更。

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-...).

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.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

2 participants