-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
When a flow agent receives a timeout object with keys other than totalMs (e.g. stepMs, toolMs, per-tool timeouts), those keys are silently ignored. This can mislead callers into thinking granular timeout control is active when it isn't.
Context
Raised by CodeRabbit in PR #65 (thread PRRT_kwDORkqTG8523WJU).
Flow agents manage their own step orchestration and don't forward directly to the AI SDK's generateText/streamText, so stepMs, toolMs, and per-tool timeout keys are meaningless at the flow level. Only totalMs is extracted to create a flow-level AbortSignal.
Current behavior
// This silently ignores stepMs — no warning, no error
await myFlowAgent.generate({
input: { ... },
timeout: { totalMs: 30000, stepMs: 5000 },
});Location
packages/agents/src/core/agents/flow/flow-agent.ts—resolveSignal()function (~line 296)
Options to consider
- Warn — Log a warning via the flow agent's logger when unsupported timeout keys are detected
- Throw — Throw an error if any key besides
totalMsis present - Narrow the type — Use a more specific timeout type for flow agents (
number | { totalMs?: number }) instead of the fullBaseGenerateParamstimeout type
Related
- PR feat(agents): input parameter parity with Vercel AI SDK #65 — feat(agents): input parameter parity with Vercel AI SDK
- Issue feat(agents): achieve 100% input parameter parity with Vercel AI SDK generateText/streamText #62 — Input parameter parity
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels