fix(studio): allow sixty seconds for AI generation

This commit is contained in:
Clintchiz committed 2026-10-19 14:29:15 +05:30
1 parent fac1c4461f
commit 27dcb561db
7 files changed
+60 -12

No files matched your search

+3 -1
View File
@@ -4,6 +4,7 @@ import type {
} from "@wrnexus/design-studio";
export const APIMART_MODEL = "gpt-6-luna";
export const AI_TIMEOUT_MS = 60_000;
export function apimartProvider(
apiKey: string,
transport: typeof fetch = fetch,
@@ -117,7 +118,7 @@ export function studioAI(apiKey?: string, transport: typeof fetch = fetch) {
templateVersion: 1,
maxAttempts: 2,
maxOutputTokens: 4096,
timeoutMs: 20000,
timeoutMs: AI_TIMEOUT_MS,
});
if (!url.pathname.endsWith("/generate") || request.method !== "POST")
return json({ error: "Method not allowed." }, 405);
@@ -151,6 +152,7 @@ export function studioAI(apiKey?: string, transport: typeof fetch = fetch) {
provider: apimartProvider(apiKey, transport),
model: APIMART_MODEL,
signal: request.signal,
timeoutMs: AI_TIMEOUT_MS,
});
return json(result);
} catch (error) {