You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1743 (issue #1739) shipped two user-facing behaviours that are being withdrawn in full:
a sustained-rate watchdog that aborts an in-flight provider stream whose measured rate falls below retry.provider.minThroughputTokensPerSecond (default 8 tok/s over a 20s window), surfaced as Provider stream throughput degraded: <n> tok/s over <n>s (floor <n> tok/s);
a live - N.N tok/s segment on the interactive working line, added only so that verdict was observable while it was being measured.
Both must be removed completely - code, settings, docs, changelog entry, fork-tracking notes and tests - so the tree reads as if neither had ever been written.
Why
The floor fires on healthy turns. A normal turn measured at 6.1 tok/s over the 20s window had its request aborted mid tool call; the transcript showed the tool call as error plus the raw watchdog string. Thinking-heavy models and gateways that batch several tokens per delta legitimately sustain rates under the shipped floor, so the guard turns a slow-but-correct answer into a hard failure and spends a fallback hop on it.
It cannot be softened in place. The wording is simultaneously the classifier token (packages/ai/src/utils/retry.ts), so the message cannot be reworded, and the verdict aborts the request controller, so the partial answer for that turn is discarded rather than delivered slowly.
The readout has no remaining purpose. With the watchdog gone, a per-delta rate on the working line is noise on every turn; end-of-turn rate is already reported by the builtin TPS extension.
Expected (ideal state)
No trace of either feature on main:
packages/agent/src/stream-throughput-watchdog.ts deleted, together with AgentLoopConfig.streamThroughput, AgentOptions.streamThroughput and the packages/agent/src/index.ts exports.
The agent-loop assistant reader back to the start-bound and idle-bound guards only.
isProviderStreamThroughputDegradedError, the "provider stream throughput degraded" retryable pattern, the _handleRetryableError branch, the stream_throughput_degraded session event and its interactive notice box all gone.
retry.provider.minThroughputTokensPerSecond / throughputWindowMs / throughputGraceMs removed from the settings type, from SettingsManager.getAgentStreamThroughputOptions(), from core/sdk.ts, from the test harness and from the docs/settings.md rows and example.
Working line back to Working (<elapsed> - esc to interrupt); StreamRateMeter, estimateStreamedUnits and getWorkingTokensPerSecond() gone from interactive mode.
Tests: packages/agent/test/agent-loop-throughput-watchdog.test.ts and packages/coding-agent/test/suite/retry-fallback-throughput-degraded.test.ts deleted; the settings-manager, working-status and interactive-mode-status (test(coding-agent): unbreak main's working-indicator status test #1748) additions reverted; the explanatory comment added to agent-loop-stream-start-timeout.test.ts restored to its previous text.
The CHANGELOG bullet and the changes.md sections describing the feature are deleted, not annotated: the removal is a withdrawal, not a documented change.
Summary
#1743 (issue #1739) shipped two user-facing behaviours that are being withdrawn in full:
retry.provider.minThroughputTokensPerSecond(default 8 tok/s over a 20s window), surfaced asProvider stream throughput degraded: <n> tok/s over <n>s (floor <n> tok/s);- N.N tok/ssegment on the interactive working line, added only so that verdict was observable while it was being measured.Both must be removed completely - code, settings, docs, changelog entry, fork-tracking notes and tests - so the tree reads as if neither had ever been written.
Why
errorplus the raw watchdog string. Thinking-heavy models and gateways that batch several tokens per delta legitimately sustain rates under the shipped floor, so the guard turns a slow-but-correct answer into a hard failure and spends a fallback hop on it.packages/ai/src/utils/retry.ts), so the message cannot be reworded, and the verdict aborts the request controller, so the partial answer for that turn is discarded rather than delivered slowly.Expected (ideal state)
No trace of either feature on
main:packages/agent/src/stream-throughput-watchdog.tsdeleted, together withAgentLoopConfig.streamThroughput,AgentOptions.streamThroughputand thepackages/agent/src/index.tsexports.isProviderStreamThroughputDegradedError, the"provider stream throughput degraded"retryable pattern, the_handleRetryableErrorbranch, thestream_throughput_degradedsession event and its interactive notice box all gone.retry.provider.minThroughputTokensPerSecond/throughputWindowMs/throughputGraceMsremoved from the settings type, fromSettingsManager.getAgentStreamThroughputOptions(), fromcore/sdk.ts, from the test harness and from thedocs/settings.mdrows and example.Working (<elapsed> - esc to interrupt);StreamRateMeter,estimateStreamedUnitsandgetWorkingTokensPerSecond()gone from interactive mode.packages/agent/test/agent-loop-throughput-watchdog.test.tsandpackages/coding-agent/test/suite/retry-fallback-throughput-degraded.test.tsdeleted; the settings-manager, working-status and interactive-mode-status (test(coding-agent): unbreak main's working-indicator status test #1748) additions reverted; the explanatory comment added toagent-loop-stream-start-timeout.test.tsrestored to its previous text.changes.mdsections describing the feature are deleted, not annotated: the removal is a withdrawal, not a documented change.Acceptance criteria
git grep -E 'minThroughputTokensPerSecond|throughputWindowMs|throughputGraceMs|StreamRateMeter|StreamThroughputDegraded|stream-throughput-watchdog|streamThroughput|estimateStreamedUnits|stream_throughput_degraded|getWorkingTokensPerSecond'returns nothing.Working (1m 12s - esc to interrupt).packages/agentagent-loop suites,packages/coding-agentsettings-manager / interactive-mode-status / interactive-mode-working-status /test/suiteretry-fallback suites,packages/airetry suites.Related