fix: reduce image provider timeout 120s→45s for faster fallback

При недоступности primary (aiguoguo) — быстрее переключаемся на
Nyxos fallback вместо ожидания 2 минуты.
This commit is contained in:
Ник (Claude)
2026-06-11 12:57:26 +03:00
parent c7f0b3ed4d
commit 8e1b6e8cda
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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');