Skip to content

feat(ai): add per-step timeout support for streamText#11615

Closed
shubham-021 wants to merge 2 commits intovercel:mainfrom
shubham-021:feat/per-step-timeout
Closed

feat(ai): add per-step timeout support for streamText#11615
shubham-021 wants to merge 2 commits intovercel:mainfrom
shubham-021:feat/per-step-timeout

Conversation

@shubham-021
Copy link
Contributor

@shubham-021 shubham-021 commented Jan 7, 2026

Background

Ref: #11575

Summary

Added support for per-step timeout in streamText timeout object , this allows to set timeout for each individual step in a multistep flow

Manual Verification

  • added examples/ai-core/src/stream-text/openai-timeout.ts, it correctly aborts when the step fetching weather for 'London' takes more than specified step timeout

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

@vercel-ai-sdk vercel-ai-sdk bot added the ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec. label Jan 7, 2026
@lgrammel
Copy link
Collaborator

lgrammel commented Jan 7, 2026

this needs to be implemented differently with an abort controller and timeouts. i will take a look myself tmrw

@shubham-021
Copy link
Contributor Author

this needs to be implemented differently with an abort controller and timeouts. i will take a look myself tmrw

so should i close this ? or i can try implementing your approach if you can explain

@lgrammel lgrammel closed this Jan 8, 2026
@shubham-021 shubham-021 deleted the feat/per-step-timeout branch January 8, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/core core functions like generateText, streamText, etc. Provider utils, and provider spec.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants