Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ocx init

`ocx init` vous accompagne dans les étapes suivantes :

1. **Choix d’un fournisseur** — sélectionnez l’un des 97 préréglages intégrés au registre, ou `custom` pour saisir une
1. **Choix d’un fournisseur** — sélectionnez l’un des 98 préréglages intégrés au registre, ou `custom` pour saisir une
URL de base et un adaptateur.
2. **Clé API** — collez une clé ou référencez une variable d’environnement telle que `${ANTHROPIC_API_KEY}`.
3. **Modèle par défaut** — pour les fournisseurs clés, locaux et personnalisés, acceptez le préréglage ou saisissez un identifiant de modèle.
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/fr/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ existante n'est pas concernée.

## 3. Catalogue des clés API

opencodex fournit 97 préréglages intégrés : 80 à clé, 13 OAuth, trois locaux et un préréglage par défaut de
opencodex fournit 98 préréglages intégrés : 81 à clé, 13 OAuth, trois locaux et un préréglage par défaut de
transfert ChatGPT. Dans le tableau de bord, le sélecteur **Ajouter un fournisseur** ouvre le tableau de bord du
fournisseur à clé, valide la clé et l'enregistre ; la validation dépend du fournisseur. Parmi les entrées notables :

Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ocx init

`ocx init` walks you through:

1. **Pick a provider** — choose one of the 97 built-in registry presets or `custom` to type a base
1. **Pick a provider** — choose one of the 98 built-in registry presets or `custom` to type a base
URL and adapter.
2. **API key** — paste a key, or reference an environment variable like `${ANTHROPIC_API_KEY}`.
3. **Default model** — for key, local, and custom providers, accept the preset or enter a model id.
Expand Down
59 changes: 58 additions & 1 deletion docs-site/src/content/docs/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ selectors, then retry. Signing in from a machine with no existing `kiro-cli` ses

## 3. API-key catalog

opencodex ships 97 built-in presets: 80 key-based, 13 OAuth, three local, and one default
opencodex ships 98 built-in presets: 81 key-based, 13 OAuth, three local, and one default
ChatGPT-forward preset. The dashboard's **Add provider** picker opens a key provider's dashboard,
validates the key, and stores it; validation is provider-specific. Notable entries:

Expand Down Expand Up @@ -912,6 +912,63 @@ OpenCodex provides official adapter support for Qoder through the `qoder` (Globa
- **Quota:** No public quota API is used, so totals and reset times are unavailable. Insufficient-credit errors (vendor code 118) surface as HTTP 429 `insufficient_quota`.
- **Operators:** Qoder Global is operated by BRIGHT ZENITH PRIVATE LIMITED under the [product service terms](https://qoder.com/product-service); Qoder CN by 通义云启(杭州)信息技术有限公司 with Alibaba Cloud. Verify `ocx provider test qoder` (or `qoder-cn`) after configuring.

### Claude Code CLI (subscription)

OpenCodex can spend a Claude subscription through Anthropic's own harness instead of replaying a
Claude Code identity against the Messages API. The `claude-cli` preset runs the official Claude Code
CLI headlessly (`claude -p`, `stream-json`) once per turn:

```json
{
"providers": {
"claude-cli": {
"adapter": "claude-cli",
"baseUrl": "https://api.anthropic.com"
}
}
}
```

- **Prerequisites:** `npm install -g @anthropic-ai/claude-code`, then sign in once with `claude`
(or `claude setup-token`). The CLI uses the machine's own Claude Code sign-in (the macOS Keychain
entry, or `~/.claude/.credentials.json` elsewhere).
- **No credential stored:** this row holds no API key, and OpenCodex never reads, copies or forwards
a Claude token. The CLI owns the login and bills the account itself. A CLI that is not signed in
fails the turn with a sign-in error naming the command, instead of a generic `401`.
Classification follows the same fact: the preset is a keyless key row (`keyOptional`), so it needs
no API key and no key field is offered for it. An API key saved on this row by other means is never
handed to the harness — key billing belongs to the `anthropic-apikey` preset.
- **One sign-in serves the whole proxy:** the harness reads the Claude Code sign-in of the user
OpenCodex runs as, so every request routed through this row — from any client of the proxy —
spends that one Claude account. There is no per-client account, no pooling and no multiplexing;
giving several people their own Claude usage needs one proxy user per sign-in.
- **Input media:** the row publishes its models as text-only for v1. The CLI accepts an image frame
on its stream-json input, but no headless turn has been shown to hand those bytes to the model, so
an image sent straight to this provider is refused (`unsupported_input_modality`, the same
refusal the Qoder presets make) instead of being silently dropped and answered blind. With the
vision sidecar on the request path, images are captioned into text before they reach the row.
- **Isolation:** every turn runs in a scoped child environment with no inherited `ANTHROPIC_*`
variable (a `claude` already pointed at this proxy therefore cannot loop back into it), telemetry,
feedback and the auto-updater disabled, and `--tools ""`, `--strict-mcp-config` plus
`--setting-sources ""`. The harness loads no CLAUDE.md, skill, hook, plugin or MCP server from the
machine and can neither read, write, exec nor browse. No session is persisted between turns.
- **System prompt:** the caller's system and developer prompts replace the Claude Code preset
(`--system-prompt-file`), so the turn answers the client's contract rather than the harness
persona. The folded prompt is staged in a private per-turn file (mode `0600`) and passed by path,
because process arguments are world-readable through process listing; a request that carries
neither a system nor a developer prompt gets an empty file, which replaces the preset with nothing.
- **Tool ownership:** v1 is text and reasoning only, exactly like the CodeBuddy and Qoder presets:
with no tool channel, approval, sandboxing and execution stay with the client. The shared
capture-only tool bridge is the documented follow-up.
- **Destination:** the canonical row names `https://api.anthropic.com` because that is where the
subscription's traffic lands. OpenCodex never sends that request itself, and overriding the base
URL fails closed rather than handing the turn to another environment.

> **Terms:** this preset spends your Claude subscription through Anthropic's own CLI. Whether
> driving that harness headlessly from a proxy fits your plan's terms is a question between you and
> Anthropic. OpenCodex does not convert the login into an API key and does not reproduce the CLI's
> HTTP identity.

### A6API credit quota

A custom `openai-chat` provider using `authMode: "key"` and the canonical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ocx init

`ocx init` では次の手順を説明します。

1. **プロバイダーを選択してください** — 97 個の組み込みレジストリプリセットのいずれか、または `custom` を選択してベース URL とアダプターを入力します。
1. **プロバイダーを選択してください** — 98 個の組み込みレジストリプリセットのいずれか、または `custom` を選択してベース URL とアダプターを入力します。
2. **API キー** — キーを貼り付けるか、`${ANTHROPIC_API_KEY}` のような環境変数を参照します。
3. **デフォルト モデル** — キー、ローカル、カスタム プロバイダーの場合は、プリセットを受け入れるか、モデル ID を入力します。
4. **プロキシ ポート** — デフォルトは `10100` です。
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/ja/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Kiro のログインには Kiro CLI が必要です。Unix では `curl -fsSL ht

## 3. API キーカタログ

opencodex には組み込みプリセットが 97 個含まれています。キー方式 80、OAuth 13、ローカル 3、
opencodex には組み込みプリセットが 98 個含まれています。キー方式 81、OAuth 13、ローカル 3、
デフォルト ChatGPT 転送プリセット 1 です。ダッシュボードの **Add provider** ピッカーはキー発行ページを開き、
入力したキーを検証した後保存します(検証はプロバイダー固有です)。主な項目は以下のとおりです:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ocx init

`ocx init`은 다음 과정을 안내합니다:

1. **프로바이더 선택** — 내장 레지스트리 프리셋 97개 중 하나를 고르거나 `custom`을 선택해 base URL과 adapter를 직접 입력합니다.
1. **프로바이더 선택** — 내장 레지스트리 프리셋 98개 중 하나를 고르거나 `custom`을 선택해 base URL과 adapter를 직접 입력합니다.
2. **API 키** — 키를 붙여넣거나 `${ANTHROPIC_API_KEY}` 같은 환경 변수를 참조합니다.
3. **기본 모델** — 키, 로컬, custom 프로바이더에서는 프리셋을 그대로 쓰거나 모델 ID를 직접 입력합니다.
4. **프록시 포트** — 기본값은 `10100`입니다.
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/ko/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Kiro 로그인에는 Kiro CLI가 필요합니다. Unix에서는 `curl -fsSL http

## 3. API 키 카탈로그

opencodex에는 빌트인 프리셋이 97개 들어 있습니다. 키 방식 80개, OAuth 13개, 로컬 3개,
opencodex에는 빌트인 프리셋이 98개 들어 있습니다. 키 방식 81개, OAuth 13개, 로컬 3개,
기본 ChatGPT 포워드 프리셋 1개입니다. 대시보드의 **Add provider** 선택기는 키 발급 페이지를 열고,
입력한 키를 검증한 뒤 저장합니다(검증은 프로바이더별로 다릅니다). 주요 항목은 다음과 같습니다:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Providers can expose a built-in shorthand, such as `agy` for `google-antigravity

| Field | Type | Meaning |
| --- | --- | --- |
| `adapter` | `string` | One of `openai-chat`, `openai-responses`, `anthropic`, `google`, `kiro`, `cursor`, `ollama-native`, `azure-openai` (or alias `azure`), `codebuddy`, `qoder`. |
| `adapter` | `string` | One of `openai-chat`, `openai-responses`, `anthropic`, `claude-cli`, `google`, `kiro`, `cursor`, `ollama-native`, `azure-openai` (or alias `azure`), `codebuddy`, `qoder`. |
| `baseUrl` | `string` | Upstream API base URL. Most built-in fixed endpoints ignore a mismatch; collision-safe key presets preserve an older same-named custom destination. |
| `proxy?` | `string \| null` | Per-provider egress route. Omit it to inherit the global proxy decision; use `"direct"` or `null` to force direct egress; or provide an absolute `http://`, `https://`, `socks5://`, or `socks5h://` proxy URL. An empty string is rejected. |
| `noProxy?` | `string \| string[]` | Destinations this provider reaches directly, using `NO_PROXY` host-pattern syntax. A match bypasses both this provider's own proxy and an inherited global proxy. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ocx init

`ocx init` проведёт вас по следующим шагам:

1. **Выбор провайдера** — выберите один из 97 встроенных пресетов реестра или `custom`, чтобы
1. **Выбор провайдера** — выберите один из 98 встроенных пресетов реестра или `custom`, чтобы
ввести базовый URL и адаптер вручную.
2. **API-ключ** — вставьте ключ или сошлитесь на переменную окружения вида `${ANTHROPIC_API_KEY}`.
3. **Модель по умолчанию** — для провайдеров с ключом, локальных и `custom` примите значение из
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/ru/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Inline JSON и лишние позиционные аргументы откло

## 3. Каталог API-ключей

opencodex поставляется с 97 встроенными пресетами: 80 на основе ключей, 13 OAuth, три локальных и
opencodex поставляется с 98 встроенными пресетами: 81 на основе ключей, 13 OAuth, три локальных и
один пресет ChatGPT-форварда по умолчанию. Селектор **Add provider** в дашборде открывает страницу
выдачи ключей провайдера, проверяет ключ и сохраняет его; проверка зависит от провайдера.
Наиболее заметные записи:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ocx init

`ocx init` adım adım size rehberlik eder:

1. **Bir sağlayıcı seçin** — yerleşik kayıt defterindeki 97 önayardan birini
1. **Bir sağlayıcı seçin** — yerleşik kayıt defterindeki 98 önayardan birini
veya bir temel URL ile adaptör yazmak için `custom` seçeneğini belirleyin.
2. **API anahtarı** — bir anahtar yapıştırın veya `${ANTHROPIC_API_KEY}` gibi
bir ortam değişkenine başvurun.
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/tr/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ olmayan bir makineden oturum açmak bundan etkilenmez.

## 3. API anahtarı kataloğu

opencodex 97 yerleşik önayar ile birlikte gelir: 80 anahtar tabanlı, 13
opencodex 98 yerleşik önayar ile birlikte gelir: 81 anahtar tabanlı, 13
OAuth, üç yerel ve bir varsayılan ChatGPT iletme önayarı. Kontrol panelinin
**Sağlayıcı ekle** seçicisi bir anahtar sağlayıcısının kontrol panelini açar,
anahtarı doğrular ve saklar; doğrulama sağlayıcıya özgüdür. Dikkate değer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ocx init

`ocx init` 会引导你完成:

1. **选择 provider** — 从内置 registry 的 97 个预设中选择一个,或选择 `custom` 手动输入 base URL 和 adapter。
1. **选择 provider** — 从内置 registry 的 98 个预设中选择一个,或选择 `custom` 手动输入 base URL 和 adapter。
2. **API key** — 粘贴一个 key,或引用一个环境变量,例如 `${ANTHROPIC_API_KEY}`。
3. **默认模型** — 对于 key、本地和 custom provider,接受预设值或输入模型 id。
4. **代理端口** — 默认为 `10100`。
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/zh-cn/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Kiro 登录需要 Kiro CLI:Unix 使用 `curl -fsSL https://cli.kiro.dev/instal

## 3. API 密钥目录

opencodex 内置 97 个预设:80 个密钥预设、13 个 OAuth 预设、3 个本地预设,以及 1 个默认的
opencodex 内置 98 个预设:81 个密钥预设、13 个 OAuth 预设、3 个本地预设,以及 1 个默认的
ChatGPT 转发预设。仪表盘的 **Add provider** 选择器会打开密钥提供商的控制台,验证并保存密钥。
验证因提供商而异。主要条目包括:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ocx init

`ocx init` 會引導你完成:

1. **選擇 provider** —— 從內建 registry 的 97 個預設中選擇一個,或選擇 `custom` 手動輸入
1. **選擇 provider** —— 從內建 registry 的 98 個預設中選擇一個,或選擇 `custom` 手動輸入
base URL 和 adapter。
2. **API key** —— 貼上一個 key,或引用一個環境變數,例如 `${ANTHROPIC_API_KEY}`。
3. **預設模型** —— 對於 API key、本機和 custom provider,可接受預設值或輸入模型 id。
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/zh-tw/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ database 並移除目前的 WAL、SHM 與 journal sidecar,再發布先前的 s

## 3. API 金鑰目錄

opencodex 內建 97 個 preset:80 個 key-based、13 個 OAuth、3 個 local,以及 1 個預設 ChatGPT-forward
opencodex 內建 98 個 preset:81 個 key-based、13 個 OAuth、3 個 local,以及 1 個預設 ChatGPT-forward
preset。儀表板的 **Add provider** picker 會開啟 key provider 的 dashboard、驗證金鑰並儲存;驗證方式
依 provider 而異。主要條目如下。

Expand Down
1 change: 1 addition & 0 deletions scripts/test-layout/layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
"claude-auth-detect.test.ts": "claude-integration",
"claude-auth-mode.test.ts": "claude-integration",
"claude-authmode-migration.test.ts": "claude-integration",
"claude-cli-adapter.test.ts": "providers",
"claude-cli.test.ts": "claude-integration",
"claude-code-thought-signature-scope.test.ts": "claude-integration",
"claude-compatibility.test.ts": "claude-integration",
Expand Down
Loading
Loading