Repository navigation
Conversation
Author
|
Could a maintainer approve the pending fork workflows for head The Vercel preview separately reports “Authorization required to deploy” and needs a Vercel team member to authorize it through the existing check link. I will address any failures once the tests can run. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Background
If
experimental_refineToolInputreturns a pending promise, cancelling a request or reaching its timeout does not stopgenerateTextorstreamTextfrom waiting. The same problem affects revalidation of previously approved tool calls.Summary
Pass the existing abort signal to every refinement path and reuse the abort-aware promise helper already used by tool-call repair. Preserve cancellation through approval validation and streaming so it follows the normal abort path instead of becoming an invalid tool input or an ordinary stream error. The refinement callback API stays the same.
Add 14 mocked regression cases covering ordinary, dynamic, repaired, and approved calls; request cancellation; step/total timeouts; an already-aborted signal; and late callback rejection. Before the fix, 13 of the 14 cases failed.
Validation
aiNode suite: 4,190 passed, 3 skipped.aiEdge suite: 4,182 passed, 4 skipped.pnpm type-check:full, including examples: passed.aipackage build and lint on changed TypeScript files: passed.An initial type-check run overlapped with the package build and reported missing generated declarations. Regenerating declarations and rerunning the type check sequentially passed. No live-provider end-to-end test was run; the regression tests use mocked models and timers.
AI assistance: this patch and its tests were developed and reviewed with Codex. All results above were run locally against this change.
Checklist
pnpm changesetin the project root)Related Issues
Related to #20942, which protects
repairToolCall; this change covers the separate refinement callback.