🤖 fix: accept description as alias for display_name in bash tool#3247
Open
ammar-agent wants to merge 1 commit intomainfrom
Open
🤖 fix: accept description as alias for display_name in bash tool#3247ammar-agent wants to merge 1 commit intomainfrom
ammar-agent wants to merge 1 commit intomainfrom
Conversation
DeepSeek V4 emits 'description' instead of 'display_name' for the bash tool. Normalize the alias in the schema preprocess so the call still validates without exposing the alias in the public tool description.
Collaborator
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Summary
DeepSeek V4 emits
descriptioninstead ofdisplay_namefor the bash tool, causing every bash invocation to fail validation. Normalizedescriptionas an undocumented alias fordisplay_namein the schema preprocess so calls validate without changing the public tool surface.Background
The
bashtool requiresdisplay_namefor every invocation. DeepSeek V4 reliably emitsdescriptioninstead, so we add an alias mirroring the existingcommand→scriptnormalization. The alias is intentionally undocumented in the tool description: we don't want to invite other models to use the wrong field.Implementation
Refactored the bash schema's
preprocessfrom a singleif/else if/elsechain into chained mutations on a localobjreference, so multiple normalizations can compose:command→script(existing).description→display_name(new, with a comment noting DeepSeek V4 as the reason).Canonical fields always win when both are provided, mirroring the existing
command/scriptprecedence.Validation
toolDefinitions.test.tscover the alias and the precedence behavior.bun test src/common/utils/tools/toolDefinitions.test.ts: 36 pass.make static-check: passed locally.Generated with
mux• Model:anthropic:claude-opus-4-7• Thinking:max• Cost:$0.62