opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(webfetch): make format parameter optional with markdown default

Open samcornor opened this issue 3 weeks ago • 0 comments

Summary

Fixes the webfetch tool failing when called without a format parameter.

Problem:

  • The format parameter was required in the zod schema but not documented
  • Calling webfetch without format produced 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.

samcornor avatar Dec 29 '25 10:12 samcornor