diegosouzapw/OmniRoute · error
ChatGPT Web returns one image per chat turn; requested n=${r
Error message
ChatGPT Web returns one image per chat turn; requested n=${requestedCount} will run sequentially What it means
Error "ChatGPT Web returns one image per chat turn; requested n=${requestedCount} will run sequentially" thrown in diegosouzapw/OmniRoute.
Source
Thrown at open-sse/handlers/imageGeneration/providers/chatgptWeb.ts:88
}
// Each image is one chatgpt.com chat turn (~30s). Cap at 4 (matches OpenAI's
// own limit for GPT Image models) so a stray n=1000 doesn't pin the
// executor for hours before the upstream HTTP timeout fires.
const CHATGPT_WEB_IMAGE_N_MAX = 4;
const rawCount = Number.isInteger(body.n) && (body.n as number) > 0 ? (body.n as number) : 1;
if (rawCount > CHATGPT_WEB_IMAGE_N_MAX) {
return saveImageErrorResult({
provider,
model,
status: 400,
startTime,
error: `ChatGPT Web image generation supports n=1..${CHATGPT_WEB_IMAGE_N_MAX} (got ${rawCount}); each n is a separate ~30s chat turn.`,
});
}
const requestedCount = rawCount;
if (log && requestedCount > 1) {
log.warn(
"IMAGE",
`ChatGPT Web returns one image per chat turn; requested n=${requestedCount} will run sequentially`
);
}
const wantsBase64 = body.response_format === "b64_json";
const images: Array<{ url?: string; b64_json?: string }> = [];
const requestBody = {
model,
prompt: prompt.slice(0, 500),
size: body.size || undefined,
quality: body.quality || undefined,
};
for (let i = 0; i < requestedCount; i++) {
const executor = executorFactory();
const result = await executor.execute({
model,View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at open-sse/handlers/imageGeneration/providers/chatgptWeb.ts:88 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/8d5b5a2b19f960f7.
Report an issue: GitHub.