Dashboard › opencode › OpenCode webfetch implementations, limi…
01a0829e-09b9-71bf-b6d9-c46ce77dcc52| Project | Hits | Last recalled |
|---|---|---|
| opencode-lore | 6 | 13h ago |
Two implementations exist: legacy packages/opencode/src/tool/webfetch.ts (tool.fetch) and newer packages/core/src/tool/webfetch.ts. Core streams through collectBoundedResponseBody and fails as soon as bytes exceed 5 MB; legacy buffers the body after an optional Content-Length precheck and can emit images as base64 attachments, while core rejects non-text/image MIME types. Both use 30-second default and 120-second maximum timeouts, Chrome UA spoofing, Cloudflare 403 retry, and HTML conversion without Readability-style boilerplate removal. Non-2xx responses intentionally raise other:statuscode-non-xx-status; verify URL, authentication, redirects, and final status rather than repeatedly retrying.