Repository navigation
docs(v1): require the cancelled stop reason in Rust cancellation docs - #3042
Open
connorburgess wants to merge 1 commit into
Open
connorburgess wants to merge 1 commit into
connorburgess wants to merge 1 commit into
Conversation
The Prompt Turn page says the Agent MUST respond to the original session/prompt request with the cancelled stop reason after a session/cancel, and MUST catch errors raised by aborted operations so that Clients can reliably confirm the cancellation. The Rust docs for the same behavior were weaker. The Cancelled stop reason said MUST be returned and then that Agents SHOULD catch those exceptions, and the session/cancel notification listed the cancelled response among things the Agent SHOULD do. Those comments are published in the v1 JSON Schema descriptions and the schema reference page. Use MUST for both, as the stable page and the v2 Rust docs already do. Stopping model requests and tool calls stays SHOULD, as on the page. Regenerated schemas and reference pages; no wire or type changes.
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This branch has not been deployed
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.
The v1 Prompt Turn page says that after
session/cancelthe Agent MUST respond to the originalsession/promptrequest with thecancelledstop reason, and MUST catch errors raised by aborted operations so that Clients can reliably confirm the cancellation.The Rust docs for the same behavior are weaker, and they are published in the v1 JSON Schema descriptions and the schema reference page:
StopReason::Cancelledsays the stop reason MUST be returned, then that Agents SHOULD catch those exceptions.session/cancelnotification lists responding withcancelledamong the things the Agent SHOULD do.Use MUST for both, as the stable page and the v2 Rust docs already do. Stopping model requests and tool calls stays SHOULD, as on the page.
This changes requirement keywords in Rust comments to match the stable page. The page itself is not changed, and there are no wire or type changes. Schemas and reference pages are regenerated with
npm run generate.Validation on
8b8532e(local results):npm run check: passes Clippy, formatting, spellcheck, Rust tests and schema tests.