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
{{ message }}
Repository navigation
Port timeout.firstChunkMs, toolMs, and per-tool timeouts #702
Follow-up to #697, which ports timeout.totalMs, stepMs, and chunkMs for generateText and streamText. Upstream TimeoutConfiguration also has:
firstChunkMs: the timeout until the first content chunk of each step (streaming only). generateText warns that it is unsupported.
toolMs and tools ({toolName}Ms): the timeout of tool executions. A tool that runs too long aborts and returns a tool-error.
Upstream tests not ported yet:
generate-text.test.ts > options.timeout: "should warn before the model responds when $warning.feature is configured" (the firstChunkMs case) and "should warn about both streaming-only timeouts in one call".
stream-text-timeout.test.ts: the whole streamText first chunk timeout describe, and streamText model output timeout boundaries (needs stream retries and tool timeouts).
execute-tool-call.test.ts and prepare-language-model-call-options.test.ts: the tool timeout and getToolTimeoutMs tests.
Also: AgentOptions has no Timeout. Upstream ToolLoopAgent takes timeout.
PR #712 ports firstChunkMs (streamText) and the generateText warning tests. Still open here: toolMs and per-tool timeouts (execute-tool-call.test.ts, getToolTimeoutMs), the streamText model output timeout boundaries tests (need stream retries and tool timeouts), the firstChunkMs step-stream-cancel test (needs experimental_transform/stopStream), and AgentOptions.Timeout.
PR #716 ports toolMs, per-tool timeouts (tools, getToolTimeoutMs), the executeToolCall > timeout tests, should keep toolMs active after the model finishes, and AgentOptions.Timeout.
Still open here:
The rest of streamText model output timeout boundaries (needs stream retries, provider-executed tool timers, a fake clock).
The firstChunkMs step-stream-cancel test (needs experimental_transform/stopStream).
A per-call agent timeout (Agent.GenerateAsync has no per-call options).
PR #730 ports the stepMs/totalMs-during-tool, output-timer-clearing, chunkMs-next-step, and provider-executed-tool boundary tests, plus the per-call agent timeout (Agent.GenerateAsync/Streamtimeout argument).
Still open here, each blocked on a missing feature:
should clear chunkMs before a long streaming tool (both variants): needs streaming tools (async generator execute).
should give a $retryKind retry a fresh firstChunkMs budget (stream and callback), should re-arm firstChunkMs after retrying an attempt that produced output, and the retry case of should start chunkMs only after output begins: need streamRetries and the onError retry result.
should keep stepMs cumulative across $retryKind retries: needs model-call retries from MaxRetries and streamRetries.
should clear firstChunkMs when the registered step stream is cancelled: needs experimental_transform and stopStream.
The preliminary flag on the tool-result stream part (the provider-executed tool test is partial without it).
A fake clock, so the boundary tests can use the upstream budgets instead of scaled real timers.
Activity
kblok commentedon Oct 21, 2026
Left out of #704.
kblok commentedon Oct 21, 2026
Not ported tests are listed in #704.
kblok commentedon Oct 21, 2026
PR #712 ports
firstChunkMs(streamText) and the generateText warning tests. Still open here:toolMsand per-tool timeouts (execute-tool-call.test.ts,getToolTimeoutMs), thestreamText model output timeout boundariestests (need stream retries and tool timeouts), thefirstChunkMsstep-stream-cancel test (needsexperimental_transform/stopStream), andAgentOptions.Timeout.Port timeout.firstChunkMs for streamText (#712)
kblok commentedon Oct 21, 2026
PR #716 ports
toolMs, per-tool timeouts (tools,getToolTimeoutMs), theexecuteToolCall > timeouttests,should keep toolMs active after the model finishes, andAgentOptions.Timeout.Still open here:
streamText model output timeout boundaries(needs stream retries, provider-executed tool timers, a fake clock).firstChunkMsstep-stream-cancel test (needsexperimental_transform/stopStream).Agent.GenerateAsynchas no per-call options).Port toolMs, per-tool timeouts, and AgentOptions.Timeout (#716)
kblok commentedon Oct 22, 2026
PR #730 ports the stepMs/totalMs-during-tool, output-timer-clearing, chunkMs-next-step, and provider-executed-tool boundary tests, plus the per-call agent timeout (
Agent.GenerateAsync/Streamtimeoutargument).Still open here, each blocked on a missing feature:
should clear chunkMs before a long streaming tool(both variants): needs streaming tools (async generatorexecute).should give a $retryKind retry a fresh firstChunkMs budget(stream and callback),should re-arm firstChunkMs after retrying an attempt that produced output, and theretrycase ofshould start chunkMs only after output begins: needstreamRetriesand theonErrorretry result.should keep stepMs cumulative across $retryKind retries: needs model-call retries fromMaxRetriesandstreamRetries.should clear firstChunkMs when the registered step stream is cancelled: needsexperimental_transformandstopStream.preliminaryflag on the tool-result stream part (the provider-executed tool test is partial without it).