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
23 changes: 21 additions & 2 deletions docs-site/src/content/docs/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,27 @@ labels local presets separately; those normally omit both `authMode` and `apiKey
The [`retryOn429`](/reference/configuration/) same-key 429 replay applies only to API-key
providers (`authMode: "key"`). OAuth, forward, and local presets are excluded — their
credentials must never be replayed on the same token, and local runtimes have no remote key to
preserve. It is opt-in: when the option is absent the feature is off; object presence enables
it unless `enabled: false`.
preserve. It is opt-in except for documented destination-specific defaults. Canonical Mistral
Chat uses a patient retry policy (6 replays, 10-second fallback interval), within the
existing request-wide send allowance. Explicit `retryOn429` settings, including
`enabled: false`, take precedence. The Mistral preset also forwards supplied prompt-cache
keys by default; `promptCacheKey: false` disables forwarding. Cache affinity improves the
chance of reuse, but does not guarantee a cache hit or remove token-throughput limits.

Mistral uses one API-key provider for both Studio and Vibe keys. Key types and plan allowances
are described in [Mistral's API-key documentation](https://docs.mistral.ai/admin/identity-access/api-keys);
the proxy does not infer a subscription tier from the key. For every model, explicit upstream
`Retry-After` deadlines are shared between calls on the same credential and model. A 429
without a retry time can activate a conservative 60-second recovery wait when valid minute
counters show exhausted capacity, or the refused query's measured cost exceeds the remaining
tokens while fitting the full advertised allowance. This is a local recovery policy, not an
exact server-reset prediction. Healthy traffic never predicts the next query's cache or cost.
After the wait, one recovery probe runs; success restores ordinary traffic. Missing, malformed,
zero-entitlement, exhausted-monthly, or above-full-allowance evidence does not invent a reset or compact history.
`requestPacing: { "enabled": false }` or `retryOn429: { "respectRetryAfter": false }`
disables shared pacing. If Mistral's
retry time exceeds `retryOn429.maxIntervalMs`, the proxy returns the 429 and retry hint rather
than replaying early. Context windows and per-model compaction preferences remain independent.

When round-robin key selection is enabled, queued requests recheck key cooldowns before sending and acquire pacing capacity for any replacement key. This applies to native Chat, Messages, Responses and compact. Waiting for replacement-key capacity does not consume the upstream response-header timeout. Per-key pacing and round-robin use guarded HTTP/SSE even when upstream WebSockets are enabled; WebSocket-only steering and injection require a route without those key policies. This does not change the saved active key. An established upstream turn keeps its credential; later sends are refused if that key cools. Pre-output key rejection can recover to a healthy key within the existing request limit. Direct Images and compact requests record genuine 401/429 cooldowns without replaying that paid POST.

Expand Down
5 changes: 4 additions & 1 deletion docs-site/src/content/docs/ja/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ Codex login を Pool モードで使うと、Providers の概要には任意の
[`retryOn429`](/ja/reference/configuration/)(同一キーでの 429 リトライ)は API キー プロバイダー
(`authMode: "key"`)のみに適用されます。OAuth・forward・ローカル プリセットは除外されます —
同じトークンを再送すべきではなく、ローカルランタイムには保存すべきリモートキーがありません。
オプトインです: オプションが無ければ無効、オブジェクトがあれば `enabled: false` でない限り有効です。
通常はオプトインです。正規の Mistral `openai-chat`(`https://api.mistral.ai/v1`)では、
オプションを省略すると同一キーで最大 6 回再送し、待機間隔の既定値は 10 秒です。
明示的な設定が優先され、`enabled: false` でこの既定の再試行を無効にできます。
他の対象では、オブジェクトを指定すると `enabled: false` でない限り有効になります。

## 1. ChatGPT ログイン(forward / パススルー)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ account を削除しても mapping は保持され、同じ id を再追加す
| `parallelToolCalls?` | `boolean` |並列ツール呼び出しを切り替えます。 OpenAI Chat はデフォルトでオンになっています。非チャット アダプターは明示的な `true` でのみアドバタイズします。 |
| `responsesItemIdRepair?` | `{ message?: string[]; reasoning?: string[]; repairMissingTerminalIds?: boolean; repairInvalidIds?: boolean }` |正確なプレースホルダー ID、欠落している端末 ID、および(`repairInvalidIds` で)正規の `msg_`/`rs_` 接頭辞を欠く message/reasoning ID に対するダウンストリーム SSE 修復はデフォルトで無効になっています。関数呼び出し ID は決して書き換えられません。組み込み DeepSeek は最後の 2 つをデフォルトで有効にします。 |
| `responsesSnapshotRepair?` | `boolean` | デフォルトで無効のクライアント向け修復です。SSE と JSON の Responses ライフサイクルで欠落した status、output、ツールメタデータを補完し、raw 検査と永続化は変更しません。 |
| `retryOn429?` | `{ enabled?: boolean; attempts?: number; intervalMs?: number; maxIntervalMs?: number; respectRetryAfter?: boolean }` | API-key プロバイダーのみ(`authMode: "key"`)。オプトインの同一ターゲット 429 リトライ: `retryOn429` が無ければ無効で、オブジェクトがあれば `enabled: false` でない限り有効になります。429 時に待機(上流の `Retry-After` または固定間隔)してから、キー フェイルオーバーの前に同一キーで同一リクエストを再送します — メインのテキストターン回復ループ、Responses passthrough、画像/動画ブリッジ、web-search サイドカー、ターミナル継続要求をすべてカバーします。再送の対象はプリストリームの HTTP 429 応答のみで、カスタム `runTurn` トランスポートは HTTP リトライループの対象外です。`attempts` は最初の 429 以降の同一キー再送回数(合計送信数 = `attempts` + 1)で、メインの回復ループ・ターミナルガード継続・ブリッジ再試行で共有されるリクエスト単位の予算です。`attempts` を使い切っても同一キーでの再送が止まるだけで、通常のキー フェイルオーバーまたは最終エラー処理が利用可能なターゲットに応じて続きます — キー認証の passthrough ワイヤにはフェイルオーバーがないため、使い切った 429 はそのまま返ります。Codex 自体は 429 をリトライしないため、単一キーのプロバイダーでは唯一の防御です。デフォルト: `enabled: true`、`attempts: 3`、`intervalMs: 5000`、`maxIntervalMs: 60000`(1回の待機は `maxIntervalMs` で上限、その上限は 600000)、`respectRetryAfter: true`。 |
| `retryOn429?` | `{ enabled?: boolean; attempts?: number; intervalMs?: number; maxIntervalMs?: number; respectRetryAfter?: boolean }` | API-key プロバイダーのみ(`authMode: "key"`)。同一ターゲットの 429 リトライ。正規の Mistral `openai-chat`(`https://api.mistral.ai/v1`)では、設定を省略すると同一キーで最大 6 回再送し、待機間隔の既定値は 10 秒です。明示的な設定が優先され、`enabled: false` でこの既定の再試行を無効にできます。通常、他の対象はオプトインで、オブジェクトを指定すると `enabled: false` でない限り有効になります。429 時に待機(上流の `Retry-After` または固定間隔)してから、キー フェイルオーバーの前に同一キーで同一リクエストを再送します — メインのテキストターン回復ループ、Responses passthrough、画像/動画ブリッジ、web-search サイドカー、ターミナル継続要求をすべてカバーします。再送の対象はプリストリームの HTTP 429 応答のみで、カスタム `runTurn` トランスポートは HTTP リトライループの対象外です。`attempts` は最初の 429 以降の同一キー再送回数(合計送信数 = `attempts` + 1)で、メインの回復ループ・ターミナルガード継続・ブリッジ再試行で共有されるリクエスト単位の予算です。`attempts` を使い切っても同一キーでの再送が止まるだけで、通常のキー フェイルオーバーまたは最終エラー処理が利用可能なターゲットに応じて続きます — キー認証の passthrough ワイヤにはフェイルオーバーがないため、使い切った 429 はそのまま返ります。Codex 自体は 429 をリトライしないため、単一キーのプロバイダーでは唯一の防御です。オブジェクト指定時のデフォルト: `enabled: true`、`attempts: 3`、`intervalMs: 5000`、`maxIntervalMs: 60000`(1回の待機は `maxIntervalMs` で上限、その上限は 600000)、`respectRetryAfter: true`。 |
| `transientRetryOn5xx?` | `{ enabled?: boolean; attempts?: number }` | キー認証の `openai-chat` および `openai-responses` プロバイダーのみ。`authMode: "forward"` のプロバイダー(ChatGPT アカウントプール)はこのオプションを読まず、既定の再試行段数を維持します。ストリーム開始前に上流から返される一時的なステータス(500、502、503、504、520、521、522)に対するオプトインの再試行です。設定がなければ無効で、オブジェクトを指定すると `enabled: false` でない限り有効になります。最初の Responses リクエスト、ターミナルガード継続、ネイティブの `/v1/chat/completions`、および 429/アカウント回復時の再取得が対象です。`attempts` は最初の送信を含め、1 回のリクエストで許可される上流への送信総数です(1~10、デフォルトは 3)。接続リセット回復と共有するリクエスト単位の単一予算であるため、`3` を指定した場合、プロバイダーに到達する実リクエストは最大 3 回です。待機には 400 ms を基準とする固定式の指数バックオフを使用し、上限は 5 秒で、`Retry-After` に従います。レート制限を扱う `retryOn429` とは別の機能であり、ストリーム開始後の失敗は再送されません。 各 Combo ターゲットでは、事前予約した初回送信もそのターゲットの設定総数に含まれます。`attempts: 1` は 1 回だけ送信し、予約を返却して余裕を作ったり、共有上限を広げたりしません。送信前のローカル拒否やキャンセルでは未使用の予約を解放します。 |
| `retryOnReset?` | `{ enabled?: boolean; replacements?: number }` | ネイティブ `openai-responses` プロバイダー(`authMode: "forward"` を含む)と、上流ヘッダー受信前の汎用 Responses 変換経路に適用されます。呼び出し側が何も観測しないまま失敗した送信を、オプトインで置き換えます。設定がなければ無効で、オブジェクトを指定すると `enabled: false` でない限り有効になります。レスポンスヘッダーが届く前に接続が切れた場合と、ヘッダー後に SSE 本文が制御イベントだけを運んだまま切れた場合の両方が対象です。canonical ChatGPT upstream WebSocket で create フレームの送信後、Responses イベントが届く前にソケットが閉じたかエラーになった場合も同じく対象で、その置き換えは HTTP で送信します。置き換えるのは自己完結したリクエストだけで、`store: false`、完全な `input`、`previous_response_id` / `conversation` / `stream_id` がないこと、クライアントが実行するツールのみ、が条件です。`replacements` は、すべてのレッグとすべてのコンボ子リクエストを合わせて 1 つの論理リクエストが行える置き換え送信の回数です(1..2、デフォルトは 1)。レッグ単位の再試行回数でも送信予算でもないため、置き換え送信もそのレッグがすでに持つ送信許容量に収まる必要があります。すでに出力やツール呼び出しを送ったリクエストは、この値に関わらず置き換えません。元の送信がすでに開始されていた場合は置き換えた推論も課金される可能性があるため、既定では無効です。 汎用変換経路では、初回送信と再構築後の送信のどちらも、同じ許可と送信予算でヘッダー受信前の接続リセットを置き換えます。アダプター独自のトランスポートと、上流ヘッダー受信後の変換ストリーム障害は対象外です。 |
| `autoToolChoiceOnlyModels?` | `string[]` | `tool_choice` が `auto` または `none` のみを受け入れるモデル。強制的な選択は格下げされます。 |
Expand Down
6 changes: 4 additions & 2 deletions docs-site/src/content/docs/ko/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ shipped v1 config는 marker 2의 단일 옵션 행으로 자동 이관됩니다.

[`retryOn429`](/ko/reference/configuration/)(동일 키 429 재시도)는 API 키 프로바이더
(`authMode: "key"`)에만 적용됩니다. OAuth·forward·로컬 프리셋은 제외됩니다 — 같은 토큰을
재전송해서는 안 되며, 로컬 런타임에는 보존할 원격 키가 없습니다. 옵트인입니다: 옵션이 없으면
꺼져 있고, 객체가 있으면 `enabled: false`가 아닌 한 활성화됩니다.
재전송해서는 안 되며, 로컬 런타임에는 보존할 원격 키가 없습니다. 일반적으로 명시적 설정이 필요합니다. 정식 Mistral `openai-chat` 엔드포인트
(`https://api.mistral.ai/v1`)는 옵션이 없으면 동일 키로 최대 6회 재전송하며 기본 대기 간격은 10초입니다.
명시적 설정이 우선하고, `enabled: false`는 이 기본 재시도를 끕니다.
다른 대상은 객체가 있으면 `enabled: false`가 아닌 한 활성화됩니다.

## 1. ChatGPT 로그인 (forward / 패스스루)

Expand Down
Loading
Loading