forked from admin/zeropost-engine
fix: reduce image provider timeout 120s→45s for faster fallback
При недоступности primary (aiguoguo) — быстрее переключаемся на Nyxos fallback вместо ожидания 2 минуты.
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user