diff --git a/packages/coding-agent/src/tools/fetch.ts b/packages/coding-agent/src/tools/fetch.ts index 4cfed4d67..cbb6548e1 100644 --- a/packages/coding-agent/src/tools/fetch.ts +++ b/packages/coding-agent/src/tools/fetch.ts @@ -714,7 +714,7 @@ async function renderUrl(url: string, timeout: number, raw: boolean, signal?: Ab } const resized = await resizeImage( - { type: "image", data: binary.buffer.toBase64(), mimeType: imageMimeType }, + { type: "image", data: Buffer.from(binary.buffer).toBase64(), mimeType: imageMimeType }, { maxBytes: MAX_INLINE_IMAGE_OUTPUT_BYTES }, ); const isDecodedImage = diff --git a/packages/coding-agent/src/utils/image-input.ts b/packages/coding-agent/src/utils/image-input.ts index 8067e0ac6..e3742e6fc 100644 --- a/packages/coding-agent/src/utils/image-input.ts +++ b/packages/coding-agent/src/utils/image-input.ts @@ -231,7 +231,7 @@ export async function loadImageInput(options: LoadImageInputOptions): Promise