genai-lite 0.5.0 → 0.6.0

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.
@@ -162,7 +162,7 @@
162
162
  "displayName": "Local - SDXL Turbo",
163
163
  "description": "Real-time generation with SDXL Turbo (optimal at 512x512, 1-4 steps)",
164
164
  "providerId": "genai-electron-images",
165
- "modelId": "sdxl-turbo",
165
+ "modelId": "stable-diffusion",
166
166
  "settings": {
167
167
  "width": 512,
168
168
  "height": 512,
@@ -176,17 +176,35 @@
176
176
  },
177
177
  {
178
178
  "id": "genai-electron-sdxl-lightning",
179
- "displayName": "Local - SDXL Lightning",
179
+ "displayName": "Local - SDXL Lightning (Large)",
180
+ "displayName": "Local - SDXL Lightning (Large)",
180
181
  "description": "Lightning-fast generation with quality (trained at 1024x1024, 2-8 steps)",
181
182
  "providerId": "genai-electron-images",
182
- "modelId": "sdxl-lightning",
183
+ "modelId": "stable-diffusion",
183
184
  "settings": {
184
185
  "width": 1024,
185
186
  "height": 1024,
186
187
  "responseFormat": "buffer",
187
188
  "diffusion": {
188
189
  "steps": 8,
189
- "cfgScale": 1.0,
190
+ "cfgScale": 1.5,
191
+ "sampler": "euler_a"
192
+ }
193
+ }
194
+ },
195
+ {
196
+ "id": "genai-electron-sdxl-lightning-medium",
197
+ "displayName": "Local - SDXL Lightning (Medium)",
198
+ "description": "Lightning-fast generation at medium size (trained at 1024x1024, 2-8 steps)",
199
+ "providerId": "genai-electron-images",
200
+ "modelId": "stable-diffusion",
201
+ "settings": {
202
+ "width": 768,
203
+ "height": 768,
204
+ "responseFormat": "buffer",
205
+ "diffusion": {
206
+ "steps": 8,
207
+ "cfgScale": 1.5,
190
208
  "sampler": "euler_a"
191
209
  }
192
210
  }
@@ -1,4 +1,82 @@
1
1
  [
2
+ {
3
+ "id": "anthropic-claude-opus-4-5-20251101-default",
4
+ "displayName": "Anthropic - Claude Opus 4.5",
5
+ "description": "Default preset for Claude Opus 4.5.",
6
+ "providerId": "anthropic",
7
+ "modelId": "claude-opus-4-5-20251101",
8
+ "settings": {
9
+ "temperature": 0.7,
10
+ "reasoning": {
11
+ "enabled": false
12
+ }
13
+ }
14
+ },
15
+ {
16
+ "id": "anthropic-claude-opus-4-5-20251101-thinking",
17
+ "displayName": "Anthropic - Claude Opus 4.5 (Thinking)",
18
+ "description": "Claude Opus 4.5 with reasoning enabled for complex problem solving.",
19
+ "providerId": "anthropic",
20
+ "modelId": "claude-opus-4-5-20251101",
21
+ "settings": {
22
+ "temperature": 0.7,
23
+ "reasoning": {
24
+ "enabled": true
25
+ }
26
+ }
27
+ },
28
+ {
29
+ "id": "anthropic-claude-sonnet-4-5-20250929-default",
30
+ "displayName": "Anthropic - Claude Sonnet 4.5",
31
+ "description": "Default preset for Claude Sonnet 4.5.",
32
+ "providerId": "anthropic",
33
+ "modelId": "claude-sonnet-4-5-20250929",
34
+ "settings": {
35
+ "temperature": 0.7,
36
+ "reasoning": {
37
+ "enabled": false
38
+ }
39
+ }
40
+ },
41
+ {
42
+ "id": "anthropic-claude-sonnet-4-5-20250929-thinking",
43
+ "displayName": "Anthropic - Claude Sonnet 4.5 (Thinking)",
44
+ "description": "Claude Sonnet 4.5 with reasoning enabled for step-by-step thinking.",
45
+ "providerId": "anthropic",
46
+ "modelId": "claude-sonnet-4-5-20250929",
47
+ "settings": {
48
+ "temperature": 0.7,
49
+ "reasoning": {
50
+ "enabled": true
51
+ }
52
+ }
53
+ },
54
+ {
55
+ "id": "anthropic-claude-haiku-4-5-20251001-default",
56
+ "displayName": "Anthropic - Claude Haiku 4.5",
57
+ "description": "Default preset for Claude Haiku 4.5.",
58
+ "providerId": "anthropic",
59
+ "modelId": "claude-haiku-4-5-20251001",
60
+ "settings": {
61
+ "temperature": 0.7,
62
+ "reasoning": {
63
+ "enabled": false
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "id": "anthropic-claude-haiku-4-5-20251001-thinking",
69
+ "displayName": "Anthropic - Claude Haiku 4.5 (Thinking)",
70
+ "description": "Claude Haiku 4.5 with reasoning enabled for fast thinking tasks.",
71
+ "providerId": "anthropic",
72
+ "modelId": "claude-haiku-4-5-20251001",
73
+ "settings": {
74
+ "temperature": 0.7,
75
+ "reasoning": {
76
+ "enabled": true
77
+ }
78
+ }
79
+ },
2
80
  {
3
81
  "id": "anthropic-claude-sonnet-4-20250514-default",
4
82
  "displayName": "Anthropic - Claude Sonnet 4",
@@ -97,6 +175,78 @@
97
175
  "temperature": 0.7
98
176
  }
99
177
  },
178
+ {
179
+ "id": "google-gemini-3-pro-preview",
180
+ "displayName": "Google - Gemini 3 Pro (Preview)",
181
+ "description": "Default preset for Gemini 3 Pro Preview.",
182
+ "providerId": "gemini",
183
+ "modelId": "gemini-3-pro-preview",
184
+ "settings": {
185
+ "temperature": 0.7,
186
+ "geminiSafetySettings": [
187
+ { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE" },
188
+ {
189
+ "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
190
+ "threshold": "BLOCK_NONE"
191
+ },
192
+ {
193
+ "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
194
+ "threshold": "BLOCK_NONE"
195
+ },
196
+ { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_NONE" }
197
+ ]
198
+ }
199
+ },
200
+ {
201
+ "id": "google-gemini-3-flash-preview",
202
+ "displayName": "Google - Gemini 3 Flash (Preview)",
203
+ "description": "Default preset for Gemini 3 Flash Preview.",
204
+ "providerId": "gemini",
205
+ "modelId": "gemini-3-flash-preview",
206
+ "settings": {
207
+ "temperature": 0.7,
208
+ "geminiSafetySettings": [
209
+ { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE" },
210
+ {
211
+ "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
212
+ "threshold": "BLOCK_NONE"
213
+ },
214
+ {
215
+ "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
216
+ "threshold": "BLOCK_NONE"
217
+ },
218
+ { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_NONE" }
219
+ ],
220
+ "reasoning": {
221
+ "enabled": false
222
+ }
223
+ }
224
+ },
225
+ {
226
+ "id": "google-gemini-3-flash-preview-thinking",
227
+ "displayName": "Google - Gemini 3 Flash (Preview, Thinking)",
228
+ "description": "Gemini 3 Flash Preview with dynamic reasoning enabled.",
229
+ "providerId": "gemini",
230
+ "modelId": "gemini-3-flash-preview",
231
+ "settings": {
232
+ "temperature": 0.7,
233
+ "geminiSafetySettings": [
234
+ { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE" },
235
+ {
236
+ "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
237
+ "threshold": "BLOCK_NONE"
238
+ },
239
+ {
240
+ "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
241
+ "threshold": "BLOCK_NONE"
242
+ },
243
+ { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_NONE" }
244
+ ],
245
+ "reasoning": {
246
+ "enabled": true
247
+ }
248
+ }
249
+ },
100
250
  {
101
251
  "id": "google-gemini-2.5-pro",
102
252
  "displayName": "Google - Gemini 2.5 Pro",
@@ -263,6 +413,110 @@
263
413
  ]
264
414
  }
265
415
  },
416
+ {
417
+ "id": "openai-gpt-5.2-default",
418
+ "displayName": "OpenAI - GPT-5.2",
419
+ "description": "Default preset for GPT-5.2.",
420
+ "providerId": "openai",
421
+ "modelId": "gpt-5.2",
422
+ "settings": {
423
+ "temperature": 0.7,
424
+ "reasoning": {
425
+ "enabled": false
426
+ }
427
+ }
428
+ },
429
+ {
430
+ "id": "openai-gpt-5.2-thinking",
431
+ "displayName": "OpenAI - GPT-5.2 (Thinking)",
432
+ "description": "GPT-5.2 with reasoning enabled for complex problem solving.",
433
+ "providerId": "openai",
434
+ "modelId": "gpt-5.2",
435
+ "settings": {
436
+ "temperature": 0.7,
437
+ "reasoning": {
438
+ "enabled": true
439
+ }
440
+ }
441
+ },
442
+ {
443
+ "id": "openai-gpt-5.1-default",
444
+ "displayName": "OpenAI - GPT-5.1",
445
+ "description": "Default preset for GPT-5.1.",
446
+ "providerId": "openai",
447
+ "modelId": "gpt-5.1",
448
+ "settings": {
449
+ "temperature": 0.7,
450
+ "reasoning": {
451
+ "enabled": false
452
+ }
453
+ }
454
+ },
455
+ {
456
+ "id": "openai-gpt-5.1-thinking",
457
+ "displayName": "OpenAI - GPT-5.1 (Thinking)",
458
+ "description": "GPT-5.1 with reasoning enabled for complex problem solving.",
459
+ "providerId": "openai",
460
+ "modelId": "gpt-5.1",
461
+ "settings": {
462
+ "temperature": 0.7,
463
+ "reasoning": {
464
+ "enabled": true
465
+ }
466
+ }
467
+ },
468
+ {
469
+ "id": "openai-gpt-5-mini-default",
470
+ "displayName": "OpenAI - GPT-5 Mini",
471
+ "description": "Default preset for GPT-5 Mini.",
472
+ "providerId": "openai",
473
+ "modelId": "gpt-5-mini-2025-08-07",
474
+ "settings": {
475
+ "temperature": 0.7,
476
+ "reasoning": {
477
+ "enabled": false
478
+ }
479
+ }
480
+ },
481
+ {
482
+ "id": "openai-gpt-5-mini-thinking",
483
+ "displayName": "OpenAI - GPT-5 Mini (Thinking)",
484
+ "description": "GPT-5 Mini with reasoning enabled.",
485
+ "providerId": "openai",
486
+ "modelId": "gpt-5-mini-2025-08-07",
487
+ "settings": {
488
+ "temperature": 0.7,
489
+ "reasoning": {
490
+ "enabled": true
491
+ }
492
+ }
493
+ },
494
+ {
495
+ "id": "openai-gpt-5-nano-default",
496
+ "displayName": "OpenAI - GPT-5 Nano",
497
+ "description": "Default preset for GPT-5 Nano.",
498
+ "providerId": "openai",
499
+ "modelId": "gpt-5-nano-2025-08-07",
500
+ "settings": {
501
+ "temperature": 0.7,
502
+ "reasoning": {
503
+ "enabled": false
504
+ }
505
+ }
506
+ },
507
+ {
508
+ "id": "openai-gpt-5-nano-thinking",
509
+ "displayName": "OpenAI - GPT-5 Nano (Thinking)",
510
+ "description": "GPT-5 Nano with reasoning enabled.",
511
+ "providerId": "openai",
512
+ "modelId": "gpt-5-nano-2025-08-07",
513
+ "settings": {
514
+ "temperature": 0.7,
515
+ "reasoning": {
516
+ "enabled": true
517
+ }
518
+ }
519
+ },
266
520
  {
267
521
  "id": "openai-o4-mini-default",
268
522
  "displayName": "OpenAI - o4-mini",
@@ -284,7 +284,80 @@ function detectGgufCapabilities(ggufFilename) {
284
284
  * See: https://github.com/cline/cline/blob/main/src/shared/api.ts
285
285
  */
286
286
  exports.SUPPORTED_MODELS = [
287
- // Anthropic Models
287
+ // Anthropic Models - Claude 4.5 Series
288
+ {
289
+ id: "claude-opus-4-5-20251101",
290
+ name: "Claude Opus 4.5",
291
+ providerId: "anthropic",
292
+ contextWindow: 200000,
293
+ inputPrice: 5.0,
294
+ outputPrice: 25.0,
295
+ description: "Most powerful Claude model with enhanced reasoning and capabilities",
296
+ maxTokens: 8192,
297
+ supportsImages: true,
298
+ supportsPromptCache: true,
299
+ cacheWritesPrice: 6.25,
300
+ cacheReadsPrice: 0.5,
301
+ reasoning: {
302
+ supported: true,
303
+ enabledByDefault: false,
304
+ canDisable: true,
305
+ minBudget: 1024,
306
+ maxBudget: 32000,
307
+ defaultBudget: 10000,
308
+ outputType: 'summary',
309
+ requiresStreamingAbove: 21333,
310
+ },
311
+ },
312
+ {
313
+ id: "claude-sonnet-4-5-20250929",
314
+ name: "Claude Sonnet 4.5",
315
+ providerId: "anthropic",
316
+ contextWindow: 200000,
317
+ inputPrice: 3.0,
318
+ outputPrice: 15.0,
319
+ description: "Advanced Claude model balancing intelligence, speed, and cost",
320
+ maxTokens: 8192,
321
+ supportsImages: true,
322
+ supportsPromptCache: true,
323
+ cacheWritesPrice: 3.75,
324
+ cacheReadsPrice: 0.3,
325
+ reasoning: {
326
+ supported: true,
327
+ enabledByDefault: false,
328
+ canDisable: true,
329
+ minBudget: 1024,
330
+ maxBudget: 32000,
331
+ defaultBudget: 10000,
332
+ outputType: 'summary',
333
+ requiresStreamingAbove: 21333,
334
+ },
335
+ },
336
+ {
337
+ id: "claude-haiku-4-5-20251001",
338
+ name: "Claude Haiku 4.5",
339
+ providerId: "anthropic",
340
+ contextWindow: 200000,
341
+ inputPrice: 1.0,
342
+ outputPrice: 5.0,
343
+ description: "Fast and cost-effective Claude model with reasoning capabilities",
344
+ maxTokens: 8192,
345
+ supportsImages: true,
346
+ supportsPromptCache: true,
347
+ cacheWritesPrice: 1.25,
348
+ cacheReadsPrice: 0.1,
349
+ reasoning: {
350
+ supported: true,
351
+ enabledByDefault: false,
352
+ canDisable: true,
353
+ minBudget: 1024,
354
+ maxBudget: 32000,
355
+ defaultBudget: 10000,
356
+ outputType: 'summary',
357
+ requiresStreamingAbove: 21333,
358
+ },
359
+ },
360
+ // Anthropic Models - Claude 4 Series
288
361
  {
289
362
  id: "claude-sonnet-4-20250514",
290
363
  name: "Claude Sonnet 4",
@@ -385,7 +458,60 @@ exports.SUPPORTED_MODELS = [
385
458
  cacheWritesPrice: 1.0,
386
459
  cacheReadsPrice: 0.08,
387
460
  },
388
- // Google Gemini Models
461
+ // Google Gemini Models - Gemini 3 Series (Preview)
462
+ {
463
+ id: "gemini-3-pro-preview",
464
+ name: "Gemini 3 Pro (Preview)",
465
+ providerId: "gemini",
466
+ contextWindow: 1048576,
467
+ inputPrice: 2.0,
468
+ outputPrice: 12.0,
469
+ description: "Next-generation Gemini model with advanced reasoning and thinking capabilities",
470
+ maxTokens: 8192,
471
+ supportsImages: true,
472
+ supportsPromptCache: true,
473
+ cacheReadsPrice: 0.5,
474
+ reasoning: {
475
+ supported: true,
476
+ enabledByDefault: true,
477
+ canDisable: false,
478
+ minBudget: 1024,
479
+ maxBudget: 65536,
480
+ defaultBudget: -1,
481
+ dynamicBudget: {
482
+ value: -1,
483
+ description: "Let model decide based on query complexity",
484
+ },
485
+ outputType: 'summary',
486
+ },
487
+ },
488
+ {
489
+ id: "gemini-3-flash-preview",
490
+ name: "Gemini 3 Flash (Preview)",
491
+ providerId: "gemini",
492
+ contextWindow: 1048576,
493
+ inputPrice: 0.5,
494
+ outputPrice: 3.0,
495
+ description: "Fast Gemini 3 model with reasoning capabilities and large output support",
496
+ maxTokens: 65536,
497
+ supportsImages: true,
498
+ supportsPromptCache: true,
499
+ cacheReadsPrice: 0.125,
500
+ reasoning: {
501
+ supported: true,
502
+ enabledByDefault: true,
503
+ canDisable: true,
504
+ minBudget: 1024,
505
+ maxBudget: 24576,
506
+ defaultBudget: -1,
507
+ dynamicBudget: {
508
+ value: -1,
509
+ description: "Let model decide based on query complexity",
510
+ },
511
+ outputType: 'summary',
512
+ },
513
+ },
514
+ // Google Gemini Models - Gemini 2.5 Series
389
515
  {
390
516
  id: "gemini-2.5-pro",
391
517
  name: "Gemini 2.5 Pro",
@@ -488,7 +614,84 @@ exports.SUPPORTED_MODELS = [
488
614
  supportsImages: true,
489
615
  supportsPromptCache: false,
490
616
  },
491
- // OpenAI Models
617
+ // OpenAI Models - GPT-5 Series
618
+ {
619
+ id: "gpt-5.2",
620
+ name: "GPT-5.2",
621
+ providerId: "openai",
622
+ contextWindow: 272000,
623
+ inputPrice: 1.75,
624
+ outputPrice: 14.0,
625
+ description: "Latest GPT-5 flagship model with advanced reasoning",
626
+ maxTokens: 8192,
627
+ supportsImages: true,
628
+ supportsPromptCache: true,
629
+ cacheReadsPrice: 0.4375,
630
+ reasoning: {
631
+ supported: true,
632
+ enabledByDefault: false,
633
+ canDisable: true,
634
+ outputType: 'none',
635
+ },
636
+ },
637
+ {
638
+ id: "gpt-5.1",
639
+ name: "GPT-5.1",
640
+ providerId: "openai",
641
+ contextWindow: 272000,
642
+ inputPrice: 1.25,
643
+ outputPrice: 10.0,
644
+ description: "GPT-5 model with strong reasoning capabilities",
645
+ maxTokens: 8192,
646
+ supportsImages: true,
647
+ supportsPromptCache: true,
648
+ cacheReadsPrice: 0.3125,
649
+ reasoning: {
650
+ supported: true,
651
+ enabledByDefault: false,
652
+ canDisable: true,
653
+ outputType: 'none',
654
+ },
655
+ },
656
+ {
657
+ id: "gpt-5-mini-2025-08-07",
658
+ name: "GPT-5 Mini",
659
+ providerId: "openai",
660
+ contextWindow: 272000,
661
+ inputPrice: 0.25,
662
+ outputPrice: 2.0,
663
+ description: "Compact GPT-5 model balancing cost and capability",
664
+ maxTokens: 8192,
665
+ supportsImages: true,
666
+ supportsPromptCache: true,
667
+ cacheReadsPrice: 0.0625,
668
+ reasoning: {
669
+ supported: true,
670
+ enabledByDefault: false,
671
+ canDisable: true,
672
+ outputType: 'none',
673
+ },
674
+ },
675
+ {
676
+ id: "gpt-5-nano-2025-08-07",
677
+ name: "GPT-5 Nano",
678
+ providerId: "openai",
679
+ contextWindow: 272000,
680
+ inputPrice: 0.05,
681
+ outputPrice: 0.4,
682
+ description: "Ultra-efficient GPT-5 model for high-volume tasks",
683
+ maxTokens: 8192,
684
+ supportsImages: true,
685
+ supportsPromptCache: true,
686
+ cacheReadsPrice: 0.0125,
687
+ reasoning: {
688
+ supported: true,
689
+ enabledByDefault: false,
690
+ canDisable: true,
691
+ outputType: 'none',
692
+ },
693
+ },
694
+ // OpenAI Models - o-series
492
695
  {
493
696
  id: "o4-mini",
494
697
  name: "o4-mini",
@@ -509,6 +712,7 @@ exports.SUPPORTED_MODELS = [
509
712
  outputType: 'none',
510
713
  },
511
714
  },
715
+ // OpenAI Models - GPT-4.1 Series
512
716
  {
513
717
  id: "gpt-4.1",
514
718
  name: "GPT-4.1",
@@ -2,7 +2,7 @@
2
2
  * Type definitions for image generation API
3
3
  *
4
4
  * This module contains all types for the ImageService and image generation adapters.
5
- * Based on the design specification in docs/dev/2025-10-22-genai-lite-image-api-design.md
5
+ * Based on the design specification in docs/devlog/2025-10-22-genai-lite-image-api-design.md
6
6
  */
7
7
  /**
8
8
  * Image provider ID type - represents a unique identifier for an image generation provider
@@ -3,6 +3,6 @@
3
3
  * Type definitions for image generation API
4
4
  *
5
5
  * This module contains all types for the ImageService and image generation adapters.
6
- * Based on the design specification in docs/dev/2025-10-22-genai-lite-image-api-design.md
6
+ * Based on the design specification in docs/devlog/2025-10-22-genai-lite-image-api-design.md
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genai-lite",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "A lightweight, portable toolkit for interacting with various Generative AI APIs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,7 +32,8 @@
32
32
  "homepage": "https://github.com/lacerbi/genai-lite#readme",
33
33
  "files": [
34
34
  "dist",
35
- "src/config/presets.json"
35
+ "src/config/llm-presets.json",
36
+ "src/config/image-presets.json"
36
37
  ],
37
38
  "scripts": {
38
39
  "build": "tsc",