Skip to content

🤖 fix: accept description as alias for display_name in bash tool#3247

Open
ammar-agent wants to merge 1 commit intomainfrom
bash-tool-h76v
Open

🤖 fix: accept description as alias for display_name in bash tool#3247
ammar-agent wants to merge 1 commit intomainfrom
bash-tool-h76v

Conversation

@ammar-agent
Copy link
Copy Markdown
Collaborator

Summary

DeepSeek V4 emits description instead of display_name for the bash tool, causing every bash invocation to fail validation. Normalize description as an undocumented alias for display_name in the schema preprocess so calls validate without changing the public tool surface.

Background

The bash tool requires display_name for every invocation. DeepSeek V4 reliably emits description instead, so we add an alias mirroring the existing commandscript normalization. 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 preprocess from a single if/else if/else chain into chained mutations on a local obj reference, so multiple normalizations can compose:

  1. commandscript (existing).
  2. descriptiondisplay_name (new, with a comment noting DeepSeek V4 as the reason).

Canonical fields always win when both are provided, mirroring the existing command/script precedence.

Validation

  • New unit tests in toolDefinitions.test.ts cover 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

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.
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant