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
17 changes: 10 additions & 7 deletions docs-site/src/content/docs/fr/guides/sub-agent-surface.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ pendant un temps de recharge, il manque un compte Codex poolé utilisable ou au-
Les sondes de disponibilité sont mises en cache pendant `subagentModelFallbackPollMs` (60 secondes par défaut).

La solution de secours ne rend pas lisibles les tâches chiffrées incompatibles. Lorsque la tâche enfant est chiffrée pour
ChatGPT, la sélection est restreinte aux cibles ChatGPT natives canoniques même si un modèle externe
apparaît plus tôt dans la chaîne.
ChatGPT, la sélection est restreinte aux cibles ChatGPT natives canoniques et aux routes Responses directes avec authentification
par clé explicitement approuvées via `allowEncryptedV2AgentTasks: true`, même si un autre modèle externe apparaît plus tôt dans
la chaîne. Les combos restent limités aux cibles natives canoniques.
Comment thread
coderabbitai[bot] marked this conversation as resolved.

## Livraison de tâches v2 cryptées

Expand All @@ -127,15 +128,17 @@ limitation connue [#92](https://github.com/lidge-jun/opencodex/issues/92).

opencodex échoue en toute sécurité au lieu de transférer une tâche vide ou illisible :

- Une route directe non native renvoie HTTP 400 avec
`error.code = "unreadable_encrypted_agent_task"` et ne fait pas écho au texte chiffré.
- Une route directe non native inéligible renvoie HTTP 400 avec
`error.code = "unreadable_encrypted_agent_task"` et ne fait pas écho au texte chiffré. Un
fournisseur Responses direct à authentification par clé qui active explicitement
`allowEncryptedV2AgentTasks: true` reçoit à la place le texte chiffré opaque et évite cette erreur.
- Un combo considère uniquement les cibles ChatGPT natives canoniques pour cette tâche, y compris les tentatives. Si aucun
est disponible, il renvoie la même erreur 400.
- Une tâche lisible en texte clair conserve la route normale et le comportement de repli.

Les options de récupération consistent à sélectionner un enfant ChatGPT natif, à ajouter une cible ChatGPT native au combo, à utiliser
v1 pour la délégation de fournisseurs hétérogènes, ou renvoyer la tâche en texte brut v2 `agent_message`
contenu lorsque vous contrôlez l’appelant.
Les options de récupération consistent à sélectionner un enfant ChatGPT natif, à approuver explicitement un relais Responses direct à
authentification par clé capable de consommer la charge utile opaque, à ajouter une cible ChatGPT native au combo, à utiliser v1 pour la
délégation de fournisseurs hétérogènes, ou à renvoyer la tâche comme contenu `agent_message` v2 en texte brut lorsque vous contrôlez l’appelant.

L’option expérimentale `agentTaskRecovery`, désactivée par défaut, peut récupérer cette forme précise de
tâche native envoyée vers une route externe. Elle utilise un transfert Responses brut vers le point de
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Pour un tour enfant créé, l’ordre de repli est le suivant :

Les chaînes de repli propres à un rôle doivent résider dans la configuration d’opencodex. L’ajout de `model_fallback` dans `$CODEX_HOME/agents/*.toml` amène Codex 0.146+ à rejeter le fichier de rôle entier à cause de ce champ inconnu, puis à ignorer le rôle (#1190). Une ancienne ligne `model_fallback` dans le fichier TOML reste lue par souci de rétrocompatibilité, mais `ocx doctor` la signale.

opencodex ignore les candidats désactivés, non routables, en mauvais état, en période de temporisation ou ayant atteint le seuil de quota. L’instantané de disponibilité est mis en cache pendant `subagentModelFallbackPollMs`. Les tâches enfants chiffrées peuvent limiter la chaîne aux cibles ChatGPT natives canoniques ; si aucune ne peut lire la charge chiffrée, la requête échoue au lieu d’envoyer un texte chiffré illisible à une autre destination.
opencodex ignore les candidats désactivés, non routables, en mauvais état, en période de temporisation ou ayant atteint le seuil de quota. L’instantané de disponibilité est mis en cache pendant `subagentModelFallbackPollMs`. Les tâches enfants chiffrées limitent la chaîne aux cibles ChatGPT natives canoniques et aux routes Responses directes avec authentification par clé explicitement approuvées via `allowEncryptedV2AgentTasks: true` ; si aucune ne peut consommer la charge chiffrée, la requête échoue au lieu d’envoyer un texte chiffré illisible à une autre destination. Les combos restent limités aux cibles natives canoniques.

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/fr/reference/proxy-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ Les erreurs utilisent l'enveloppe du dialecte client lorsque cela est nécessair
| 401 | `authentication_error` | Un identifiant requis pour l’admission au proxy est manquant ou invalide |
| 403 | `origin_rejected` | Une demande de plan de données Réponses/OpenAI ou une mise à niveau WebSocket provient d'une origine non autorisée |
| 503 | `combo_unavailable` | Chaque cible du combo sélectionné est indisponible, en temps de recharge, désactivée ou autrement inéligible |
| 400 | `unreadable_encrypted_agent_task` | Une tâche de travail v2 chiffrée n'a pas de cible native éligible pouvant la consommer |
| 400 | `unreadable_encrypted_agent_task` | Une tâche de travail v2 chiffrée n’a ni cible ChatGPT canonique éligible ni cible Responses directe à authentification par clé explicitement approuvée avec `allowEncryptedV2AgentTasks: true` pouvant la consommer |
| 426 | `upgrade_required` | Le transport Réponses WebSocket est désactivé ou la mise à niveau a échoué ; utiliser HTTP |

Les échecs d'origine Anthropic sont restitués dans l'enveloppe d'erreur de Anthropic, donc le rejet d'origine est un
Expand Down
18 changes: 11 additions & 7 deletions docs-site/src/content/docs/guides/sub-agent-surface.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ 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 canonical native ChatGPT targets and direct key-auth Responses
routes explicitly trusted with `allowEncryptedV2AgentTasks: true`, even if another external model
appears earlier in the chain. Combos remain canonical-native-only.

## Encrypted v2 task delivery

Expand All @@ -128,15 +129,18 @@ 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
`error.code = "unreadable_encrypted_agent_task"` and does not echo the ciphertext.
- An ineligible direct non-native route returns HTTP 400 with
`error.code = "unreadable_encrypted_agent_task"` and does not echo the ciphertext. An eligible
direct key-auth Responses provider that explicitly opts in with
`allowEncryptedV2AgentTasks: true` instead receives the opaque ciphertext and bypasses this error.
- A combo considers only canonical native ChatGPT targets for that task, including retries. If none
is available, it returns the same 400 error.
- 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.
Recovery options are to select a native ChatGPT child, explicitly trust a direct key-auth Responses
relay that can consume the opaque payload, 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.

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
Expand Down
8 changes: 4 additions & 4 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,21 +72,21 @@ v1 では、opencodex は、`max` または `ultra` の取り組みでアップ

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

フォールバックでは、互換性のない暗号化タスクは読み取り可能になりません。子タスクが ChatGPT 用に暗号化されている場合、外部モデルがチェーンの前の方に表示されている場合でも、選択は正規のネイティブ ChatGPT ターゲットに制限されます
フォールバックでは、互換性のない暗号化タスクは読み取り可能になりません。子タスクが ChatGPT 用に暗号化されている場合、別の外部モデルがチェーンの前の方に表示されていても、選択は正規のネイティブ ChatGPT ターゲットと、`allowEncryptedV2AgentTasks: true` で明示的に信頼された直接のキー認証 Responses ルートに制限されます。コンボは引き続き正規のネイティブ対象だけを使用します

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

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

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

- 直接の非ネイティブ ルートは HTTP 400 を返します
`error.code = "unreadable_encrypted_agent_task"` であり、暗号文はエコーされません
- 対象外の直接非ネイティブルートは HTTP 400 と `error.code = "unreadable_encrypted_agent_task"` を返し、暗号文をエコーしません
`allowEncryptedV2AgentTasks: true` を明示的に有効にした対象の直接キー認証 Responses プロバイダーは、代わりに不透明な暗号文を受け取り、このエラーを回避します
- コンボでは、再試行を含む、そのタスクの正規のネイティブ ChatGPT ターゲットのみが考慮されます。何もない場合
が利用可能な場合は、同じ 400 エラーが返されます。
- 読み取り可能なプレーンテキストのタスクは、通常のルートとフォールバック動作を維持します。

回復オプションは、ネイティブ ChatGPT 子の選択、コンボへのネイティブ ChatGPT ターゲットの追加、異種プロバイダーの委任に v1 を使用する、または呼び出し元を制御するときにタスクをプレーンテキスト v2 `agent_message` コンテンツとして再送信することです。
回復オプションは、ネイティブ ChatGPT 子の選択、不透明なペイロードを処理できる直接キー認証 Responses リレーの明示的な信頼、コンボへのネイティブ ChatGPT ターゲットの追加、異種プロバイダーの委任に v1 を使用する、または呼び出し元を制御するときにタスクをプレーンテキスト v2 `agent_message` コンテンツとして再送信することです。

実験的な `agentTaskRecovery` はデフォルトで無効です。明示的に有効にすると、固定された ChatGPT エンドポイントへの追加の認証済みリクエストでこの形式を回復できますが、クォータと待ち時間が増え、非公開のバックエンド動作に依存します。失敗時は従来の `unreadable_encrypted_agent_task` を維持します。詳細は[英語版の設定リファレンス](/reference/configuration/agents/#encrypted-v2-task-recovery)を参照してください。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ V1 ガイダンスは、`max` または `ultra` でのみプロアクティブ
拒否し、ロールをスキップします(#1190)。TOML 内のレガシー `model_fallback` 行は後方互換性の
ために引き続き読み取られますが、`ocx doctor` がそれをフラグ付けします。

opencodex は、無効、ルーティング不能、異常、冷却期間、またはクォータしきい値の候補をスキップします。可用性スナップショットは `subagentModelFallbackPollMs` に対してキャッシュされます。暗号化された子タスクは、チェーンを正規のネイティブ ChatGPT ターゲットに制限できます。暗号化されたペイロードを読み取ることができる人がいない場合、読み取り不可能な暗号文が別の場所にルーティングされる代わりに、リクエストは失敗します。
opencodex は、無効、ルーティング不能、異常、冷却期間、またはクォータしきい値の候補をスキップします。可用性スナップショットは `subagentModelFallbackPollMs` に対してキャッシュされます。暗号化された子タスクでは、チェーンを正規のネイティブ ChatGPT ターゲットと、`allowEncryptedV2AgentTasks: true` で明示的に信頼された直接のキー認証 Responses ルートに制限します。暗号化されたペイロードを処理できる対象がない場合、読み取り不可能な暗号文を別の場所へ送らず、リクエストは失敗します。コンボは引き続き正規のネイティブ対象だけを使用します

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/ja/reference/proxy-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,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 ターゲットも明示的に信頼された Responses ターゲットもありません。 |
| 426 | `upgrade_required` |応答 WebSocket トランスポートが無効になっているか、アップグレードが失敗しました。 HTTP を使用する |

Anthropic オリジンの失敗は Anthropic のエラー エンベロープでレンダリングされるため、オリジンの拒否は OpenAI スタイルの `origin_rejected` 本体ではなく、その方言上の 403 `permission_error` になります。
Expand Down
4 changes: 2 additions & 2 deletions docs-site/src/content/docs/ko/guides/sub-agent-surface.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ v1에서는 opencodex가 `max` 또는 `ultra` 추론 강도에서만 업스트

중복 모델 id는 첫 번째 출현을 유지한 채 제거합니다. 선택 과정에서 opencodex는 비활성화된 후보, 라우팅 불가 후보, 비활성화된 프로바이더가 받쳐주는 후보, unhealthy로 표시된 후보, cooldown 중인 후보, 사용할 수 있는 pooled Codex 계정이 없는 후보, 또는 설정된 quota 임계치를 넘는 후보를 건너뜁니다. 가용성 프로브는 기본값 60초인 `subagentModelFallbackPollMs` 동안 캐시됩니다.

폴백이 호환되지 않는 암호화 작업을 읽을 수 있게 만들어 주지는 않습니다. 자식 작업이 ChatGPT용으로 암호화되어 있으면, 체인 앞쪽에 외부 모델이 있더라도 선택은 정규 네이티브 ChatGPT 대상만 허용됩니다.
폴백이 호환되지 않는 암호화 작업을 읽을 수 있게 만들어 주지는 않습니다. 자식 작업이 ChatGPT용으로 암호화되어 있으면, 체인 앞쪽에 다른 외부 모델이 있더라도 정규 네이티브 ChatGPT 대상과 `allowEncryptedV2AgentTasks: true`로 명시적으로 신뢰한 직접 키 인증 Responses 라우트만 선택합니다. 콤보는 계속 정규 네이티브 대상만 사용합니다.

## 암호화된 v2 작업 전달

Codex는 v2 네이티브→라우팅 자식 작업을 백엔드 암호화된 `encrypted_content`로만 보낼 수 있습니다. 이 페이로드는 네이티브 ChatGPT 백엔드가 읽을 수 있지만 외부 프로바이더는 읽을 수 없습니다. 이것이 알려진 [#92 제한](https://github.com/lidge-jun/opencodex/issues/92)입니다.

opencodex는 읽을 수 없거나 빈 작업을 그대로 넘기지 않고 안전하게 실패합니다.

- 비네이티브 직접 라우팅은 HTTP 400과 `error.code = "unreadable_encrypted_agent_task"`를 반환하며, 암호문을 에코하지 않습니다.
- 비네이티브 직접 라우팅은 키 인증 Responses 프로바이더가 `allowEncryptedV2AgentTasks: true`로 명시적으로 허용한 경우가 아니면 HTTP 400과 `error.code = "unreadable_encrypted_agent_task"`를 반환하며, 암호문을 에코하지 않습니다.
- 콤보는 해당 작업에 대해 재시도를 포함해 정규 네이티브 ChatGPT 대상만 고려합니다. 사용할 수 있는 대상이 없으면 같은 400 오류를 반환합니다.
- 읽을 수 있는 평문 작업은 정상 라우트와 폴백 동작을 그대로 유지합니다.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ V1 안내는 `max` 또는 `ultra`에서만 선제 텍스트로 제공됩니다.
거부하고 역할을 건너뜁니다 (#1190). TOML의 기존 `model_fallback` 줄은 하위 호환성을 위해
계속 읽히지만 `ocx doctor`가 이를 표시합니다.

opencodex는 비활성, 라우팅 불가, 비정상, 쿨다운 중, 또는 할당량 임계값에 걸린 후보를 건너뜁니다. 사용 가능성 스냅샷은 `subagentModelFallbackPollMs` 동안 캐시됩니다. 암호화된 하위 작업은 체인을 정규 네이티브 ChatGPT 대상으로만 제한할 수 있습니다. 어떤 대상도 암호화된 페이로드를 읽을 수 없으면, 읽을 수 없는 암호문을 다른 곳으로 라우팅하는 대신 요청이 실패합니다.
opencodex는 비활성, 라우팅 불가, 비정상, 쿨다운 중, 또는 할당량 임계값에 걸린 후보를 건너뜁니다. 사용 가능성 스냅샷은 `subagentModelFallbackPollMs` 동안 캐시됩니다. 암호화된 하위 작업은 정규 네이티브 ChatGPT 대상과 `allowEncryptedV2AgentTasks: true`로 명시적으로 신뢰한 직접 키 인증 Responses 라우트만 후보로 사용합니다. 암호화된 페이로드를 처리할있는 대상이 없으면 읽을 수 없는 암호문을 다른 곳으로 보내지 않고 요청이 실패합니다. 콤보는 계속 정규 네이티브 대상만 사용합니다.

```json
{
Expand Down
Loading
Loading