[PR #6345] fix(webfetch): make format parameter optional with markdown default #11849

Closed
opened 2026-02-16 18:16:47 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6345

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6345 **State:** closed **Merged:** Yes --- ## 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.
yindo added the pull-request label 2026-02-16 18:16:47 -05:00
yindo closed this issue 2026-02-16 18:16:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11849