feat: image quality param — low for posts, medium for article covers

covers.js: generateCoverViaRouterAI принимает quality='medium' по умолчанию
postImages.js: quality='low' для постов TG/VK (₽0.25 vs ₽0.84)
Экономия 70% на генерации картинок к постам
This commit is contained in:
Ник (Claude)
2026-06-11 14:48:10 +03:00
parent 06ab7e0c1d
commit e6c192e806
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ Strictly: no text, no letters, no logos, no faces of real people.`;
const res = await axios.post(`${config.ai.routeraiBaseUrl}/responses`, {
model,
input: `Use the image_generation tool to create this illustration. Only call the tool, no text.\n\n${prompt.slice(0, 3000)}`,
tools: [{ type: 'image_generation' }],
tools: [{ type: 'image_generation', quality: 'low' }],
tool_choice: { type: 'image_generation' },
}, { headers: { Authorization: `Bearer ${config.ai.routeraiApiKey}` }, timeout: 120_000 });
const imgCall = (res.data?.output || []).find(o => o.type === 'image_generation_call');