From 8e1b6e8cda8837f163b487f4101cb6be3b9f14b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=20=28Claude=29?= Date: Thu, 11 Jun 2026 12:57:26 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20reduce=20image=20provider=20timeout=2012?= =?UTF-8?q?0s=E2=86=9245s=20for=20faster=20fallback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit При недоступности primary (aiguoguo) — быстрее переключаемся на Nyxos fallback вместо ожидания 2 минуты. --- src/services/covers.js | 2 +- src/services/postImages.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/covers.js b/src/services/covers.js index 697424a..512f054 100644 --- a/src/services/covers.js +++ b/src/services/covers.js @@ -279,7 +279,7 @@ async function generateCoverViaImageGenerations({ prompt }) { const res = await axios.post( `${baseUrl}/images/generations`, { model, prompt: prompt.slice(0, 4000), n: 1, size: '1024x1024', response_format: 'url' }, - { headers: { Authorization: `Bearer ${apiKey}` }, timeout: 120_000 } + { headers: { Authorization: `Bearer ${apiKey}` }, timeout: 45_000 } ); const item = res.data?.data?.[0]; if (!item) throw new Error('No image data in response'); diff --git a/src/services/postImages.js b/src/services/postImages.js index 9d100c0..c6f4a86 100644 --- a/src/services/postImages.js +++ b/src/services/postImages.js @@ -95,7 +95,7 @@ Strictly: no text, no letters, no logos, no faces of real people.`; const res = await axios.post( `${baseUrl}/images/generations`, { model, prompt: prompt.slice(0, 4000), n: 1, size: '1024x1024', response_format: 'url' }, - { headers: { Authorization: `Bearer ${apiKey}` }, timeout: 120_000 } + { headers: { Authorization: `Bearer ${apiKey}` }, timeout: 45_000 } ); const item = res.data?.data?.[0]; if (!item) throw new Error('No image data');