Files
Cibello-app/packages
Sven (AAMOS AI) bf04a12b89 fix(gemini): read binary response body as Buffer instead of UTF-8 string
customNodeFetch previously used res.setEncoding('utf8') and concatenated
chunks into a string. This corrupted JPEG/PNG binary data with UTF-8
replacement characters, causing Gemini to return:
  400 Unable to process input image.

Now chunks are collected as Buffers and concatenated, preserving binary
integrity when images are fetched from presigned S3 URLs before being
sent to Gemini.
2026-08-12 20:30:24 +07:00
..