revert: remove the stream throughput watchdog and the live tok/s working line (#1759) - #1761
Conversation
Removal evidence (measured)Tree state — reverts
Focused suites — run on a second machine (macOS arm64, bun 1.4.2, vitest 4.1.11) from a worktree checked out at
Stall handling (#1740) is verified intact by the last row: it is the silence class and keeps its own bounds, copy and shared retry budget. One file-level failure, classified environmental, not a regression: Changelog gate: the PR carries |
…ing line The rate guard shipped in #1743 fails healthy turns. A stream measured at 6.1 tok/s over the 20s window had its request aborted mid tool call, and thinking-heavy models and gateways that batch several tokens into one delta routinely sustain rates under the 8 tok/s floor. The verdict is also the retry classifier's token, so it cannot be softened where it is produced, and it aborts the request controller, discarding the partial answer instead of delivering it slowly. The live rate segment on the working line existed only to make that verdict observable while it was being measured, so it goes with the watchdog; end-of-turn rate is still reported by the builtin TPS extension. Reverts #1743 (ced1dad, d046741) and its follow-up test stub #1748 (e5ab39d), including the settings knobs, the docs rows, the changelog entry and the fork-tracking notes, so neither feature leaves a trace. Silence stalls (#1740) are untouched: that is a different class with its own bounds and its own copy.
…ckers The changes.md trackers must cover every production path a PR touches, so the removal needs an entry in each affected tracker saying these files are back to their pre-guard shape. Without it the next upstream merge would still expect fork-local throughput code that no longer exists.
73bd157 to
fedd1ab
Compare
Fixes #1759
Summary
Removes both halves of #1743 - the provider stream throughput watchdog and the live tok/s segment on the interactive working line - so that neither feature leaves a trace in code, settings, docs, the changelog or the tests.
Why
packages/ai/src/utils/retry.ts), and the verdict aborts the request controller, so the partial answer is discarded rather than delivered slowly.What changed
Reverts
ced1dadeb1andd04674187c(#1743) pluse5ab39dba8(#1748, the test stub that existed only to feed the tok/s reader):packages/agent/src/stream-throughput-watchdog.ts,packages/agent/test/agent-loop-throughput-watchdog.test.ts,packages/coding-agent/test/suite/retry-fallback-throughput-degraded.test.ts;AgentLoopConfig.streamThroughput/AgentOptions.streamThroughput, the index exports and the agent-loop reader wiring are gone, leaving the start-bound and idle-bound guards as before;isProviderStreamThroughputDegradedError, the"provider stream throughput degraded"retryable alternation, the_handleRetryableErrorbranch, thestream_throughput_degradedevent and its notice box are gone;retry.provider.minThroughputTokensPerSecond/throughputWindowMs/throughputGraceMsremoved from the settings type,SettingsManager,core/sdk.ts, the test harness anddocs/settings.md;Working (<elapsed> • esc to interrupt);changes.mdsections are deleted rather than annotated, per the issue: this is a withdrawal, not a documented change.Stall surfacing (#1740 / #1744) is deliberately untouched - silence is a different class with its own bounds and copy.
Verification
62c03f1b37); the other 7 differ only by unrelated later work (fix(coding-agent): explain provider stream stalls instead of showing the watchdog string #1744 stall copy, the resident-store change,/rename), with zero throughput-related diff lines.git grep -E 'minThroughputTokensPerSecond|throughputWindowMs|throughputGraceMs|StreamRateMeter|formatWorkingRateSegment|StreamThroughputDegraded|stream-throughput-watchdog|streamThroughput|estimateStreamedUnits|stream_throughput_degraded|getWorkingTokensPerSecond'returns nothing.Summary by cubic
Fixes #1759 by reverting the stream throughput watchdog and the live tok/s working-line segment from #1743, so slow-but-alive streams finish instead of being aborted mid-answer. The 8 tok/s floor was tripping healthy turns from thinking-heavy models and batching gateways, and the abort discarded the partial answer; the rate readout existed only to make that verdict visible.
What changed
streamThroughputand theretry.provider.minThroughputTokensPerSecond/throughputWindowMs/throughputGraceMssettings; existing values in user configs are now ignored.Working (<elapsed> • esc to interrupt).Written for commit fedd1ab. Summary will update on new commits.