[pull] main from vercel:main#353
Merged
Merged
Conversation
* Fix cookbook pattern for AI SDK The AI SDK cookbook entry presented `streamText` inside a `"use step"` turn function with tools also marked `"use step"`. That implies tools are individually durable, but the `"use step"` directive is a no-op when called from another step — so tools run as plain inline functions inside `runTurn`, and the durability boundary is the entire turn. Changes: - Remove the `"use step"` directive from tool implementations in the workflow code sample and add an explanatory comment. - Update the frontmatter summary and intro paragraph to drop the inaccurate "tools remain durable steps" claim. - Add a "Tools are not individually durable" entry to Pitfalls with consequences and mitigations (idempotency or `DurableAgent`). - Add a `runTurn` durability-boundary bullet to "How it works". - Add a "Tool call durability" row to the `streamText` vs `DurableAgent` comparison table. - Fix two misleading Key APIs bullets that claimed tools wrap `"use step"` functions and that `"use step"` makes tool executions durable. Applied identically to both v4 and v5 cookbook entries. Co-authored-by: Cursor <cursoragent@cursor.com> * Apply suggestion from @VaguelySerious Co-authored-by: Peter Wielander <mittgfu@gmail.com> Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com> * Correct outdated DurableAgent guidance in AI SDK cookbook. The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate. Co-authored-by: Cursor <cursoragent@cursor.com> * Reword tool comment to describe current behavior, not a changelog. Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Peter Wielander <mittgfu@gmail.com>
* docs(cookbook): replace child workflow polling with hook resume pattern Recommend startAndWait() with withChildCompletionHook() for v4 and v5 child workflow orchestration instead of getRun().status polling loops. Co-authored-by: Cursor <cursoragent@cursor.com> * Fix child-workflows cookbook review feedback Tighten resumeParentCompletion to a discriminated union so hook.resume typechecks, add zod to the vitest workbench, remove unused resumeHook import, and add an empty changeset per AGENTS.md. Co-authored-by: Cursor <cursoragent@cursor.com> * docs(cookbook): trim child-workflows hook resume guide Remove redundant polling comparison copy, the getRun() alternative section, and v5-only start() tips to keep the cookbook focused on the hook pattern. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )