Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions docs-site/src/content/docs/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ The ChatGPT passthrough catalog also layers in the bare GPT-5.6 Sol/Terra/Luna s

## 2. Account login (OAuth)

Eight provider presets use OAuth login — plus GitHub Copilot via an experimental unofficial
Provider presets can use account login — including GitHub Copilot via an experimental unofficial
device-flow bridge. opencodex stores their credentials in
`~/.opencodex/auth.json` and refreshes them automatically. `chatgpt` is also accepted by the login
`~/.opencodex/auth.json`; refreshable tokens are refreshed automatically, while durable keys are
reused until the provider revokes them. `chatgpt` is also accepted by the login
CLI; it acquires a ChatGPT credential while creating a `forward`-mode provider entry.

```bash
Expand All @@ -109,6 +110,7 @@ ocx login kiro # import kiro-cli credentials (or token fallback)
ocx login google-antigravity
ocx login cursor # standalone Cursor PKCE login
ocx login command-code # Command Code browser OAuth (or import ~/.commandcode/auth.json)
ocx login orcarouter-oauth # OrcaRouter browser consent + PKCE
ocx login github-copilot # GitHub device flow → Copilot token (Copilot Pro/Business)
ocx login chatgpt # standalone ChatGPT OAuth login
ocx logout <provider>
Expand All @@ -123,6 +125,7 @@ ocx logout <provider>
| `kiro` | `kiro` | `https://runtime.us-east-1.kiro.dev` | Initial login imports the installed, signed-in `kiro-cli` session (on Unix, install with `curl -fsSL https://cli.kiro.dev/install` &#124; `bash`; on Windows PowerShell, use `irm 'https://cli.kiro.dev/install.ps1'` &#124; `iex`; then run `kiro-cli login`). **Add account** logs `kiro-cli` out, starts a fresh browser login that switches the account used by `kiro-cli`, and stores account-scoped profile metadata. Existing OpenCodex accounts are preserved, and cancellation or failure restores the previous `kiro-cli` session. |
| `google-antigravity` | `google` | `https://daily-cloudcode-pa.googleapis.com` | Google OAuth over the Cloud Code Assist wire. Live discovery uses CCA's authenticated `v1internal:fetchAvailableModels` endpoint and publishes the agent models available to the signed-in account; the maintained catalog remains the fallback. |
| `cursor` | `cursor` | `https://api2.cursor.sh` | Experimental PKCE login, live HTTP/2 transport with an opt-in HTTP/1.1 compatibility path, and account-filtered model discovery. |
| `orcarouter-oauth` | `openai-chat` | `https://api.orcarouter.ai/v1` | Browser consent and key exchange use `https://www.orcarouter.ai` with S256 PKCE. The returned user-owned `sk-orca-…` API key is stored in the existing credential store and reused until revoked. |
| `github-copilot` | `openai-chat` | `https://api.githubcopilot.com` | Experimental. GitHub device flow + `copilot_internal` exchange (VS Code OAuth client). Requires an active Copilot subscription; not an official third-party API. |

Google Antigravity account and provider quota probes use fixed Google accounting endpoints, including the models fallback. They support transparent Fake-IP DNS for those destinations while retaining TLS verification, redirect rejection and private-address checks. A custom provider base URL changes model requests, not quota destinations; `NO_PROXY` continues to select the direct-route policy.
Expand Down Expand Up @@ -352,6 +355,7 @@ free-experimentation model.
| Vultr Serverless Inference | `https://api.vultrinference.com/v1` |
| Baseten Model APIs | `https://inference.baseten.co/v1` |
| Command Code | `https://api.commandcode.ai/provider/v1` |
| OrcaRouter | `https://api.orcarouter.ai/v1` |
| Meta Model API | `https://api.meta.ai/v1` |
| Meta Muse Code (CLI credential) | `https://api.meta.ai/v1` |
| SambaNova Cloud | `https://api.sambanova.ai/v1` |
Expand Down Expand Up @@ -465,6 +469,31 @@ preset (`commandcode`) uses the active configured Bearer key for chat requests;
(`command-code`) uses the stored account bearer for authenticated discovery and chat. Create
Provider-API keys at [Command Code Studio](https://commandcode.ai/studio/).

**OrcaRouter authentication and discovery.** Choose either `ocx login orcarouter-oauth` for
one-click browser authorization or `ocx login orcarouter` to paste an existing API key. The PKCE
flow starts a loopback listener first, sends a fresh S256 challenge and state to
`https://www.orcarouter.ai/auth`, exchanges the single-use code at
`https://www.orcarouter.ai/api/v1/auth/keys`, and stores the returned user-owned key in
`~/.opencodex/auth.json`. The manual-key preset continues to use the normal provider key store.
Both modes route to `https://api.orcarouter.ai/v1` and discover the public live catalog with
`capability=chat`; non-chat media/rerank rows are excluded, and reported input modalities control
whether Codex offers image attachments. Because the catalog itself is public, manual key setup
reports validation as unknown instead of accepting that response as proof that the key works.

For a one-origin self-hosted deployment, set the shared origin before the first PKCE login; the saved
inference URL is derived from the same origin:

```bash
ORCAROUTER_BASE_URL=https://router.example ocx login orcarouter-oauth
```

For a split self-hosted deployment, set `ORCAROUTER_API_BASE_URL` and
`ORCAROUTER_AUTH_BASE_URL` separately.

The value must be an HTTPS origin (or HTTP loopback for local development) with no credentials,
query, or fragment. Re-run the login after a relay `401`; OrcaRouter keys are durable and do not
have a refresh-token grant.

**Meta Model API (`meta-model`).** Muse Spark on Meta's own OpenAI-compatible endpoint,
served over `/v1/responses`. Create a key in
[the Meta developer console](https://dev.meta.ai/docs/authentication) — Meta calls this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ files or a raw network capture.

### `ocx login <provider>`

Start the provider's registered login flow. OAuth providers open a browser and store auto-refreshed
credentials under `~/.opencodex/`; API-key login providers open their key dashboard, prompt for the
Start the provider's registered login flow. OAuth-style account providers open a browser and store
credentials under `~/.opencodex/` (refreshable tokens rotate automatically; durable key grants such
as OrcaRouter are reused until the provider revokes them); API-key login providers open their key dashboard, prompt for the
key, validate it when possible, and save the resulting provider config. The command prints the
currently accepted OAuth and API-key provider ids when the name is missing or unknown.

Expand All @@ -101,6 +102,8 @@ account pool (Reauthenticate) or the headless `ocx account reauth` flow instead.
```bash
ocx login xai
ocx login anthropic
ocx login orcarouter-oauth # browser consent + S256 PKCE
ocx login orcarouter # paste an existing API key
```

OAuth reauthentication preserves operator settings such as model selections, pricing overrides,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,13 @@ API-key providers may hold a literal key or an environment reference. OAuth prov
credential store populated by `ocx login`; subscription-backed Claude Code launch behavior is
configured under [`claudeCode.authMode`](/reference/configuration/server/#claude-code).

OrcaRouter exposes both forms explicitly: `orcarouter` is the manual API-key provider and
`orcarouter-oauth` runs browser consent with S256 PKCE, then stores the returned durable API key as
an account credential. The public defaults intentionally split authentication
(`https://www.orcarouter.ai`) from inference (`https://api.orcarouter.ai/v1`). Set
`ORCAROUTER_BASE_URL` before the first account login for a one-origin self-hosted deployment, or use
`ORCAROUTER_AUTH_BASE_URL` and `ORCAROUTER_API_BASE_URL` for separate origins.

## Provider diagnostic outbound safety

Dashboard connection tests and live model discovery use a bounded GET-only transport. Without an
Expand Down
29 changes: 27 additions & 2 deletions docs-site/src/content/docs/zh-cn/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ ChatGPT 透传目录也会加入 GPT-5.6 Sol/Terra/Luna 的裸 slug(`gpt-5.6-s

## 2. 账号登录(OAuth)

有八个提供商预设使用 OAuth 登录,另加通过实验性非官方设备流桥接的 GitHub Copilot。
opencodex 会把凭据存入 `~/.opencodex/auth.json` 并自动刷新。登录 CLI 也接受 `chatgpt`:
有九个提供商预设使用 OAuth 登录,另加通过实验性非官方设备流桥接的 GitHub Copilot。
opencodex 会把凭据存入 `~/.opencodex/auth.json`:可刷新的令牌会自动轮换;OrcaRouter
这类持久密钥会复用到提供商撤销为止。登录 CLI 也接受 `chatgpt`:
它会获取一份 ChatGPT 凭据,并创建一个 `forward` 模式的提供商条目。

```bash
Expand All @@ -88,6 +89,7 @@ ocx login kiro # 导入 kiro-cli 凭据(支持令牌回退)
ocx login google-antigravity
ocx login cursor # 独立的 Cursor PKCE 登录
ocx login command-code # Command Code 浏览器 OAuth(或导入 ~/.commandcode/auth.json)
ocx login orcarouter-oauth # OrcaRouter 浏览器授权 + PKCE
Comment thread
coderabbitai[bot] marked this conversation as resolved.
ocx login github-copilot # GitHub 设备流 → Copilot 令牌(Copilot Pro/Business)
ocx login chatgpt # 独立的 ChatGPT OAuth 登录
ocx logout <provider>
Expand All @@ -102,6 +104,7 @@ ocx logout <provider>
| `kiro` | `kiro` | `https://runtime.us-east-1.kiro.dev` | 首次登录会导入已安装并已登录的 Kiro CLI 会话(Unix 使用 `curl -fsSL https://cli.kiro.dev/install` &#124; `bash`;Windows PowerShell 使用 `irm 'https://cli.kiro.dev/install.ps1'` &#124; `iex`;然后运行 `kiro-cli login`)。**添加账户**会先退出 `kiro-cli`,再启动新的浏览器登录,从而切换 `kiro-cli` 自身使用的账户,并保存账户范围的配置文件元数据。现有 OpenCodex 账户会保留;如果取消或失败,则恢复之前的 `kiro-cli` 会话。 |
| `google-antigravity` | `google` | `https://daily-cloudcode-pa.googleapis.com` | 通过 Cloud Code Assist 协议使用 Google OAuth。实时发现调用已认证的 CCA `v1internal:fetchAvailableModels` 端点,并仅发布当前登录账户可用的 agent 模型;维护中的目录仍作为回退。 |
| `cursor` | `cursor` | `https://api2.cursor.sh` | 实验性 PKCE 登录、带可选 HTTP/1.1 兼容路径的 HTTP/2 传输,以及按账号筛选的模型发现。 |
| `orcarouter-oauth` | `openai-chat` | `https://api.orcarouter.ai/v1` | 浏览器授权与密钥交换走 `https://www.orcarouter.ai` + S256 PKCE。交换结果是用户自己的普通 `sk-orca-…` API key,保存在现有凭据库中并持续复用,直到被撤销。 |
| `github-copilot` | `openai-chat` | `https://api.githubcopilot.com` | 实验性。GitHub 设备流 + `copilot_internal` 交换(VS Code OAuth 客户端)。需要有效的 Copilot 订阅;不是官方第三方 API。 |

Google Antigravity 账户和提供方的配额查询(包括模型列表回退)使用固定的 Google 计量端点。这些目标支持透明 Fake-IP DNS,同时保留 TLS 验证、重定向拒绝和私有地址检查。自定义 base URL 仅改变模型请求,不改变配额目标;`NO_PROXY` 仍使用直连策略。
Expand Down Expand Up @@ -263,6 +266,28 @@ inference key 可从 [Vultr Console](https://my.vultr.com) 的订阅概览复制
`~/.commandcode/auth.json` 导入本地 CLI 凭据);模型目录按账户隔离,并在登录后从经过认证的发现
端点获取。聊天请求使用已配置的 bearer 密钥。密钥可在 [Command Code Studio](https://commandcode.ai/studio/) 创建。

**OrcaRouter 认证与模型发现:**可用 `ocx login orcarouter-oauth` 走浏览器一键授权,
也可用 `ocx login orcarouter` 粘贴已有 API key。PKCE 流程会先监听本机回环端口,为每次登录
生成新的 S256 challenge 和 state;授权页使用 `https://www.orcarouter.ai/auth`,并通过
`https://www.orcarouter.ai/api/v1/auth/keys` 交换一次性 code,再把返回的
用户自有 key 保存到 `~/.opencodex/auth.json`;手填 key 仍使用项目原有的 provider key 存储。
两种模式都访问 `https://api.orcarouter.ai/v1`,并使用 `capability=chat` 实时发现模型;图片生成、
视频和 rerank 条目会被排除,模型返回的 input modalities 决定 Codex 是否允许图片附件。
由于模型目录本身是公开的,手填 key 时会诚实显示“无法验证”,不会把公开目录的 200 响应误当成
密钥有效证明。

单域名自托管环境可在第一次 PKCE 登录前设置统一 origin;推理地址会从同一个 origin 派生:

```bash
ORCAROUTER_BASE_URL=https://router.example ocx login orcarouter-oauth
```

若自托管环境也分离登录域名与 API 域名,可分别设置 `ORCAROUTER_AUTH_BASE_URL` 和
`ORCAROUTER_API_BASE_URL`。

该值必须是 HTTPS origin(本地开发可使用 HTTP loopback),且不能包含用户名密码、query 或 fragment。
若 relay 返回 `401`,重新运行登录即可;OrcaRouter 签发的是长期 API key,不存在 refresh-token grant。

**Command Code 配额:**仪表盘和 `ocx account refresh` 会在规范主机 `https://api.commandcode.ai` 上探测 `/alpha/billing/credits` 窗口(5 小时和每周)。OAuth 预设 (`command-code`) 使用已保存的账户 bearer;Provider-API 密钥预设 (`commandcode`) 使用当前配置的有效密钥。用户改写后的仿冒 base URL 不会被探测。当 Command Code 同时返回周期消耗时,剩余的 monthly / purchased / free credits 会显示为 USD 窗口。

**SambaNova Cloud 发现:**该预设从固定 API 主机读取 SambaNova Cloud 的公开 `/v1/models` 列表,保留提供商原生
Expand Down
11 changes: 9 additions & 2 deletions gui/public/provider-icons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,18 @@ follow every upscaled pixel edge.

- `cerebras.svg`, `novita.svg`, `siliconflow.svg`, `deepinfra.svg` — single-ink.
- `baseten.svg`, `hyperbolic.svg`, `sambanova.svg`, `umans.svg`, `venice.svg`,
`vultr.svg`, `bizrouter.svg`, `orcarouter.svg` — colour-layered.
`vultr.svg`, `bizrouter.svg` — colour-layered.
- `nous.svg` — traced from `nousresearch.com/apple-touch-icon.png` (180x180). This
is the Nous Research company mark, distinct from `hermes-agent.svg`, which is
the Hermes product's own icon. Attributing one to the other would be wrong even
though the same organization ships both.
though the same organization ships both.

Published as a square raster mark and committed unmodified:

- `orcarouter.png` — fetched 2026-09-07 from
`https://www.orcarouter.ai/orca-logo-classic.png`, OrcaRouter's official classic
logo (535x533 indexed PNG; SHA-256
`96ed7062ed766e27bb6002f2831d6b54ec87f2371d4c4ab3bab27823a0b0fb07`).

Found on a docs subdomain after the vendor's marketing site offered only a
wordmark:
Expand Down
Binary file added gui/public/provider-icons/orcarouter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading