diegosouzapw/OmniRoute · error
Provider returned no recognizable image payload
Error message
Provider returned no recognizable image payload: ${JSON.stringify(payload).slice(0, 240)} What it means
The provider's image-generation response payload contained no recognizable image data — none of the known shapes (images array, image, url, sample, result.sample, result.images) yielded a usable candidate after normalization. The handler logs a truncated payload dump (240 chars) and fails the image request instead of returning an empty image list.
Solutions
- Inspect the logged payload fragment to identify the provider's actual response shape
- Check provider status/credentials — some return error objects with 200
- Add the new shape to the candidate extraction if the provider changed its API
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at open-sse/handlers/imageGeneration.ts:2438 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/05e1d3115cf4d69c.
Report an issue: GitHub.
Appendix: source
Thrown at open-sse/handlers/imageGeneration.ts:2438
for (const item of payload.images) pushCandidate(item);
}
if (payload?.image) pushCandidate({ b64_json: payload.image });
if (payload?.url) pushCandidate({ url: payload.url });
if (payload?.sample) pushCandidate({ url: payload.sample });
if (payload?.result?.sample) pushCandidate({ url: payload.result.sample });
if (Array.isArray(payload?.result?.images)) {
for (const item of payload.result.images) pushCandidate(item);
}
const normalized = [];
for (const candidate of candidates) {
const item = await normalizeProviderImageCandidate(candidate, body, defaultFormat);
if (item) normalized.push(item);
}
if (normalized.length === 0 && log) {
log.warn(
"IMAGE",
`Provider returned no recognizable image payload: ${JSON.stringify(payload).slice(0, 240)}`
);
}
return normalized;
}
async function normalizeProviderImageCandidate(candidate, body, defaultFormat) {
const wantsBase64 = body?.response_format === "b64_json" || defaultFormat === "b64_json";
let url = null;
let b64 = null;
if (typeof candidate === "string") {
const dataUriMatch = /^data:[^;]+;base64,(.+)$/i.exec(candidate);
if (dataUriMatch) {
b64 = dataUriMatch[1];
} else if (isHttpUrl(candidate)) {View on GitHub (pinned to a179ffed5b)