Skip to content

Conversation

@samcornor
Copy link
Contributor

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.

The format parameter was required but not documented, causing errors when
calling webfetch without explicitly specifying format.

Changes:
- Add .default('markdown') to format parameter in zod schema
- Update description to document format options
- Remove outdated 'prompt' reference from description
@rekram1-node rekram1-node merged commit fd973d2 into sst:dev Dec 29, 2025
2 checks passed
anntnzrb pushed a commit to anntnzrb/opencode-1 that referenced this pull request Dec 29, 2025
…st#6345)

Co-authored-by: Somair Ansar <somairansar@Somairs-MacBook-Air.local>
v1truv1us pushed a commit to v1truv1us/opencode that referenced this pull request Dec 29, 2025
…st#6345)

Co-authored-by: Somair Ansar <somairansar@Somairs-MacBook-Air.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants