kingkont 0.20.53 → 0.20.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/providers.js +17 -7
  2. package/package.json +1 -1
package/lib/providers.js CHANGED
@@ -617,17 +617,27 @@ async function _startGenerationViaKie({ kind, prompt, key, imageInputs, videoInp
617
617
  if (aspectRatio) input.aspect_ratio = aspectRatio;
618
618
  input.output_format = 'jpg';
619
619
  // flux/sdxl быстрые, quality для них N/A — пропускаем.
620
- } else if (key === 'gpt-image-2' || key === 'gpt-image-1.5') {
621
- // OpenAI gpt-image-2 / 1.5 через KIE. Если есть imageInputs
622
- // переключаемся на image-to-image вариант slug'а (KIE использует
623
- // отдельные модели для t2i vs i2i).
620
+ } else if (key === 'gpt-image-2') {
621
+ // KIE GPT Image 2 отдельные slug для t2i vs i2i (см. switch ниже).
622
+ // Параметры для обеих:
623
+ // prompt (req), aspect_ratio (auto|1:1|9:16|16:9|4:3|3:4),
624
+ // resolution (1K|2K|4K).
625
+ // Для image-to-image — input_urls: string[] (<=16).
626
+ // (gpt-image-2 НЕ принимает image_input, output_format, quality,
627
+ // size — это OpenAI-direct поля; KIE proxy игнорирует но логирует
628
+ // warning. Не отправляем чтобы не мусорить.)
624
629
  if (imageInputs?.length) {
625
- // gpt-image-2-image-to-image — same input.image_input format,
626
- // нужно сменить fullModel ниже.
630
+ input.input_urls = imageInputs.slice(0, 16);
627
631
  }
632
+ // KIE: при aspect_ratio='auto' принудительно понижает resolution до 1K.
633
+ // Явный 16:9 даёт 2K/4K если попросит.
634
+ input.aspect_ratio = aspectRatio || '16:9';
635
+ input.resolution = resolution || '1K';
636
+ } else if (key === 'gpt-image-1.5') {
637
+ // gpt-image-1.5 (KIE): «OpenAI-стиль» параметры (size/quality/format) —
638
+ // совпадает с OpenAI direct API.
628
639
  if (aspectRatio) input.size = _gptImageAspectToSize(aspectRatio);
629
640
  if (imageInputs?.length) input.image_input = imageInputs;
630
- // quality: 'low' | 'medium' | 'high' — gpt-image поддерживает.
631
641
  if (quality) input.quality = quality;
632
642
  input.output_format = 'jpg';
633
643
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kingkont",
3
- "version": "0.20.53",
3
+ "version": "0.20.54",
4
4
  "description": "KingKont \u00b7 Chatium \u2014 \u043d\u043e\u0434-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0441\u0446\u0435\u043d \u0441 AI-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438/\u0432\u0438\u0434\u0435\u043e/\u0433\u043e\u043b\u043e\u0441/SFX/\u043c\u0443\u0437\u044b\u043a\u0430/\u0442\u0435\u043a\u0441\u0442)",
5
5
  "main": "main.js",
6
6
  "bin": {