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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user