Files
OmniRoute/tests
Diego Rodrigues de Sa e Souza e478ab23af fix(api): build /v1/images/edits multipart as Buffer, not global FormData (#3273) (#3278)
A custom OpenAI-compatible image-edit provider received an empty `model`. In production
`globalThis.fetch` is patched with node_modules/undici's fetch, whose `FormData` class
differs from `globalThis.FormData`; passing a native FormData made undici serialize it as
the string "[object FormData]" (text/plain), dropping every field including `model`.

handleOpenAIImageEdit now assembles the multipart body as a Buffer with an explicit
boundary + Content-Type, which every fetch impl accepts verbatim.

Regression test: tests/unit/image-edits-multipart-3273.test.ts reproduces the exact prod
condition (routes through undici's fetch) — RED before (upstream got text/plain
[object FormData]), GREEN after. Existing image suites stay green (50/50).
2026-06-06 02:52:44 -03:00
..
2026-05-23 01:46:59 -03:00
2026-06-04 20:05:38 -03:00
2026-05-10 00:55:06 -03:00