You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thread page og:image through browse_url as base64 attachment (jaredlockhart#919)
The browser content script already extracts og:image from pages, but it
was dropped in formatResult. Now the addon downloads the image using the
browser's fetch API (which has session cookies for CDN auth), base64
encodes it, and sends it as a separate image field on the tool response.
The server threads it through SearchResult.image_base64 → MultiTool
(first image wins) → ControllerResponse.attachments → send_response.
When attachments are present, the Serper image search fallback is
skipped. Signal receives the base64 data URI directly.
This was necessary because CDN bot detection (e.g., Akamai on CBC)
blocks server-side image downloads via httpx — the browser's fetch has
the authenticated session and cookies needed to pass bot checks.
- Addon: downloadImageAsDataUri in browse_url.ts using browser fetch
- Addon: BrowseResult type with text + image fields
- Addon: sendToolResponse includes image field
- Server: BrowserToolResponse.image field (optional)
- Server: send_tool_request returns tuple[str, str | None]
- Server: BrowseUrlTool.execute returns SearchResult with image
- Server: MultiTool passes first image through combined result
Co-authored-by: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments