[v6.0] fix: more precise default message for tool execution denial#16804
Merged
Conversation
The default tool call denial message `Tool execution denied.` led to Open GPT 5 models rejecting further calls to the same tool with different inputs. Change the default message `Tool execution denied.` to the more precise `Tool call execution denied.` Discovered during #14643 (cherry picked from commit 58a2ad7)
Contributor
|
|
Contributor
|
🚀 Published in:
|
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.
Backport of #14656 to
release-v6.0. Changes the default tool call denial message from 'Tool execution denied.' to the more precise 'Tool call execution denied.' across the provider message converters, so that GPT-5 models do not refuse further calls to the same tool with different inputs. Conflict resolution adaptations: inpackages/ai/src/ui/convert-to-model-messages.tsv6'stoolPart.approval?.reasonoptional chaining was kept (main usestoolPart.approval.reason); inpackages/openai/src/responses/convert-to-openai-responses-input.test.tsthe new execution-denied custom tool test was inserted alongside v6's existing aliased-tool-name test; the google change landed in v6'sconvert-to-google-generative-ai-messages.ts(renamed toconvert-to-google-messages.tson main); and the inline snapshot inpackages/ai/src/ui/convert-to-model-messages.test.ts(not touched by the original commit) was updated to the new default message. Part of the v6.0 backport tracking issue #16767.