Skip to content
Open
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
2 changes: 1 addition & 1 deletion docs/configuration.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ URL キー付きレーン(または `bind` を持つ名前付きエントリ

予算との相互作用:バッチの達成可能なフォールドレートは、プール(`concurrency`)に収まる呼び出しの数と、各呼び出しが許容される時間(`targetTimeoutMs`)によって制限されます — 予算だけでは結果を制御できません。飽和したプールは可視的なエラーとして表面化しません:総期限が切れた時点でまだキューイングされているバッチは、試行が記録されず(`attempts=[]`)、`batch=deadline` として破棄され、フォールドパスは混雑の背後にさらなるラウンドをキューイングする代わりにそこで停止します。自動フォールドでは、これは一時的なスケジューラ混雑として扱われ、**チェーンの失敗ではありません**:10 分間のバックオフは設定されず、次のターンで(おそらく空になった)プールに再試行されます。ターゲットへの直接呼び出しが素早く成功しているのにこれらの行が見える場合、制約条件はタイムアウトではなくプールです。

期限セマンティクス(#4833):`targetTimeoutMs` はすべての単一ディスパッチに上限を設けます — 1 つの遅い呼び出しが `totalTimeoutMs` 全体を使い切ることはできません。1 ターゲットのチェーンであっても同様です(フォールスルー順序の各ターゲットは、共有総量から引き出される独自の新しい `targetTimeoutMs` ウィンドウを得ます)。期限が切れた場合、実行中の試行は中止され、**再試行されません**:有界リトライループ(`attempt 1/3`)は、一時的なプロバイダー判定(429/5xx/リスク管理ボディマーカー)とフェイルファストなネットワーク死のみを再ディスパッチします。期限による中止は試行を即座に終了します。失敗ログは、どのクロックが期限切れになったかを特定します:試行ごとの警告行にはソース — `target-timeout`、`batch-deadline`、または真のダウンストリームキャンセルのための `client-abort` — と安全な診断情報(経過時間、適用中の予算、ワイヤプロトコル/ストリームモード、ペイロードバイトサイズ、入力トークン推定値、出力文字数上限)が含まれ、`completed N/M range(s)` 行は各試行の詳細を記録します(`attempts=[t0:timeout (target-timeout 25000ms (elapsed 25002ms))]`)。`compress` 呼び出しが完全に失敗した場合、同じ診断情報がツール結果に乗ります。大規模コンテキストワークロードのサイズ設定:非ストリーミングサマリーは、最初のバイトが到着する前に完全な生成レイテンシを支払うため、`targetTimeoutMs` は、最大の予想入力に対する入力処理と完全なサマリー生成をカバーする必要があります — 数十万トークンは、遅いエンドポイントでは 25 秒のデフォルトを容易に超えます。大きなフォールドで `target-timeout` が見える場合、チェーンを無効にするのではなく、`targetTimeoutMs` を引き上げてください(そして、予想されるフォールスルー深度に対して `totalTimeoutMs` が十分大きくなるようにしてください)。
期限セマンティクス(#4833):`targetTimeoutMs` はすべての単一ディスパッチに上限を設けます — 1 つの遅い呼び出しが `totalTimeoutMs` 全体を使い切ることはできません。1 ターゲットのチェーンであっても同様です(フォールスルー順序の各ターゲットは、共有総量から引き出される独自の新しい `targetTimeoutMs` ウィンドウを得ます)。`totalTimeoutMs` が省略された場合、デフォルトは `targetTimeoutMs × ターゲット数`(50 秒のデフォルト値を下限、600 秒を上限)となり、各順序ターゲットが完全なウィンドウを得られます — 単独の `targetTimeoutMs: 90000` がもはや `compress` ブロック全体を拒否しなくなります(#7100)。期限が切れた場合、実行中の試行は中止され、**再試行されません**:有界リトライループ(`attempt 1/3`)は、一時的なプロバイダー判定(429/5xx/リスク管理ボディマーカー)とフェイルファストなネットワーク死のみを再ディスパッチします。期限による中止は試行を即座に終了します。失敗ログは、どのクロックが期限切れになったかを特定します:試行ごとの警告行にはソース — `target-timeout`、`batch-deadline`、または真のダウンストリームキャンセルのための `client-abort` — と安全な診断情報(経過時間、適用中の予算、ワイヤプロトコル/ストリームモード、ペイロードバイトサイズ、入力トークン推定値、出力文字数上限)が含まれ、`completed N/M range(s)` 行は各試行の詳細を記録します(`attempts=[t0:timeout (target-timeout 25000ms (elapsed 25002ms))]`)。`compress` 呼び出しが完全に失敗した場合、同じ診断情報がツール結果に乗ります。大規模コンテキストワークロードのサイズ設定:非ストリーミングサマリーは、最初のバイトが到着する前に完全な生成レイテンシを支払うため、`targetTimeoutMs` は、最大の予想入力に対する入力処理と完全なサマリー生成をカバーする必要があります — 数十万トークンは、遅いエンドポイントでは 25 秒のデフォルトを容易に超えます。大きなフォールドで `target-timeout` が見える場合、チェーンを無効にするのではなく、`targetTimeoutMs` を引き上げてください(そして、予想されるフォールスルー深度に対して `totalTimeoutMs` が十分大きくなるようにしてください)。

2 つの任意のノブが、チェーンを**プロキシ駆動の自動フォルダー**(`autoFold`)に変えます:`"autoFold": true` を設定すると、プロキシはモデルが圧縮ツールを呼び出すのを待たなくなります — オーバーフローウィンドウを保護するのと同じゼロモデルフォールディングエンジンが、外部チェーンとカーネル選択範囲を使用して、転送する*前に*会話を `autoFoldTargetTokens`(デフォルト:モデルウィンドウの半分)まで折りたたみます。モデルはナッジを見ることも、圧縮計画を作成するために思考トークンを消費することもありません。このノブはブロックの残りの部分と同様に、チェーン全体の置き換えセマンティクスを持ちます。チェーン自体が有効な間のみ効果が現れます — 無効(または `enabled` が省略された)チェーンにどちらかのノブを設定しても効果はなく、静かに失敗するのではなく、警告として 1 回ログに記録されます。`autoFoldTargetTokens` は `[8192, 10000000]` の範囲の整数でなければなりません。失敗はフェイルオープンです:フォールド時にチェーンがエラーになると、リクエストはそのまま転送され、10 分間のバックオフが自動フォールディングを抑制し、そのウィンドウの間は従来の助言ナッジが戻ります。1 つの例外(#2662):共有プールが飽和しているため、バッチは送信されたがサマリー呼び出しが一度もディスパッチされなかったことによる、純粋なキュードロップによるゼロ進捗フォールドは、スケジューラ混雑でありチェーンの失敗ではないため、バックオフを設定しません。自動フォールドは単に次のターンで再試行します。

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ Up to 16 targets per chain are supported. Saving an enabled chain through the We

Interaction with the budget: the achievable fold rate of a batch is bounded by how many calls fit in the pool (`concurrency`) and how long each may take (`targetTimeoutMs`) — the budget alone does not control the outcome. A saturated pool does not surface as a visible error: a batch still queued when its total deadline expires is discarded as `batch=deadline` with no attempts recorded (`attempts=[]`), and the fold pass stops there instead of queueing further rounds behind the congestion. For auto-fold this is treated as transient scheduler congestion, **not** a chain failure: no 10-minute backoff arms, and the next turn retries into the (hopefully drained) pool. If you see those lines while direct calls to your target succeed quickly, the pool — not the timeout — is the binding constraint.

Deadline semantics (#4833): `targetTimeoutMs` caps every single dispatch — one slow call cannot spend the whole `totalTimeoutMs`, even on a one-target chain (each target in the fall-through order gets its own fresh `targetTimeoutMs` window, all drawn from the shared total). When a deadline expires the in-flight attempt is aborted and **not retried**: the bounded retry loop (`attempt 1/3`) re-dispatches only transient provider verdicts (429/5xx/risk-control body markers) and fail-fast network deaths; a deadline abort ends the attempt immediately. Failure logging names which clock expired: the per-attempt warn line carries the source — `target-timeout`, `batch-deadline`, or `client-abort` for a genuine downstream cancellation — plus safe diagnostics (elapsed time, the budgets in force, wire protocol/stream mode, payload byte size, an input token estimate, and the output character cap), and the `completed N/M range(s)` line records each attempt's detail (`attempts=[t0:timeout (target-timeout 25000ms (elapsed 25002ms))]`); the same diagnostics ride the tool result when a `compress` call fails wholesale. Sizing for large-context workloads: a non-streaming summary pays its full generation latency before any byte arrives, so `targetTimeoutMs` must cover input processing plus complete summary generation at your largest expected input — several hundred thousand tokens routinely exceeds the 25 s default on slower endpoints. If you see `target-timeout` on big folds, raise `targetTimeoutMs` (and keep `totalTimeoutMs` large enough for the fall-through depth you expect) rather than disabling the chain.
Deadline semantics (#4833): `targetTimeoutMs` caps every single dispatch — one slow call cannot spend the whole `totalTimeoutMs`, even on a one-target chain (each target in the fall-through order gets its own fresh `targetTimeoutMs` window, all drawn from the shared total). When `totalTimeoutMs` is omitted, it defaults to `targetTimeoutMs × target count` (floored at the 50 s default, capped at 600 s) so each sequential target gets its full window — a lone `targetTimeoutMs: 90000` no longer rejects the whole `compress` block (#7100). When a deadline expires the in-flight attempt is aborted and **not retried**: the bounded retry loop (`attempt 1/3`) re-dispatches only transient provider verdicts (429/5xx/risk-control body markers) and fail-fast network deaths; a deadline abort ends the attempt immediately. Failure logging names which clock expired: the per-attempt warn line carries the source — `target-timeout`, `batch-deadline`, or `client-abort` for a genuine downstream cancellation — plus safe diagnostics (elapsed time, the budgets in force, wire protocol/stream mode, payload byte size, an input token estimate, and the output character cap), and the `completed N/M range(s)` line records each attempt's detail (`attempts=[t0:timeout (target-timeout 25000ms (elapsed 25002ms))]`); the same diagnostics ride the tool result when a `compress` call fails wholesale. Sizing for large-context workloads: a non-streaming summary pays its full generation latency before any byte arrives, so `targetTimeoutMs` must cover input processing plus complete summary generation at your largest expected input — several hundred thousand tokens routinely exceeds the 25 s default on slower endpoints. If you see `target-timeout` on big folds, raise `targetTimeoutMs` (and keep `totalTimeoutMs` large enough for the fall-through depth you expect) rather than disabling the chain.

Two optional knobs turn the chain into a **proxy-driven auto-folder** (`autoFold`): with `"autoFold": true` the proxy stops waiting for the model to call the compression tool at all — the same zero-model folding engine that guards the overflow window also folds the conversation down to `autoFoldTargetTokens` (default: half the model window) *before* forwarding, using the external chain and kernel-chosen ranges. The model never sees a nudge and never spends thinking tokens drafting compression plans. The knob rides whole-chain replace semantics like the rest of the block; it only takes effect while the chain itself is enabled — setting either knob on a disabled (or omitted-`enabled`) chain has no effect and is logged once as a warning rather than failing silently. `autoFoldTargetTokens` must be an integer in `[8192, 10000000]`. Failure is fail-open: if the chain errors at fold time, the request forwards as-is, a 10-minute backoff suppresses auto-folding, and classic advisory nudges return for that window. One exception (#2662): a zero-progress fold caused purely by queue drops — batches submitted but no summary call ever dispatched because the shared pool is saturated — does not arm the backoff, since that is scheduler congestion rather than a chain failure; auto-fold simply retries on the next turn.

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ URL 键通道(或带 `bind` 的命名条目)可以向上游发送**自己的

与 budget 的交互:一个批次能达到的折叠速率由池能容纳的并发数(`concurrency`)和每次调用的时限(`targetTimeoutMs`)共同决定 —— 单看 budget 并不能解释结果。池饱和不会表现为可见错误:批次还在排队就耗尽总时限的话,会被整体丢弃为 `batch=deadline` 且没有任何尝试记录(`attempts=[]`),折叠过程也会就地停止而不是继续排在拥塞后面。对 auto-fold 而言这被当作暂时的调度拥塞而**非**链路故障:不会触发下文所述的 10 分钟退避,下一个回合会在(有望已排空的)池子上重试。如果你看到这些日志行、而直接调用目标却很快成功,说明瓶颈是池而不是超时。

deadline 语义(#4833):`targetTimeoutMs` 限制的是**每一次单独派发**——即使链上只有一个目标,一次慢调用也不能吃掉整个 `totalTimeoutMs`(回退顺序里的每个目标都拿到自己全新的 `targetTimeoutMs` 窗口,全部从共享的总预算里扣)。某个 deadline 到期时,在途的这次尝试会被中止且**不会重试**:有界重试循环(`attempt 1/3`)只对瞬时 provider 判定(429/5xx/风控 body 标记)和 fail-fast 网络死亡重新派发;deadline 中止会立即终结该次尝试。失败日志会标明是哪只时钟到期:每次尝试的 warn 行携带来源——`target-timeout`、`batch-deadline`,或真正的下游取消时的 `client-abort`——外加安全诊断(已耗时、实际生效的预算、协议/流式模式、payload 字节数、输入 token 估计与输出字符上限),`completed N/M range(s)` 行记录每个尝试的明细(`attempts=[t0:timeout (target-timeout 25000ms (elapsed 25002ms))]`);当一次 `compress` 整体失败时,同样的诊断也会进入工具结果。大上下文场景取值建议:非流式摘要在收到任何字节之前就要付完整生成延迟,所以 `targetTimeoutMs` 必须覆盖你最大预期输入下的处理 + 完整生成时间——几十万 token 在较慢端点上经常超过默认的 25 秒。若大折叠出现 `target-timeout`,应调高 `targetTimeoutMs`(并保持 `totalTimeoutMs` 足以容纳你预期的回退深度),而不是直接禁用整条链。
deadline 语义(#4833):`targetTimeoutMs` 限制的是**每一次单独派发**——即使链上只有一个目标,一次慢调用也不能吃掉整个 `totalTimeoutMs`(回退顺序里的每个目标都拿到自己全新的 `targetTimeoutMs` 窗口,全部从共享的总预算里扣)。省略 `totalTimeoutMs` 时,它默认为 `targetTimeoutMs × 目标数`(下限 50 秒默认值,上限 600 秒),让每个顺序目标都拿到完整窗口 —— 单独写 `targetTimeoutMs: 90000` 不再拒绝整个 `compress` 段(#7100)。某个 deadline 到期时,在途的这次尝试会被中止且**不会重试**:有界重试循环(`attempt 1/3`)只对瞬时 provider 判定(429/5xx/风控 body 标记)和 fail-fast 网络死亡重新派发;deadline 中止会立即终结该次尝试。失败日志会标明是哪只时钟到期:每次尝试的 warn 行携带来源——`target-timeout`、`batch-deadline`,或真正的下游取消时的 `client-abort`——外加安全诊断(已耗时、实际生效的预算、协议/流式模式、payload 字节数、输入 token 估计与输出字符上限),`completed N/M range(s)` 行记录每个尝试的明细(`attempts=[t0:timeout (target-timeout 25000ms (elapsed 25002ms))]`);当一次 `compress` 整体失败时,同样的诊断也会进入工具结果。大上下文场景取值建议:非流式摘要在收到任何字节之前就要付完整生成延迟,所以 `targetTimeoutMs` 必须覆盖你最大预期输入下的处理 + 完整生成时间——几十万 token 在较慢端点上经常超过默认的 25 秒。若大折叠出现 `target-timeout`,应调高 `targetTimeoutMs`(并保持 `totalTimeoutMs` 足以容纳你预期的回退深度),而不是直接禁用整条链。

两个可选旋钮可把这条链升级为**代理驱动的自动折叠器**(`autoFold`):`"autoFold": true` 后代理不再等模型调压缩工具 —— 原本只守溢出窗口的零模型折叠引擎同样会在转发前把对话折到 `autoFoldTargetTokens`(默认:模型窗口的一半)以下,范围由内核选定、摘要由外部链完成。主模型完全看不到 nudge,也不会把思考预算花在起草压缩方案上。该旋钮随整链替换语义生效,且只在链本身启用时才起作用——在链未启用(或省略 `enabled`)时设置任一旋钮均无效,并会记录一次警告而非静默失效;`autoFoldTargetTokens` 必须是 `[8192, 10000000]` 内的整数。失败时 fail-open:链在折叠时出错则照常转发请求,退避 10 分钟内暂停自动折叠并恢复经典 advisory nudge。一个例外(#2662):若零进展完全由队列丢弃造成——批次已提交但因共享池饱和、没有任何一次摘要调用真正派发——则不触发退避(那是调度拥塞而非链故障),auto-fold 在下一轮直接重试。

Expand Down
Loading
Loading