Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
1e3a5d6
feat(trae-cn): add official ACP provider
Nov 8, 2026
1c9f8f2
fix(trae-cn): address ACP lifecycle and catalog review
invalid-email-address Nov 8, 2026
bb24343
fix(trae-cn): enforce transport capabilities and refresh catalogs
invalid-email-address Nov 8, 2026
2a9b9aa
fix(trae-cn): close cancellation and discovery edge cases
invalid-email-address Nov 8, 2026
649d7dd
fix(trae-cn): redact protocol failures and preserve CLI sign-in
invalid-email-address Nov 8, 2026
62e9e33
fix(trae-cn): bound streaming and supervise process cleanup
invalid-email-address Nov 8, 2026
ecfca0c
fix(trae-cn): retain job ownership and safe diagnostics
invalid-email-address Nov 8, 2026
fe468ee
fix(trae-cn): resolve Windows hosts and retain failed-turn usage
invalid-email-address Nov 8, 2026
88c5439
fix(trae-cn): prevent prompt replay and preserve ACP stops
invalid-email-address Nov 8, 2026
1ccbcdb
fix(trae-cn): reconcile ACP state and launcher discovery
invalid-email-address Nov 8, 2026
bdc1065
docs(trae-cn): split setup guide to preserve line budget
invalid-email-address Nov 8, 2026
6132c32
fix(trae-cn): report Windows forwarding failures
invalid-email-address Nov 8, 2026
cb4aaac
test(trae-cn): cover live discovery and dispatch boundaries
invalid-email-address Nov 8, 2026
5047d60
Merge dev and reconcile TRAE CN provider integration
Nov 11, 2026
e346339
Merge dev and retain TRAE probe rosters during publication
Nov 11, 2026
d23e826
docs(trae-cn): qualify observed model discovery and account scope
Nov 11, 2026
094a7d5
fix(trae-cn): preserve local spend-ledger storage refusals
Nov 11, 2026
9f318bb
docs(trae-cn): describe local spend-ledger storage refusals
Nov 11, 2026
2dd6fa0
fix(trae-cn): retain terminal usage across cleanup cancellation
Nov 11, 2026
9a0e1e4
fix(trae-cn): keep provider reference inert and commit regressions
Nov 11, 2026
747333e
fix(trae-cn): isolate discovery and preserve replay chronology
Nov 11, 2026
685c347
docs(trae-cn): document cache accounting and supervisor frames
Nov 11, 2026
109e1b7
fix(trae-cn): reject instruction images and retain cancelled RPC usage
Nov 11, 2026
a203033
feat(trae-cn): preserve instruction media before projection
Nov 11, 2026
3609407
fix(trae-cn): guard projected media and preserve safe fallback
Nov 11, 2026
7f998d3
test(trae-cn): cover policy media retention
Nov 11, 2026
e574f7f
fix(trae-cn): preserve Chat instruction media across policy retries
Nov 11, 2026
bc81243
Merge remote-tracking branch 'origin/dev' into feat/trae-cn-acp-provider
invalid-email-address Nov 11, 2026
f657e5d
fix(trae-cn): preserve media and settings on policy retries
Nov 11, 2026
12bd6c9
fix(trae-cn): bound image caption admission
Nov 11, 2026
e1e5059
fix(trae-cn): keep instruction audio in user content
Nov 11, 2026
28e74d4
fix(trae-cn): reuse OpenAI vision credentials
Nov 11, 2026
e58e6d9
fix(trae-cn): keep single-leading attachments in user content
Nov 11, 2026
2906881
fix: address TRAE review follow-ups
Nov 11, 2026
b95efea
test: cover TRAE review regressions
Nov 11, 2026
d285dee
fix: retain discovered TRAE roster under pressure
Nov 11, 2026
9de51c0
test: cover TRAE roster pressure publication
Nov 11, 2026
515d14a
fix: revalidate TRAE roster revisions before pinning
Nov 11, 2026
e88fd22
test: cover concurrent TRAE roster refresh
Nov 11, 2026
0c864ca
fix: preserve combo media and TRAE roster pins
Nov 11, 2026
127b45a
test: cover combo media and multi-roster pressure
Nov 11, 2026
6ef68f0
fix: close combo media and roster cleanup gaps
Nov 11, 2026
71b104a
test: cover native combo media and pin cleanup
Nov 11, 2026
47b67bc
fix: reject stale TRAE rosters before pinning
Nov 11, 2026
11d35e6
test: cover pre-pin TRAE roster replacement
Nov 11, 2026
2279135
fix: serialize TRAE discovery and retain refusal usage
Nov 11, 2026
c1f1a82
test: cover discovery order and refusal usage
Nov 11, 2026
cdceb1a
fix: bind discovery authority and refusal usage
Nov 11, 2026
c04e71b
test: cover queued authority and malformed usage
Nov 11, 2026
150b558
fix: surface trailing TRAE reader failures
Nov 11, 2026
2de2bdd
test: cover queued authority and trailing failures
Nov 11, 2026
0e61e1f
fix: preserve usage through ACP EOF wrapping
Nov 11, 2026
2ad779e
test: cover usage-bearing ACP EOF
Nov 11, 2026
4b91820
fix: retain prompt usage across cleanup errors
Nov 11, 2026
e286e74
test: cover reader failure cleanup timeout
Nov 11, 2026
5e3e9a5
fix: preserve primary TRAE failures through cleanup
Nov 11, 2026
7581f2d
test: cover cancellation and cleanup precedence
Nov 11, 2026
f985628
fix: bind buffered combo error usage
Nov 11, 2026
58bf3fd
test: cover buffered combo error usage
Nov 11, 2026
f8bc598
fix: preserve policy snapshots and media carriers
Nov 11, 2026
6755882
test: cover policy snapshots and rich carriers
Nov 11, 2026
9d6649f
fix: drain buffered TRAE replies before refusal
Nov 12, 2026
4df0db0
test: cover tool-before-reply usage
Nov 12, 2026
d3c2945
fix: preserve TRAE cache age and batch usage
Nov 12, 2026
fc7cbd8
test: cover cache age and malformed batch order
Nov 12, 2026
9711eae
fix: let combos bypass unavailable TRAE models
Nov 12, 2026
6c51573
test: cover TRAE fallback and media owners
Nov 12, 2026
6eb4368
Merge dev (aa30ea9d) into feat/trae-cn-acp-provider
lidge-jun Nov 12, 2026
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
3 changes: 3 additions & 0 deletions docs-site/src/content/docs/fr/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ ocx init
1. **Choix d’un fournisseur** — sélectionnez l’un des 107 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}`.

**TRAE CN** utilise le CLI officiel déjà connecté et ne nécessite pas de clé API. Installez le CLI, connectez-vous et laissez le champ de clé vide dans l’assistant. Consultez la [configuration de TRAE CN (en anglais)](/guides/providers/#trae-cn-official-acp).

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.
4. **Port proxy** — la valeur par défaut est `10100`.
5. **Injecter dans Codex ?** — avec une configuration de bouclage normale, opencodex ajoute une valeur racine `openai_base_url` à
Expand Down
2 changes: 2 additions & 0 deletions docs-site/src/content/docs/fr/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ existante n'est pas concernée.

## 3. Catalogue des clés API

**TRAE CN** est un adaptateur ACP expérimental à configurer manuellement. Le répertoire contient uniquement une référence non vérifiée ; aucun préréglage intégré n’est activé. Consultez la [configuration de TRAE CN (en anglais)](/guides/providers/#trae-cn-official-acp).

opencodex fournit 107 préréglages intégrés : 86 à clé, 17 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: 2 additions & 0 deletions docs-site/src/content/docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ ocx init
1. **Pick a provider** — choose one of the 107 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}`.
For **TRAE CN**, press Enter to leave the wizard’s key prompt empty: the signed-in official
CLI owns authentication. Install and sign in to the CLI first; see [TRAE CN setup](/guides/providers/#trae-cn-official-acp).
Comment thread
AaronZ345 marked this conversation as resolved.
Resolved
3. **Default model** — for key, local, and custom providers, accept the preset or enter a model id.
4. **Proxy port** — defaults to `10100`.
5. **Inject into Codex?** — on a normal loopback setup, opencodex adds a root `openai_base_url` to
Expand Down
6 changes: 3 additions & 3 deletions docs-site/src/content/docs/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -785,9 +785,7 @@ On upgrade, startup adds Pro to a saved model list only when it exactly matches

## 3. API-key catalog

opencodex ships 107 built-in presets: 86 key-based, 17 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:
opencodex ships 107 built-in presets: 86 in the key-based registry category, 17 OAuth, three local, and one default ChatGPT-forward preset. Keyless CLI adapters use their official CLI for authentication; experimental TRAE CN is available through manual configuration only. For API-key providers, **Add provider** opens the provider’s dashboard, validates the key, and stores it; validation is provider-specific. Notable entries:

**ClinePass** uses a Cline API key with the [official subscription catalog](https://docs.cline.bot/getting-started/clinepass)
and [Chat Completions endpoint](https://docs.cline.bot/api/chat-completions), operated by Cline Bot Inc. under
Expand Down Expand Up @@ -1486,6 +1484,8 @@ OpenCodex provides official adapter support for Tencent Cloud's CodeBuddy Code C
- **Governance Status:** Whether routing this vendor automation surface behind a proxy for a third-party agent satisfies CodeBuddy's acceptable-use terms is an open question flagged for maintainer security review (see the governance note in the provider registry entry). Treat this provider as pending that review, and keep the tool bridge's ownership boundary in mind: the nested CLI advertises tools but never executes them, and approval, sandboxing, and execution remain with the external Codex client.
- **Entitlements and Billing:** The provider uses the same vendor-documented CodeBuddy account/CLI authentication surface. Availability and billing of free, promotional, trial, or subscription credits remain determined by the user's CodeBuddy account entitlement.

### [TRAE CN (official ACP)](/guides/trae-cn/)

### Official Qoder CLI (Global & CN)

OpenCodex provides official adapter support for Qoder through the `qoder` (Global) and `qoder-cn` (China) presets. Both use a user-supplied Personal Access Token and the vendor's headless CLI; OpenCodex never reads Qoder Desktop sessions, browser cookies, refresh tokens, or private console APIs.
Expand Down
70 changes: 70 additions & 0 deletions docs-site/src/content/docs/guides/trae-cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: TRAE CN (ACP)
description: Connect OpenCodex to the signed-in official TRAE CN CLI.
---

The experimental `trae-cn` adapter can be configured manually through `custom`. Its directory
entry is reference-only; canonical promotion awaits a maintenance owner, vendor discovery and
forwarding evidence, and security review. It uses the signed-in official CLI through `traecli acp serve`.
OpenCodex does not read desktop tokens, private IDE endpoints, or Ferry.
Non-text parts in system or developer instructions are refused before CLI startup, including images, videos, audio and file references in Responses, Chat and combo requests.
File and audio references in native agent messages are refused too. A routing policy or combo may choose another eligible provider after a pre-dispatch refusal; an already dispatched TRAE prompt is never replayed for fallback.

```json
{
"providers": {
"trae-cn": {
"adapter": "trae-cn",
"baseUrl": "https://www.trae.cn",
"keyOptional": true
}
}
}
```

- **Prerequisites:** Install and sign in to [TRAE CN](https://www.trae.cn/) and its official CLI
on the host running the OpenCodex proxy. A remote dashboard uses that host's CLI session.
The CLI owns authentication and token refresh; the provider needs no API key.
OpenCodex preserves the default `~/.trae` CLI directory while isolating HOME. Set `TRAE_HOME`
before starting OpenCodex to select a different signed-in CLI directory.
- **Model discovery:** The tested signed-in CLI returned model IDs through `session/new` →
`models.availableModels[].modelId`. This is observed CLI behavior. The [vendor ACP documentation](https://docs.trae.cn/cli_agent-client-protocol)
does not document these discovery fields or guarantee their account scope.
Successful discovery is cached by the normal provider catalog mechanism, with the last good
catalog and explicitly configured models as degraded fallbacks.
Read-only catalog gathers and management admission use cached evidence; they never start the CLI or refresh its sign-in.
The automatic refresh worker prepares CLI evidence before its next catalog convergence, so a slow CLI does not delay unrelated management responses.
Set `liveModels: false` for a static allowlist; **Test connection** then returns not applicable.
After switching CLI accounts, enable live discovery and run **Test connection**. It
replaces the roster and refreshes Codex and connected clients. It reports pending or failed
publication separately; restart running Codex sessions after publication.
The probed roster stays available while publishing under memory pressure. If it cannot fit
the memory budget, the probe reports pending retention; retry after active requests finish.
A probe overtaken before updating the model cache asks you to retry. Disk-only edits require
reloading provider configuration and testing again.
- **Transport:** Each turn opens a fresh ACP session for the selected model and streams text and reasoning.
Conversation history is replayed as labelled text. The limit is 1,000,000 UTF-16 code units
(JavaScript string length); an emoji may use two units. Oversized replay is rejected.
- **Capability boundary:** This initial provider supports text conversations only. It rejects
client tools, tool replay, images, audio, video and attached documents. Model capability overrides
cannot enable native image input or verbosity. Images require the vision sidecar to describe them first.
Permission requests fail with `trae_client_request_unsupported`; internal tool notifications fail
with `trae_tool_call_unsupported`. An empty `end_turn` fails with `trae_empty_response`; `max_tokens` without text stays incomplete.
These completions and refusals retain usage. OpenCodex does not replay a dispatched TRAE prompt on another provider.
Client cancellation emits no provider error and preserves already-received usage for accounting.
Cancellation initiated by the CLI returns an incomplete turn.
Unsafe local spend-ledger files produce the shared `spend_ledger_storage_unavailable`/503
diagnostic; follow its local-storage recovery instructions before retrying.
Requests with an output-token limit fail with `unsupported_max_output_tokens` because this
adapter has no verified ACP field for that limit. ACP `max_turn_requests` returns an incomplete turn with that reason.
- **CLI process:** The CLI uses an empty temporary workspace, no session MCP/skills and a finite tool denylist.
Shutdown targets the owned POSIX process group or Windows Job Object (Windows 10+, PowerShell 5.1). POSIX descendants
that detach into another group can survive; this mechanism does not contain untrusted hooks or tools.
Use a trusted CLI and configuration: its hooks and unlisted tools are outside OpenCodex's
client-capability controls. Temporary directories and tool denial do not provide an OS sandbox.
- **Destination:** `https://www.trae.cn` identifies this provider; OpenCodex does not call it
directly. A custom destination is refused. This row is separate from TRAE International and
from a custom OpenAI-compatible provider named `trae`.
- **Network routing:** The official CLI owns its network route. Provider `proxy` and `noProxy`
overrides, including `direct` and `null`, are rejected before CLI startup. OpenCodex does not
change system proxy settings.
3 changes: 3 additions & 0 deletions docs-site/src/content/docs/ja/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ ocx init

1. **プロバイダーを選択してください** — 107 個の組み込みレジストリプリセットのいずれか、または `custom` を選択してベース URL とアダプターを入力します。
2. **API キー** — キーを貼り付けるか、`${ANTHROPIC_API_KEY}` のような環境変数を参照します。

**TRAE CN** はログイン済みの公式 CLI を使用するため、API キーは不要です。CLI をインストールしてログインし、ウィザードのキー入力欄は空のまま進めてください。[TRAE CN の設定手順(英語)](/guides/providers/#trae-cn-official-acp)を参照してください。

3. **デフォルト モデル** — キー、ローカル、カスタム プロバイダーの場合は、プリセットを受け入れるか、モデル ID を入力します。
4. **プロキシ ポート** — デフォルトは `10100` です。
5. **Codex に挿入しますか?** - 通常のループバック設定では、opencodex はルート `openai_base_url` を
Expand Down
2 changes: 2 additions & 0 deletions docs-site/src/content/docs/ja/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ Kiro のログインには Kiro CLI が必要です。Unix では `curl -fsSL ht

## 3. API キーカタログ

**TRAE CN** は手動設定用の実験的 ACP アダプターです。ディレクトリには未検証の参照項目のみがあり、組み込みプリセットは有効になっていません。[TRAE CN の設定手順(英語)](/guides/providers/#trae-cn-official-acp)を参照してください。

opencodex には組み込みプリセットが 107 個含まれています。キー方式 86、OAuth 17、ローカル 3、
デフォルト ChatGPT 転送プリセット 1 です。ダッシュボードの **Add provider** ピッカーはキー発行ページを開き、
入力したキーを検証した後保存します(検証はプロバイダー固有です)。主な項目は以下のとおりです:
Expand Down
3 changes: 3 additions & 0 deletions docs-site/src/content/docs/ko/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ ocx init

1. **프로바이더 선택** — 내장 레지스트리 프리셋 107개 중 하나를 고르거나 `custom`을 선택해 base URL과 adapter를 직접 입력합니다.
2. **API 키** — 키를 붙여넣거나 `${ANTHROPIC_API_KEY}` 같은 환경 변수를 참조합니다.

**TRAE CN**은 로그인된 공식 CLI를 사용하므로 API 키가 필요하지 않습니다. CLI를 설치하고 로그인한 후 마법사의 키 입력란은 비워 두세요. 자세한 내용은 [TRAE CN 설정 안내(영문)](/guides/providers/#trae-cn-official-acp)를 참고하세요.

3. **기본 모델** — 키, 로컬, custom 프로바이더에서는 프리셋을 그대로 쓰거나 모델 ID를 직접 입력합니다.
4. **프록시 포트** — 기본값은 `10100`입니다.
5. **Codex에 주입할까요?** — 일반적인 루프백 구성에서는 opencodex가 `$CODEX_HOME/config.toml`의 루트(`~/.codex/config.toml`이 기본값)에 `openai_base_url`을 추가해 Codex의 내장 `openai` 프로바이더가 프록시를 바라보게 합니다. 원격/LAN 바인딩에서는 API 인증 헤더를 포함한 전용 프로바이더 항목을 대신 사용합니다.
Expand Down
2 changes: 2 additions & 0 deletions docs-site/src/content/docs/ko/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ Kiro 로그인에는 Kiro CLI가 필요합니다. Unix에서는 `curl -fsSL http

## 3. API 키 카탈로그

**TRAE CN**은 수동으로 구성하는 실험적 ACP 어댑터입니다. 디렉터리에는 미검증 참고 항목만 있으며 내장 프리셋은 활성화되어 있지 않습니다. [TRAE CN 설정 안내(영문)](/guides/providers/#trae-cn-official-acp)를 참고하세요.

opencodex에는 빌트인 프리셋이 107개 들어 있습니다. 키 방식 86개, OAuth 17개, 로컬 3개,
기본 ChatGPT 포워드 프리셋 1개입니다. 대시보드의 **Add provider** 선택기는 키 발급 페이지를 열고,
입력한 키를 검증한 뒤 저장합니다(검증은 프로바이더별로 다릅니다). 주요 항목은 다음과 같습니다:
Expand Down
3 changes: 3 additions & 0 deletions docs-site/src/content/docs/ru/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ ocx init
1. **Выбор провайдера** — выберите один из 107 встроенных пресетов реестра или `custom`, чтобы
ввести базовый URL и адаптер вручную.
2. **API-ключ** — вставьте ключ или сошлитесь на переменную окружения вида `${ANTHROPIC_API_KEY}`.

**TRAE CN** использует официальный CLI с выполненным входом и не требует ключа API. Установите CLI, войдите в аккаунт и оставьте поле ключа в мастере пустым. Подробнее: [настройка TRAE CN (на английском)](/guides/providers/#trae-cn-official-acp).

3. **Модель по умолчанию** — для провайдеров с ключом, локальных и `custom` примите значение из
пресета или введите id модели.
4. **Порт прокси** — по умолчанию `10100`.
Expand Down
2 changes: 2 additions & 0 deletions docs-site/src/content/docs/ru/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ Inline JSON и лишние позиционные аргументы откло

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

**TRAE CN** предоставляет экспериментальный ACP-адаптер для ручной настройки. В каталоге есть только непроверенная справочная запись; встроенный пресет не включён. Подробнее: [настройка TRAE CN (на английском)](/guides/providers/#trae-cn-official-acp).

opencodex поставляется с 107 встроенными пресетами: 86 на основе ключей, 17 OAuth, три локальных и
один пресет ChatGPT-форварда по умолчанию. Селектор **Add provider** в дашборде открывает страницу
выдачи ключей провайдера, проверяет ключ и сохраняет его; проверка зависит от провайдера.
Expand Down
3 changes: 3 additions & 0 deletions docs-site/src/content/docs/tr/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ ocx init
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.

**TRAE CN**, oturum açılmış resmi CLI uygulamasını kullanır; API anahtarı gerekmez. CLI uygulamasını yükleyip oturum açın ve sihirbazdaki anahtar alanını boş bırakın. Ayrıntılar için [TRAE CN kurulumu (İngilizce)](/guides/providers/#trae-cn-official-acp) bölümüne bakın.

3. **Varsayılan model** — anahtar, yerel ve özel sağlayıcılar için önayarı kabul
edin veya bir model kimliği girin.
4. **Proxy portu** — varsayılan olarak `10100`.
Expand Down
2 changes: 2 additions & 0 deletions docs-site/src/content/docs/tr/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ olmayan bir makineden oturum açmak bundan etkilenmez.

## 3. API anahtarı kataloğu

**TRAE CN**, elle yapılandırılan deneysel bir ACP bağdaştırıcısıdır. Dizinde yalnızca doğrulanmamış bir başvuru kaydı bulunur; yerleşik önayar etkin değildir. [TRAE CN kurulumu (İngilizce)](/guides/providers/#trae-cn-official-acp) bölümüne bakın.

opencodex 107 yerleşik önayar ile birlikte gelir: 86 anahtar tabanlı, 17
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ ocx init

1. **选择 provider** — 从内置 registry 的 107 个预设中选择一个,或选择 `custom` 手动输入 base URL 和 adapter。
2. **API key** — 粘贴一个 key,或引用一个环境变量,例如 `${ANTHROPIC_API_KEY}`。

**TRAE CN** 使用已登录的官方 CLI,无需 API 密钥。请先安装 CLI 并登录;向导若提示输入密钥,可直接留空。详见 [TRAE CN 配置说明(英文)](/guides/providers/#trae-cn-official-acp)。

3. **默认模型** — 对于 key、本地和 custom provider,接受预设值或输入模型 id。
4. **代理端口** — 默认为 `10100`。
5. **注入到 Codex?** — 在常规 loopback 配置下,opencodex 会在 `$CODEX_HOME/config.toml`(默认 `~/.codex/config.toml`)根级添加 `openai_base_url`,让 Codex 内置的 `openai` provider 指向代理。远程/LAN 绑定则改用带 API 认证 header 的专用 provider 条目。
Expand Down
2 changes: 2 additions & 0 deletions docs-site/src/content/docs/zh-cn/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ API Key 提供商,也不负责让 WorkBuddy 桌面客户端使用 OpenCodex

## 3. API 密钥目录

**TRAE CN** 提供需手工配置的实验性 ACP adapter。目录中仅有未经验证的参考项,内置预设尚未启用。详见 [TRAE CN 配置说明(英文)](/guides/providers/#trae-cn-official-acp)。

opencodex 内置 107 个预设:86 个密钥预设、17 个 OAuth 预设、3 个本地预设,以及 1 个默认的
ChatGPT 转发预设。仪表盘的 **Add provider** 选择器会打开密钥提供商的控制台,验证并保存密钥。
验证因提供商而异。主要条目包括:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ ocx init
1. **選擇 provider** —— 從內建 registry 的 107 個預設中選擇一個,或選擇 `custom` 手動輸入
base URL 和 adapter。
2. **API key** —— 貼上一個 key,或引用一個環境變數,例如 `${ANTHROPIC_API_KEY}`。

**TRAE CN** 使用已登入的官方 CLI,無需 API 金鑰。請先安裝 CLI 並登入;精靈若要求輸入金鑰,可直接留空。詳見 [TRAE CN 設定說明(英文)](/guides/providers/#trae-cn-official-acp)。

3. **預設模型** —— 對於 API key、本機和 custom provider,可接受預設值或輸入模型 id。
4. **代理埠** —— 預設為 `10100`。
5. **注入到 Codex?** —— 在通常的迴環地址設定中,opencodex 會在
Expand Down
Loading
Loading