opencode
opencode copied to clipboard
fix(webfetch): make format parameter optional with markdown default
Summary
Fixes the webfetch tool failing when called without a format parameter.
Problem:
- The
formatparameter was required in the zod schema but not documented - Calling
webfetchwithoutformatproduced validation error:Invalid option: expected one of "text"|"markdown"|"html"
Solution:
- Add
.default("markdown")to the format parameter - Update tool description to document format options
- Remove outdated "prompt" reference from description
Changes
-
packages/opencode/src/tool/webfetch.ts: Add default value for format -
packages/opencode/src/tool/webfetch.txt: Update description
Testing
Verified the schema now accepts calls without explicit format parameter.