Skip to content
Draft
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs-site/src/content/docs/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ what powers the [web-search and vision sidecars](/guides/sidecars/).
The ChatGPT passthrough catalog also layers in the bare GPT-5.6 Sol/Terra/Luna slugs
(`gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`) for accounts that can use them.

For encrypted V2 child tasks, canonical ChatGPT forwarding is trusted implicitly. A non-canonical
`openai-responses` provider may opt in with `allowEncryptedV2AgentTasks: true` only after its
upstream has been verified to consume or relay the opaque ciphertext unchanged. The option is
disabled by default, is evaluated against the model's final wire, and does not apply when a
`modelAdapters` override resolves to `openai-chat`. OpenCodex never decrypts, translates, or
recovers this payload; ineligible routes fail closed with `unreadable_encrypted_agent_task`.

## 2. Account login (OAuth)

Eight provider presets use OAuth login — plus GitHub Copilot via an experimental unofficial
Expand Down
32 changes: 21 additions & 11 deletions docs-site/src/content/docs/guides/sub-agent-surface.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Choose the mode for **new sessions**. Existing sessions keep the surface they st

On **v2**, an optional **Keep ChatGPT on v1** switch (`keepNativeChatGptOnV1`) leaves Sol/Terra
on the v1 surface so they can still spawn Grok or Claude. ChatGPT-native parents encrypt v2
`NEW_TASK` bodies; routed models cannot read them. Routed parents stay on v2, where child tasks
`NEW_TASK` bodies; ordinary routed models cannot read them. Routed parents stay on v2, where child tasks
are plaintext. This is a switch *inside* v2, not a fourth catalog mode.

:::tip[Not sure?]
Expand Down Expand Up @@ -115,27 +115,37 @@ inside a cooldown, missing a usable pooled Codex account, or beyond the configur
Availability probes are cached for `subagentModelFallbackPollMs` (60 seconds by default).

Fallback does not make incompatible encrypted tasks readable. When the child task is encrypted for
ChatGPT, selection is restricted to canonical native ChatGPT targets even if an external model
appears earlier in the chain.
ChatGPT, selection is restricted to targets that can receive that ciphertext: canonical native
ChatGPT or a Responses provider with an explicit `allowEncryptedV2AgentTasks: true` opt-in.

## Encrypted v2 task delivery

Codex may send a v2 native-to-routed child task only as backend-encrypted `encrypted_content`. That
payload can be read by the native ChatGPT backend, but not by an external provider. This is the
known [#92 limitation](https://github.com/lidge-jun/opencodex/issues/92).
Codex may send a v2 native-to-routed child task only as backend-encrypted `encrypted_content`. The
native ChatGPT backend can consume that payload; some compatible relays may also be able to pass it
to a backend that can. OpenCodex cannot infer that capability from a provider name or Base URL. This
is the known [#92 limitation](https://github.com/lidge-jun/opencodex/issues/92).

opencodex fails safely instead of forwarding an empty or unreadable task:

- A direct non-native route returns HTTP 400 with
- An ineligible direct non-native route returns HTTP 400 with
`error.code = "unreadable_encrypted_agent_task"` and does not echo the ciphertext.
- A combo considers only canonical native ChatGPT targets for that task, including retries. If none
is available, it returns the same 400 error.
- A combo considers only canonical native ChatGPT targets and explicitly trusted Responses targets
for that task, including retries. If none is available, it returns the same 400 error.
Comment thread
cb8010d6 marked this conversation as resolved.
- A readable plaintext task keeps the normal route and fallback behavior.

Recovery options are to select a native ChatGPT child, add a native ChatGPT target to the combo, use
v1 for heterogeneous-provider delegation, or resend the task as plaintext v2 `agent_message`
content when you control the caller.

If a non-canonical Responses endpoint has been verified to consume or relay this ciphertext, enable
**Providers → Settings → Pass through encrypted V2 agent tasks** for that provider, or set
`allowEncryptedV2AgentTasks: true` in its provider config. The option is disabled by default and is
valid only when the selected model's final wire is `openai-responses`; a `modelAdapters` override to
`openai-chat` remains ineligible. It passes the opaque task through unchanged; it does not decrypt,
translate, or recover plaintext, and it does not prove provider compatibility. The canonical ChatGPT
forward provider is always eligible and needs no flag. A provider opted into passthrough skips
`agentTaskRecovery` for that route because recovery and opaque forwarding are separate trust modes.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

An experimental, disabled-by-default `agentTaskRecovery` option can recover this specific native-
to-routed shape through a raw Responses passthrough to the fixed ChatGPT `/responses` endpoint using
the incoming credential shape used by the canonical `openai` provider with `authMode: "forward"`.
Expand All @@ -149,8 +159,8 @@ byte-for-byte fidelity is not guaranteed. It rejects generic/API-key proxy calle
`unreadable_encrypted_agent_task` on any failure. See
[Agent configuration: Encrypted v2 task recovery](/reference/configuration/agents/#encrypted-v2-task-recovery)
for the full trust boundary and configuration.
Combo routing remains unchanged and continues to consider only canonical native ChatGPT targets for
encrypted tasks.
Combo routing applies the same eligibility rule and considers canonical native ChatGPT targets plus
Responses targets with the explicit provider opt-in.

## Changing the mode

Expand Down
7 changes: 7 additions & 0 deletions docs-site/src/content/docs/ja/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ ChatGPT パススルーカタログには GPT-5.6 Sol/Terra/Luna の名前空間
(`gpt-5.6-sol`、`gpt-5.6-terra`、`gpt-5.6-luna`)も含まれます。実際の呼び出し可否はアカウント権限に
依存します。

暗号化された V2 子タスクでは、正規の ChatGPT 転送は暗黙に信頼されます。非正規の
`openai-responses` プロバイダーは、アップストリームが不透明な暗号文をそのまま処理または
中継できることを確認した後に限り `allowEncryptedV2AgentTasks: true` を設定できます。この
オプションはデフォルトで無効で、モデルの最終 wire が `openai-responses` の場合だけ有効です。
`modelAdapters` が `openai-chat` に解決される場合は対象外で、opencodex は復号・翻訳・復元を
行わず、対象外のルートは `unreadable_encrypted_agent_task` で失敗します。

## 2. アカウントログイン(OAuth)

OAuth ログインを使うプロバイダープリセットは 8 つで、これに実験的な非公式デバイスフロー
Expand Down
9 changes: 4 additions & 5 deletions docs-site/src/content/docs/ja/guides/sub-agent-surface.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,17 @@ v1 では、opencodex は、`max` または `ultra` の取り組みでアップ

重複するモデル ID は、最初に出現したモデル ID を保持しながら削除されます。選択中、opencodex は、無効になっている、ルーティングできない、無効なプロバイダーによってサポートされている、異常とマークされている、クールダウン中、使用可能なプールされた Codex アカウントがない、または設定されたクォータしきい値を超えている候補をスキップします。可用性プローブは `subagentModelFallbackPollMs` に対してキャッシュされます (デフォルトでは 60 秒)。

フォールバックでは、互換性のない暗号化タスクは読み取り可能になりません。子タスクが ChatGPT 用に暗号化されている場合、外部モデルがチェーンの前の方に表示されている場合でも、選択は正規のネイティブ ChatGPT ターゲットに制限されます
フォールバックでは、互換性のない暗号化タスクは読み取り可能になりません。子タスクが ChatGPT 用に暗号化されている場合、外部モデルがチェーンの前の方に表示されていても、選択は正規のネイティブ ChatGPT ターゲットまたは、解決後の最終 wire adapter が `openai-responses` のままである `allowEncryptedV2AgentTasks: true` を明示した Responses プロバイダーに制限されます

## 暗号化された v2 タスク配信

Codex は、v2 ネイティブからルーティングされた子タスクを、バックエンドで暗号化された `encrypted_content` としてのみ送信できます。そのペイロードは、ネイティブ ChatGPT バックエンドによって読み取ることができますが、外部プロバイダーによっては読み取ることができません。これは既知の [#92限定](https://github.com/lidge-jun/opencodex/issues/92) です。
Codex は、v2 ネイティブからルーティングされた子タスクを、バックエンドで暗号化された `encrypted_content` としてのみ送信できます。そのペイロードは、ネイティブ ChatGPT バックエンドで処理されるか、互換性を確認して明示的に許可された Responses プロバイダーによって不透明なまま処理または中継されます。これは既知の [#92 の制限](https://github.com/lidge-jun/opencodex/issues/92) です。

opencodex は、空のタスクまたは読み取り不可能なタスクを転送するのではなく、安全に失敗します。

- 直接の非ネイティブ ルートは HTTP 400 を返します。
- 対象外の直接非ネイティブ ルートは HTTP 400 を返します。
`error.code = "unreadable_encrypted_agent_task"` であり、暗号文はエコーされません。
- コンボでは、再試行を含む、そのタスクの正規のネイティブ ChatGPT ターゲットのみが考慮されます。何もない場合
が利用可能な場合は、同じ 400 エラーが返されます。
- コンボでは、再試行を含め、そのタスクの正規のネイティブ ChatGPT ターゲットと、最終 wire adapter が `openai-responses` のままである明示的に許可された Responses ターゲットだけが考慮されます。利用可能なターゲットがない場合は、同じ 400 エラーが返されます。
- 読み取り可能なプレーンテキストのタスクは、通常のルートとフォールバック動作を維持します。

回復オプションは、ネイティブ ChatGPT 子の選択、コンボへのネイティブ ChatGPT ターゲットの追加、異種プロバイダーの委任に v1 を使用する、または呼び出し元を制御するときにタスクをプレーンテキスト v2 `agent_message` コンテンツとして再送信することです。
Expand Down
6 changes: 6 additions & 0 deletions docs-site/src/content/docs/ja/reference/adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ HTTP リトライ ループの対象外です。
- `key` provider は検証済みの相対 `responsesPath` を設定できます。adapter は `baseUrl` 末尾の `/` を 1 つ除き、`{trimmedBaseUrl}{responsesPath}` に送信します。Ark Agent Plan では `baseUrl: "https://ark.cn-beijing.volces.com/api/plan/v3"` と `responsesPath: "/responses"` を使います。
- `forward` モードでは安全なヘッダー許可リスト(`FORWARD_HEADERS`)だけを中継します。authorization、ChatGPT account id、OpenAI beta/originator/session ヘッダーが対象です。この ChatGPT ログイン経路は [サイドカー](/ja/guides/sidecars/) にも使われます。

暗号化された V2 子タスクの暗号文はこのアダプター上でも不透明なままです。バイト単位で転送
され、復号・翻訳・復元は行われません。正規の ChatGPT 転送は暗黙に信頼されますが、非正規の
Responses プロバイダーは互換性を確認したうえで `allowEncryptedV2AgentTasks: true` を明示的に
設定する必要があります。オプションはデフォルトで無効で、最終 wire が `openai-responses` の場合
だけ有効です。`openai-chat` への override は対象外です。

## `anthropic`

**対象:** Anthropic **Messages**(`/v1/messages`)。
Expand Down
4 changes: 2 additions & 2 deletions docs-site/src/content/docs/ja/reference/proxy-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Responses-family および Chat リクエストは、プロバイダーまたは
| 401 | `authentication_error` |必要なプロキシ アドミッション資格情報が見つからないか無効です。
| 403 | `origin_rejected` | Responses/OpenAI データプレーン リクエストまたは WebSocket アップグレードが、許可されていないオリジンから送信されました。
| 503 | `combo_unavailable` |選択したコンボ内のすべてのターゲットは使用不可、クールダウン中、無効、またはその他の理由で不適格です。
| 400 | `unreadable_encrypted_agent_task` |暗号化された v2 ワーカー タスクには、それを使用できる適格なネイティブ ChatGPT ターゲットがありません。
| 400 | `unreadable_encrypted_agent_task` |暗号化された v2 ワーカー タスクに、それを不透明なまま処理または中継できる適格なネイティブ ChatGPT 消費者、または最終 wire adapter が `openai-responses` のままである明示的に許可された Responses ターゲットがありません。 |
| 426 | `upgrade_required` |応答 WebSocket トランスポートが無効になっているか、アップグレードが失敗しました。 HTTP を使用する |

Anthropic オリジンの失敗は Anthropic のエラー エンベロープでレンダリングされるため、オリジンの拒否は OpenAI スタイルの `origin_rejected` 本体ではなく、その方言上の 403 `permission_error` になります。
Expand All @@ -218,4 +218,4 @@ Anthropic オリジンの失敗は Anthropic のエラー エンベロープで

プロキシは、本物のバックエンド暗号文を不透明なものとして扱います。構造的に有効な暗号文はバイト単位で保存されます。opencodex は暗号文を復号したり、その内容を変換したり、別のプロバイダー用に再暗号化したりしません。

一部のエージェント フックはこれまで、プレーンテキストの制御テキストを `encrypted_content` スロットに配置していました。互換性を確保するために、プロキシは、構造的に有効な Fernet の実行を変更せずに保持しながら、プレーンテキストをテキスト部分に分割します。 `agent_message` が修復中にすべての暗号化された部分を失った場合、それは通常のユーザー メッセージになります。現在の v2 タスクが完全に暗号化されたままであるが、選択したルーティングされたターゲットがネイティブ ChatGPT 暗号文を読み取ることができない場合、opencodex は読み取り不能なバイトをそのプロバイダーに送信する代わりに `unreadable_encrypted_agent_task` で失敗します。ワーカー タスクに関するクライアントの動作については、[サブエージェントサーフェス](/guides/sub-agent-surface/) を参照してください。
一部のエージェント フックはこれまで、プレーンテキストの制御テキストを `encrypted_content` スロットに配置していました。互換性を確保するために、プロキシは、構造的に有効な Fernet の実行を変更せずに保持しながら、プレーンテキストをテキスト部分に分割します。`agent_message` が修復中にすべての暗号化された部分を失った場合、それは通常のユーザー メッセージになります。現在の v2 タスクが完全に暗号化されたままで、利用可能な正規の ChatGPT 消費者または最終 wire adapter が `openai-responses` のままである明示的に許可された Responses ターゲットがない場合、opencodex は読み取り不能なバイトをプロバイダーに送信する代わりに `unreadable_encrypted_agent_task` で失敗します。ワーカー タスクに関するクライアントの動作については、[サブエージェントサーフェス](/ja/guides/sub-agent-surface/) を参照してください。
7 changes: 7 additions & 0 deletions docs-site/src/content/docs/ko/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ ChatGPT 패스스루 카탈로그에는 GPT-5.6 Sol/Terra/Luna의 네임스페
(`gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`)도 들어갑니다. 실제 호출 가능 여부는 계정 권한에
따라 달라집니다.

암호화된 V2 하위 작업에서는 정규 ChatGPT 포워딩을 암묵적으로 신뢰합니다. 비정규
`openai-responses` 프로바이더는 업스트림이 불투명한 암호문을 그대로 처리하거나 중계할 수
있음을 확인한 뒤에만 `allowEncryptedV2AgentTasks: true`를 설정할 수 있습니다. 이 옵션은 기본적으로
꺼져 있고 모델의 최종 wire가 `openai-responses`일 때만 적용됩니다. `modelAdapters`가
`openai-chat`으로 해석되면 대상에서 제외되며, opencodex는 payload를 복호화·번역·복구하지 않고
부적격 경로를 `unreadable_encrypted_agent_task`로 fail closed 처리합니다.

## 2. 계정 로그인 (OAuth)

OAuth 로그인을 사용하는 프로바이더 프리셋은 여덟 개이며, 여기에 실험적 비공식 디바이스 플로우
Expand Down
Loading
Loading