fix: make bash tool description parameter optional#18392
fix: make bash tool description parameter optional#18392danielcherubini wants to merge 3 commits intoanomalyco:devfrom
Conversation
The description parameter on the bash tool is required but some models (especially smaller/local models) don't always include it in tool calls, causing "Invalid input: expected string, received undefined" errors that loop indefinitely. Make it optional and fall back to the command string when not provided. Fixes anomalyco#13146
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs Found:
These PRs appear to address the exact same issue as PR #18392 - making the bash tool's description parameter optional to handle cases where smaller/local models don't include it in tool calls. You should check the status of these existing PRs before proceeding with PR #18392. |
Issue for this PR
Closes #13146
Also:
Related (local/small model tool schema issues):
400 Bad Requestwith local vLLM (Qwen 3 XML Tools) #16488 — Qwen 3 vLLM silent crashType of change
What does this PR do?
The description parameter on the bash tool is required but some models (especially smaller/local models) don't always include it in tool calls, causing "Invalid input: expected string, received undefined" errors that loop indefinitely. Make it optional and fall back to the command string when not provided.
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
I ran opencode in two different repos, using small and larger models and found no issue with the error I have seen in issue #13146
Screenshots / recordings
Checklist
If you do not follow this template your PR will be automatically rejected.