fix(opencode): make bash tool description parameter optional#26420
fix(opencode): make bash tool description parameter optional#26420RheagalFire wants to merge 1 commit into
Conversation
f7c4781 to
36b4845
Compare
|
The following comment was made by an LLM, it may be inaccurate: Found a potentially related PR: PR #13823: fix: sanitize tool schemas for strict JSON Schema validators (#13737) This PR appears to be directly related to the current PR (#26420). Both address the issue of invalid tool schemas that fail strict JSON Schema validators. PR #13823 handles schema sanitization for validators that reject schemas with |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #13618
Type of change
What does this PR do?
Claude and other providers reject tool schemas that have
propertiesbut norequiredfield with:JSON schema is invalid. It must match JSON Schema draft 2020-12.Plugin tools like
session_listgenerate schemas withpropertiesbut norequired. The existing code only handles this for Google/Gemini (filteringrequiredin the Gemini sanitizer). Other providers getthe raw schema and reject it.
The fix adds a recursive
ensureRequiredpass intransform.tsthat setsrequired: []on any object schema missing it. Runs before any provider-specific sanitizers so all providers benefit.How did you verify your code works?
bun turbo typecheckpasses (12/12 packages)Checklist