Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion design/src/evolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export async function evolve(options: EvolveOptions): Promise<void> {
].join("\n");

const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 120_000);
// 240s — matches generate.ts; see comment there for rationale.
const timeout = setTimeout(() => controller.abort(), 240_000);

try {
const response = await fetch("https://api.openai.com/v1/responses", {
Expand Down
5 changes: 4 additions & 1 deletion design/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ async function callImageGeneration(
quality: string,
): Promise<{ responseId: string; imageData: string }> {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 120_000);
// 240s: gpt-image-1 at quality:"high" size:"1536x1024" routinely takes
// 60-180s and can spike past 120s under provider load (observed in
// production). 240s gives ~2x headroom while staying under user patience.
const timeout = setTimeout(() => controller.abort(), 240_000);

try {
const response = await fetch("https://api.openai.com/v1/responses", {
Expand Down
6 changes: 4 additions & 2 deletions design/src/iterate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ async function callWithThreading(
feedback: string,
): Promise<{ responseId: string; imageData: string }> {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 120_000);
// 240s — matches generate.ts; see comment there for rationale.
const timeout = setTimeout(() => controller.abort(), 240_000);

try {
const response = await fetch("https://api.openai.com/v1/responses", {
Expand Down Expand Up @@ -130,7 +131,8 @@ async function callFresh(
prompt: string,
): Promise<{ responseId: string; imageData: string }> {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 120_000);
// 240s — matches generate.ts; see comment there for rationale.
const timeout = setTimeout(() => controller.abort(), 240_000);

try {
const response = await fetch("https://api.openai.com/v1/responses", {
Expand Down
3 changes: 2 additions & 1 deletion design/src/variants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export async function generateVariant(
skipLeadingDelay = false;

const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 120_000);
// 240s — matches generate.ts; see comment there for rationale.
const timeout = setTimeout(() => controller.abort(), 240_000);

try {
const response = await fetchFn("https://api.openai.com/v1/responses", {
Expand Down