smoltalk 0.2.2 → 0.3.1
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.
- package/dist/client.js +9 -10
- package/dist/clients/baseClient.js +2 -4
- package/dist/embed/google.d.ts +3 -0
- package/dist/embed/google.js +25 -0
- package/dist/embed/ollama.d.ts +3 -0
- package/dist/embed/ollama.js +35 -0
- package/dist/embed/openai.d.ts +3 -0
- package/dist/embed/openai.js +42 -0
- package/dist/embed.d.ts +21 -0
- package/dist/embed.js +35 -0
- package/dist/image/google.d.ts +3 -0
- package/dist/image/google.js +57 -0
- package/dist/image/openai.d.ts +3 -0
- package/dist/image/openai.js +140 -0
- package/dist/image.d.ts +35 -0
- package/dist/image.js +37 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/models.d.ts +231 -26
- package/dist/models.js +147 -12
- package/dist/util/imageRef.d.ts +29 -0
- package/dist/util/imageRef.js +51 -0
- package/dist/util/provider.d.ts +17 -0
- package/dist/util/provider.js +34 -0
- package/dist/util/util.d.ts +23 -0
- package/dist/util/util.js +40 -0
- package/package.json +2 -2
package/dist/models.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export type SpeechToTextModel = BaseModel & {
|
|
|
27
27
|
export type ImageModel = BaseModel & {
|
|
28
28
|
type: "image";
|
|
29
29
|
costPerImage?: number;
|
|
30
|
+
inputImageTokenCost?: number;
|
|
31
|
+
outputImageTokenCost?: number;
|
|
30
32
|
outputType?: "FileOutput" | "Array";
|
|
31
33
|
};
|
|
32
34
|
export type TextModel = BaseModel & {
|
|
@@ -50,6 +52,7 @@ export type TextModel = BaseModel & {
|
|
|
50
52
|
export type EmbeddingsModel = {
|
|
51
53
|
type: "embeddings";
|
|
52
54
|
modelName: string;
|
|
55
|
+
provider: string;
|
|
53
56
|
tokenCost?: number;
|
|
54
57
|
};
|
|
55
58
|
export type ModelType = SpeechToTextModel | TextModel | EmbeddingsModel | ImageModel;
|
|
@@ -350,6 +353,42 @@ export declare const textModels: readonly [{
|
|
|
350
353
|
readonly outputsSignatures: false;
|
|
351
354
|
};
|
|
352
355
|
readonly provider: "openai";
|
|
356
|
+
}, {
|
|
357
|
+
readonly type: "text";
|
|
358
|
+
readonly modelName: "gpt-5.4-mini";
|
|
359
|
+
readonly description: "GPT-5.4 mini is the strongest mini model for coding, computer use, and subagents. 400K context window. Knowledge cutoff: August 2025.";
|
|
360
|
+
readonly maxInputTokens: 400000;
|
|
361
|
+
readonly maxOutputTokens: 128000;
|
|
362
|
+
readonly inputTokenCost: 0.75;
|
|
363
|
+
readonly cachedInputTokenCost: 0.075;
|
|
364
|
+
readonly outputTokenCost: 4.5;
|
|
365
|
+
readonly outputTokensPerSecond: 180;
|
|
366
|
+
readonly reasoning: {
|
|
367
|
+
readonly levels: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
368
|
+
readonly defaultLevel: "none";
|
|
369
|
+
readonly canDisable: true;
|
|
370
|
+
readonly outputsThinking: false;
|
|
371
|
+
readonly outputsSignatures: false;
|
|
372
|
+
};
|
|
373
|
+
readonly provider: "openai";
|
|
374
|
+
}, {
|
|
375
|
+
readonly type: "text";
|
|
376
|
+
readonly modelName: "gpt-5.4-nano";
|
|
377
|
+
readonly description: "GPT-5.4 nano is the fastest and most affordable GPT-5.4 variant for classification, data extraction, ranking, and sub-agents. 400K context window. Knowledge cutoff: August 2025.";
|
|
378
|
+
readonly maxInputTokens: 400000;
|
|
379
|
+
readonly maxOutputTokens: 128000;
|
|
380
|
+
readonly inputTokenCost: 0.2;
|
|
381
|
+
readonly cachedInputTokenCost: 0.02;
|
|
382
|
+
readonly outputTokenCost: 1.25;
|
|
383
|
+
readonly outputTokensPerSecond: 160;
|
|
384
|
+
readonly reasoning: {
|
|
385
|
+
readonly levels: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
386
|
+
readonly defaultLevel: "none";
|
|
387
|
+
readonly canDisable: true;
|
|
388
|
+
readonly outputsThinking: false;
|
|
389
|
+
readonly outputsSignatures: false;
|
|
390
|
+
};
|
|
391
|
+
readonly provider: "openai";
|
|
353
392
|
}, {
|
|
354
393
|
readonly type: "text";
|
|
355
394
|
readonly modelName: "gpt-5.4-pro";
|
|
@@ -366,6 +405,40 @@ export declare const textModels: readonly [{
|
|
|
366
405
|
readonly outputsSignatures: false;
|
|
367
406
|
};
|
|
368
407
|
readonly provider: "openai";
|
|
408
|
+
}, {
|
|
409
|
+
readonly type: "text";
|
|
410
|
+
readonly modelName: "gpt-5.5";
|
|
411
|
+
readonly description: "GPT-5.5 is a new class of intelligence for coding and professional work. 1M context window. Standard pricing for ≤272K tokens, 2x input/1.5x output for >272K. Knowledge cutoff: December 2025.";
|
|
412
|
+
readonly maxInputTokens: 1050000;
|
|
413
|
+
readonly maxOutputTokens: 128000;
|
|
414
|
+
readonly inputTokenCost: 5;
|
|
415
|
+
readonly cachedInputTokenCost: 0.5;
|
|
416
|
+
readonly outputTokenCost: 30;
|
|
417
|
+
readonly outputTokensPerSecond: 66;
|
|
418
|
+
readonly reasoning: {
|
|
419
|
+
readonly levels: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
420
|
+
readonly defaultLevel: "medium";
|
|
421
|
+
readonly canDisable: true;
|
|
422
|
+
readonly outputsThinking: false;
|
|
423
|
+
readonly outputsSignatures: false;
|
|
424
|
+
};
|
|
425
|
+
readonly provider: "openai";
|
|
426
|
+
}, {
|
|
427
|
+
readonly type: "text";
|
|
428
|
+
readonly modelName: "gpt-5.5-pro";
|
|
429
|
+
readonly description: "GPT-5.5 Pro uses more compute for complex reasoning tasks. 1M context window. Knowledge cutoff: December 2025.";
|
|
430
|
+
readonly maxInputTokens: 1050000;
|
|
431
|
+
readonly maxOutputTokens: 128000;
|
|
432
|
+
readonly inputTokenCost: 30;
|
|
433
|
+
readonly outputTokenCost: 180;
|
|
434
|
+
readonly reasoning: {
|
|
435
|
+
readonly levels: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
436
|
+
readonly defaultLevel: "medium";
|
|
437
|
+
readonly canDisable: true;
|
|
438
|
+
readonly outputsThinking: false;
|
|
439
|
+
readonly outputsSignatures: false;
|
|
440
|
+
};
|
|
441
|
+
readonly provider: "openai";
|
|
369
442
|
}, {
|
|
370
443
|
readonly type: "text";
|
|
371
444
|
readonly modelName: "gemini-3.1-pro-preview";
|
|
@@ -374,7 +447,7 @@ export declare const textModels: readonly [{
|
|
|
374
447
|
readonly maxOutputTokens: 65536;
|
|
375
448
|
readonly inputTokenCost: 2;
|
|
376
449
|
readonly outputTokenCost: 12;
|
|
377
|
-
readonly outputTokensPerSecond:
|
|
450
|
+
readonly outputTokensPerSecond: 133;
|
|
378
451
|
readonly reasoning: {
|
|
379
452
|
readonly levels: readonly ["low", "medium", "high"];
|
|
380
453
|
readonly defaultLevel: "high";
|
|
@@ -401,7 +474,7 @@ export declare const textModels: readonly [{
|
|
|
401
474
|
readonly maxOutputTokens: 65536;
|
|
402
475
|
readonly inputTokenCost: 0.5;
|
|
403
476
|
readonly outputTokenCost: 3;
|
|
404
|
-
readonly outputTokensPerSecond:
|
|
477
|
+
readonly outputTokensPerSecond: 184;
|
|
405
478
|
readonly reasoning: {
|
|
406
479
|
readonly levels: readonly ["minimal", "low", "medium", "high"];
|
|
407
480
|
readonly defaultLevel: "high";
|
|
@@ -435,7 +508,7 @@ export declare const textModels: readonly [{
|
|
|
435
508
|
readonly maxOutputTokens: 65536;
|
|
436
509
|
readonly inputTokenCost: 1.25;
|
|
437
510
|
readonly outputTokenCost: 10;
|
|
438
|
-
readonly outputTokensPerSecond:
|
|
511
|
+
readonly outputTokensPerSecond: 145;
|
|
439
512
|
readonly reasoning: {
|
|
440
513
|
readonly canDisable: false;
|
|
441
514
|
readonly outputsThinking: true;
|
|
@@ -538,12 +611,28 @@ export declare const textModels: readonly [{
|
|
|
538
611
|
readonly costUnit: "characters";
|
|
539
612
|
readonly disabled: true;
|
|
540
613
|
readonly provider: "google";
|
|
614
|
+
}, {
|
|
615
|
+
readonly type: "text";
|
|
616
|
+
readonly modelName: "claude-opus-4-7";
|
|
617
|
+
readonly description: "The most capable Claude model for complex reasoning and agentic coding. Features Adaptive Thinking that auto-tunes reasoning compute per request. 1M context window, 128K max output. Knowledge cutoff: January 2026.";
|
|
618
|
+
readonly maxInputTokens: 1000000;
|
|
619
|
+
readonly maxOutputTokens: 128000;
|
|
620
|
+
readonly inputTokenCost: 5;
|
|
621
|
+
readonly cachedInputTokenCost: 0.5;
|
|
622
|
+
readonly outputTokenCost: 25;
|
|
623
|
+
readonly outputTokensPerSecond: 72;
|
|
624
|
+
readonly reasoning: {
|
|
625
|
+
readonly canDisable: false;
|
|
626
|
+
readonly outputsThinking: true;
|
|
627
|
+
readonly outputsSignatures: true;
|
|
628
|
+
};
|
|
629
|
+
readonly provider: "anthropic";
|
|
541
630
|
}, {
|
|
542
631
|
readonly type: "text";
|
|
543
632
|
readonly modelName: "claude-opus-4-6";
|
|
544
|
-
readonly description: "
|
|
545
|
-
readonly maxInputTokens:
|
|
546
|
-
readonly maxOutputTokens:
|
|
633
|
+
readonly description: "Claude Opus 4.6 — legacy model. Use claude-opus-4-7 instead. 1M context window, 128K max output.";
|
|
634
|
+
readonly maxInputTokens: 1000000;
|
|
635
|
+
readonly maxOutputTokens: 128000;
|
|
547
636
|
readonly inputTokenCost: 5;
|
|
548
637
|
readonly cachedInputTokenCost: 0.5;
|
|
549
638
|
readonly outputTokenCost: 25;
|
|
@@ -557,12 +646,13 @@ export declare const textModels: readonly [{
|
|
|
557
646
|
}, {
|
|
558
647
|
readonly type: "text";
|
|
559
648
|
readonly modelName: "claude-sonnet-4-6";
|
|
560
|
-
readonly description: "The best combination of speed and intelligence.
|
|
561
|
-
readonly maxInputTokens:
|
|
649
|
+
readonly description: "The best combination of speed and intelligence. 1M context window, 64K max output.";
|
|
650
|
+
readonly maxInputTokens: 1000000;
|
|
562
651
|
readonly maxOutputTokens: 64000;
|
|
563
652
|
readonly inputTokenCost: 3;
|
|
564
653
|
readonly cachedInputTokenCost: 0.3;
|
|
565
654
|
readonly outputTokenCost: 15;
|
|
655
|
+
readonly outputTokensPerSecond: 52;
|
|
566
656
|
readonly reasoning: {
|
|
567
657
|
readonly canDisable: true;
|
|
568
658
|
readonly outputsThinking: true;
|
|
@@ -617,12 +707,22 @@ export declare const imageModels: readonly [{
|
|
|
617
707
|
readonly type: "image";
|
|
618
708
|
readonly modelName: "gpt-image-1";
|
|
619
709
|
readonly provider: "openai";
|
|
710
|
+
readonly inputTokenCost: 5;
|
|
711
|
+
readonly cachedInputTokenCost: 1.25;
|
|
712
|
+
readonly inputImageTokenCost: 10;
|
|
713
|
+
readonly outputImageTokenCost: 40;
|
|
620
714
|
readonly costPerImage: 0.25;
|
|
621
715
|
}, {
|
|
622
716
|
readonly type: "image";
|
|
623
|
-
readonly modelName: "gemini-2.5-flash-image
|
|
717
|
+
readonly modelName: "gemini-2.5-flash-image";
|
|
718
|
+
readonly provider: "google";
|
|
719
|
+
readonly description: "aka nano-banana. Graduated from preview (was gemini-2.5-flash-image-preview).";
|
|
720
|
+
readonly costPerImage: 0.04;
|
|
721
|
+
}, {
|
|
722
|
+
readonly type: "image";
|
|
723
|
+
readonly modelName: "nano-banana-pro-preview";
|
|
624
724
|
readonly provider: "google";
|
|
625
|
-
readonly description: "
|
|
725
|
+
readonly description: "Higher-tier nano-banana. Preview model.";
|
|
626
726
|
readonly costPerImage: 0.04;
|
|
627
727
|
}, {
|
|
628
728
|
readonly type: "image";
|
|
@@ -630,12 +730,14 @@ export declare const imageModels: readonly [{
|
|
|
630
730
|
readonly provider: "google";
|
|
631
731
|
readonly description: "High-fidelity image generation with reasoning-enhanced composition. Supports legible text rendering, complex multi-turn editing, and character consistency using up to 14 reference inputs.";
|
|
632
732
|
readonly costPerImage: 0.05;
|
|
733
|
+
}, {
|
|
734
|
+
readonly type: "image";
|
|
735
|
+
readonly modelName: "gemini-3.1-flash-image-preview";
|
|
736
|
+
readonly provider: "google";
|
|
737
|
+
readonly description: "Fast image generation with Gemini 3.1 Flash. Supports resolutions from 512px to 4096px. ~$0.067/image at 1K resolution.";
|
|
738
|
+
readonly costPerImage: 0.067;
|
|
633
739
|
}];
|
|
634
|
-
export declare const embeddingsModels:
|
|
635
|
-
type: string;
|
|
636
|
-
modelName: string;
|
|
637
|
-
tokenCost: number;
|
|
638
|
-
}[];
|
|
740
|
+
export declare const embeddingsModels: EmbeddingsModel[];
|
|
639
741
|
export type TextModelName = (typeof textModels)[number]["modelName"];
|
|
640
742
|
export type ImageModelName = (typeof imageModels)[number]["modelName"];
|
|
641
743
|
export type SpeechToTextModelName = (typeof speechToTextModels)[number]["modelName"];
|
|
@@ -645,7 +747,7 @@ export declare const registeredTextModels: TextModel[];
|
|
|
645
747
|
export declare function registerTextModel(model: Omit<TextModel, "type"> & {
|
|
646
748
|
type?: "text";
|
|
647
749
|
}): void;
|
|
648
|
-
export declare function getModel(modelName: ModelName): TextModel | {
|
|
750
|
+
export declare function getModel(modelName: ModelName): TextModel | EmbeddingsModel | {
|
|
649
751
|
readonly type: "speech-to-text";
|
|
650
752
|
readonly modelName: "whisper-web";
|
|
651
753
|
readonly perMinuteCost: 0.006;
|
|
@@ -941,6 +1043,42 @@ export declare function getModel(modelName: ModelName): TextModel | {
|
|
|
941
1043
|
readonly outputsSignatures: false;
|
|
942
1044
|
};
|
|
943
1045
|
readonly provider: "openai";
|
|
1046
|
+
} | {
|
|
1047
|
+
readonly type: "text";
|
|
1048
|
+
readonly modelName: "gpt-5.4-mini";
|
|
1049
|
+
readonly description: "GPT-5.4 mini is the strongest mini model for coding, computer use, and subagents. 400K context window. Knowledge cutoff: August 2025.";
|
|
1050
|
+
readonly maxInputTokens: 400000;
|
|
1051
|
+
readonly maxOutputTokens: 128000;
|
|
1052
|
+
readonly inputTokenCost: 0.75;
|
|
1053
|
+
readonly cachedInputTokenCost: 0.075;
|
|
1054
|
+
readonly outputTokenCost: 4.5;
|
|
1055
|
+
readonly outputTokensPerSecond: 180;
|
|
1056
|
+
readonly reasoning: {
|
|
1057
|
+
readonly levels: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
1058
|
+
readonly defaultLevel: "none";
|
|
1059
|
+
readonly canDisable: true;
|
|
1060
|
+
readonly outputsThinking: false;
|
|
1061
|
+
readonly outputsSignatures: false;
|
|
1062
|
+
};
|
|
1063
|
+
readonly provider: "openai";
|
|
1064
|
+
} | {
|
|
1065
|
+
readonly type: "text";
|
|
1066
|
+
readonly modelName: "gpt-5.4-nano";
|
|
1067
|
+
readonly description: "GPT-5.4 nano is the fastest and most affordable GPT-5.4 variant for classification, data extraction, ranking, and sub-agents. 400K context window. Knowledge cutoff: August 2025.";
|
|
1068
|
+
readonly maxInputTokens: 400000;
|
|
1069
|
+
readonly maxOutputTokens: 128000;
|
|
1070
|
+
readonly inputTokenCost: 0.2;
|
|
1071
|
+
readonly cachedInputTokenCost: 0.02;
|
|
1072
|
+
readonly outputTokenCost: 1.25;
|
|
1073
|
+
readonly outputTokensPerSecond: 160;
|
|
1074
|
+
readonly reasoning: {
|
|
1075
|
+
readonly levels: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
1076
|
+
readonly defaultLevel: "none";
|
|
1077
|
+
readonly canDisable: true;
|
|
1078
|
+
readonly outputsThinking: false;
|
|
1079
|
+
readonly outputsSignatures: false;
|
|
1080
|
+
};
|
|
1081
|
+
readonly provider: "openai";
|
|
944
1082
|
} | {
|
|
945
1083
|
readonly type: "text";
|
|
946
1084
|
readonly modelName: "gpt-5.4-pro";
|
|
@@ -957,6 +1095,40 @@ export declare function getModel(modelName: ModelName): TextModel | {
|
|
|
957
1095
|
readonly outputsSignatures: false;
|
|
958
1096
|
};
|
|
959
1097
|
readonly provider: "openai";
|
|
1098
|
+
} | {
|
|
1099
|
+
readonly type: "text";
|
|
1100
|
+
readonly modelName: "gpt-5.5";
|
|
1101
|
+
readonly description: "GPT-5.5 is a new class of intelligence for coding and professional work. 1M context window. Standard pricing for ≤272K tokens, 2x input/1.5x output for >272K. Knowledge cutoff: December 2025.";
|
|
1102
|
+
readonly maxInputTokens: 1050000;
|
|
1103
|
+
readonly maxOutputTokens: 128000;
|
|
1104
|
+
readonly inputTokenCost: 5;
|
|
1105
|
+
readonly cachedInputTokenCost: 0.5;
|
|
1106
|
+
readonly outputTokenCost: 30;
|
|
1107
|
+
readonly outputTokensPerSecond: 66;
|
|
1108
|
+
readonly reasoning: {
|
|
1109
|
+
readonly levels: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
1110
|
+
readonly defaultLevel: "medium";
|
|
1111
|
+
readonly canDisable: true;
|
|
1112
|
+
readonly outputsThinking: false;
|
|
1113
|
+
readonly outputsSignatures: false;
|
|
1114
|
+
};
|
|
1115
|
+
readonly provider: "openai";
|
|
1116
|
+
} | {
|
|
1117
|
+
readonly type: "text";
|
|
1118
|
+
readonly modelName: "gpt-5.5-pro";
|
|
1119
|
+
readonly description: "GPT-5.5 Pro uses more compute for complex reasoning tasks. 1M context window. Knowledge cutoff: December 2025.";
|
|
1120
|
+
readonly maxInputTokens: 1050000;
|
|
1121
|
+
readonly maxOutputTokens: 128000;
|
|
1122
|
+
readonly inputTokenCost: 30;
|
|
1123
|
+
readonly outputTokenCost: 180;
|
|
1124
|
+
readonly reasoning: {
|
|
1125
|
+
readonly levels: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
1126
|
+
readonly defaultLevel: "medium";
|
|
1127
|
+
readonly canDisable: true;
|
|
1128
|
+
readonly outputsThinking: false;
|
|
1129
|
+
readonly outputsSignatures: false;
|
|
1130
|
+
};
|
|
1131
|
+
readonly provider: "openai";
|
|
960
1132
|
} | {
|
|
961
1133
|
readonly type: "text";
|
|
962
1134
|
readonly modelName: "gemini-3.1-pro-preview";
|
|
@@ -965,7 +1137,7 @@ export declare function getModel(modelName: ModelName): TextModel | {
|
|
|
965
1137
|
readonly maxOutputTokens: 65536;
|
|
966
1138
|
readonly inputTokenCost: 2;
|
|
967
1139
|
readonly outputTokenCost: 12;
|
|
968
|
-
readonly outputTokensPerSecond:
|
|
1140
|
+
readonly outputTokensPerSecond: 133;
|
|
969
1141
|
readonly reasoning: {
|
|
970
1142
|
readonly levels: readonly ["low", "medium", "high"];
|
|
971
1143
|
readonly defaultLevel: "high";
|
|
@@ -992,7 +1164,7 @@ export declare function getModel(modelName: ModelName): TextModel | {
|
|
|
992
1164
|
readonly maxOutputTokens: 65536;
|
|
993
1165
|
readonly inputTokenCost: 0.5;
|
|
994
1166
|
readonly outputTokenCost: 3;
|
|
995
|
-
readonly outputTokensPerSecond:
|
|
1167
|
+
readonly outputTokensPerSecond: 184;
|
|
996
1168
|
readonly reasoning: {
|
|
997
1169
|
readonly levels: readonly ["minimal", "low", "medium", "high"];
|
|
998
1170
|
readonly defaultLevel: "high";
|
|
@@ -1026,7 +1198,7 @@ export declare function getModel(modelName: ModelName): TextModel | {
|
|
|
1026
1198
|
readonly maxOutputTokens: 65536;
|
|
1027
1199
|
readonly inputTokenCost: 1.25;
|
|
1028
1200
|
readonly outputTokenCost: 10;
|
|
1029
|
-
readonly outputTokensPerSecond:
|
|
1201
|
+
readonly outputTokensPerSecond: 145;
|
|
1030
1202
|
readonly reasoning: {
|
|
1031
1203
|
readonly canDisable: false;
|
|
1032
1204
|
readonly outputsThinking: true;
|
|
@@ -1129,12 +1301,28 @@ export declare function getModel(modelName: ModelName): TextModel | {
|
|
|
1129
1301
|
readonly costUnit: "characters";
|
|
1130
1302
|
readonly disabled: true;
|
|
1131
1303
|
readonly provider: "google";
|
|
1304
|
+
} | {
|
|
1305
|
+
readonly type: "text";
|
|
1306
|
+
readonly modelName: "claude-opus-4-7";
|
|
1307
|
+
readonly description: "The most capable Claude model for complex reasoning and agentic coding. Features Adaptive Thinking that auto-tunes reasoning compute per request. 1M context window, 128K max output. Knowledge cutoff: January 2026.";
|
|
1308
|
+
readonly maxInputTokens: 1000000;
|
|
1309
|
+
readonly maxOutputTokens: 128000;
|
|
1310
|
+
readonly inputTokenCost: 5;
|
|
1311
|
+
readonly cachedInputTokenCost: 0.5;
|
|
1312
|
+
readonly outputTokenCost: 25;
|
|
1313
|
+
readonly outputTokensPerSecond: 72;
|
|
1314
|
+
readonly reasoning: {
|
|
1315
|
+
readonly canDisable: false;
|
|
1316
|
+
readonly outputsThinking: true;
|
|
1317
|
+
readonly outputsSignatures: true;
|
|
1318
|
+
};
|
|
1319
|
+
readonly provider: "anthropic";
|
|
1132
1320
|
} | {
|
|
1133
1321
|
readonly type: "text";
|
|
1134
1322
|
readonly modelName: "claude-opus-4-6";
|
|
1135
|
-
readonly description: "
|
|
1136
|
-
readonly maxInputTokens:
|
|
1137
|
-
readonly maxOutputTokens:
|
|
1323
|
+
readonly description: "Claude Opus 4.6 — legacy model. Use claude-opus-4-7 instead. 1M context window, 128K max output.";
|
|
1324
|
+
readonly maxInputTokens: 1000000;
|
|
1325
|
+
readonly maxOutputTokens: 128000;
|
|
1138
1326
|
readonly inputTokenCost: 5;
|
|
1139
1327
|
readonly cachedInputTokenCost: 0.5;
|
|
1140
1328
|
readonly outputTokenCost: 25;
|
|
@@ -1148,12 +1336,13 @@ export declare function getModel(modelName: ModelName): TextModel | {
|
|
|
1148
1336
|
} | {
|
|
1149
1337
|
readonly type: "text";
|
|
1150
1338
|
readonly modelName: "claude-sonnet-4-6";
|
|
1151
|
-
readonly description: "The best combination of speed and intelligence.
|
|
1152
|
-
readonly maxInputTokens:
|
|
1339
|
+
readonly description: "The best combination of speed and intelligence. 1M context window, 64K max output.";
|
|
1340
|
+
readonly maxInputTokens: 1000000;
|
|
1153
1341
|
readonly maxOutputTokens: 64000;
|
|
1154
1342
|
readonly inputTokenCost: 3;
|
|
1155
1343
|
readonly cachedInputTokenCost: 0.3;
|
|
1156
1344
|
readonly outputTokenCost: 15;
|
|
1345
|
+
readonly outputTokensPerSecond: 52;
|
|
1157
1346
|
readonly reasoning: {
|
|
1158
1347
|
readonly canDisable: true;
|
|
1159
1348
|
readonly outputsThinking: true;
|
|
@@ -1207,12 +1396,22 @@ export declare function getModel(modelName: ModelName): TextModel | {
|
|
|
1207
1396
|
readonly type: "image";
|
|
1208
1397
|
readonly modelName: "gpt-image-1";
|
|
1209
1398
|
readonly provider: "openai";
|
|
1399
|
+
readonly inputTokenCost: 5;
|
|
1400
|
+
readonly cachedInputTokenCost: 1.25;
|
|
1401
|
+
readonly inputImageTokenCost: 10;
|
|
1402
|
+
readonly outputImageTokenCost: 40;
|
|
1210
1403
|
readonly costPerImage: 0.25;
|
|
1211
1404
|
} | {
|
|
1212
1405
|
readonly type: "image";
|
|
1213
|
-
readonly modelName: "gemini-2.5-flash-image
|
|
1406
|
+
readonly modelName: "gemini-2.5-flash-image";
|
|
1407
|
+
readonly provider: "google";
|
|
1408
|
+
readonly description: "aka nano-banana. Graduated from preview (was gemini-2.5-flash-image-preview).";
|
|
1409
|
+
readonly costPerImage: 0.04;
|
|
1410
|
+
} | {
|
|
1411
|
+
readonly type: "image";
|
|
1412
|
+
readonly modelName: "nano-banana-pro-preview";
|
|
1214
1413
|
readonly provider: "google";
|
|
1215
|
-
readonly description: "
|
|
1414
|
+
readonly description: "Higher-tier nano-banana. Preview model.";
|
|
1216
1415
|
readonly costPerImage: 0.04;
|
|
1217
1416
|
} | {
|
|
1218
1417
|
readonly type: "image";
|
|
@@ -1220,6 +1419,12 @@ export declare function getModel(modelName: ModelName): TextModel | {
|
|
|
1220
1419
|
readonly provider: "google";
|
|
1221
1420
|
readonly description: "High-fidelity image generation with reasoning-enhanced composition. Supports legible text rendering, complex multi-turn editing, and character consistency using up to 14 reference inputs.";
|
|
1222
1421
|
readonly costPerImage: 0.05;
|
|
1422
|
+
} | {
|
|
1423
|
+
readonly type: "image";
|
|
1424
|
+
readonly modelName: "gemini-3.1-flash-image-preview";
|
|
1425
|
+
readonly provider: "google";
|
|
1426
|
+
readonly description: "Fast image generation with Gemini 3.1 Flash. Supports resolutions from 512px to 4096px. ~$0.067/image at 1K resolution.";
|
|
1427
|
+
readonly costPerImage: 0.067;
|
|
1223
1428
|
} | undefined;
|
|
1224
1429
|
export declare function isImageModel(model: ModelType): model is ImageModel;
|
|
1225
1430
|
export declare function isTextModel(model: ModelType): model is TextModel;
|
package/dist/models.js
CHANGED
|
@@ -339,6 +339,44 @@ export const textModels = [
|
|
|
339
339
|
},
|
|
340
340
|
provider: "openai",
|
|
341
341
|
},
|
|
342
|
+
{
|
|
343
|
+
type: "text",
|
|
344
|
+
modelName: "gpt-5.4-mini",
|
|
345
|
+
description: "GPT-5.4 mini is the strongest mini model for coding, computer use, and subagents. 400K context window. Knowledge cutoff: August 2025.",
|
|
346
|
+
maxInputTokens: 400000,
|
|
347
|
+
maxOutputTokens: 128000,
|
|
348
|
+
inputTokenCost: 0.75,
|
|
349
|
+
cachedInputTokenCost: 0.075,
|
|
350
|
+
outputTokenCost: 4.5,
|
|
351
|
+
outputTokensPerSecond: 180,
|
|
352
|
+
reasoning: {
|
|
353
|
+
levels: ["none", "low", "medium", "high", "xhigh"],
|
|
354
|
+
defaultLevel: "none",
|
|
355
|
+
canDisable: true,
|
|
356
|
+
outputsThinking: false,
|
|
357
|
+
outputsSignatures: false,
|
|
358
|
+
},
|
|
359
|
+
provider: "openai",
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
type: "text",
|
|
363
|
+
modelName: "gpt-5.4-nano",
|
|
364
|
+
description: "GPT-5.4 nano is the fastest and most affordable GPT-5.4 variant for classification, data extraction, ranking, and sub-agents. 400K context window. Knowledge cutoff: August 2025.",
|
|
365
|
+
maxInputTokens: 400000,
|
|
366
|
+
maxOutputTokens: 128000,
|
|
367
|
+
inputTokenCost: 0.2,
|
|
368
|
+
cachedInputTokenCost: 0.02,
|
|
369
|
+
outputTokenCost: 1.25,
|
|
370
|
+
outputTokensPerSecond: 160,
|
|
371
|
+
reasoning: {
|
|
372
|
+
levels: ["none", "low", "medium", "high", "xhigh"],
|
|
373
|
+
defaultLevel: "none",
|
|
374
|
+
canDisable: true,
|
|
375
|
+
outputsThinking: false,
|
|
376
|
+
outputsSignatures: false,
|
|
377
|
+
},
|
|
378
|
+
provider: "openai",
|
|
379
|
+
},
|
|
342
380
|
{
|
|
343
381
|
type: "text",
|
|
344
382
|
modelName: "gpt-5.4-pro",
|
|
@@ -356,6 +394,42 @@ export const textModels = [
|
|
|
356
394
|
},
|
|
357
395
|
provider: "openai",
|
|
358
396
|
},
|
|
397
|
+
{
|
|
398
|
+
type: "text",
|
|
399
|
+
modelName: "gpt-5.5",
|
|
400
|
+
description: "GPT-5.5 is a new class of intelligence for coding and professional work. 1M context window. Standard pricing for ≤272K tokens, 2x input/1.5x output for >272K. Knowledge cutoff: December 2025.",
|
|
401
|
+
maxInputTokens: 1_050_000,
|
|
402
|
+
maxOutputTokens: 128000,
|
|
403
|
+
inputTokenCost: 5,
|
|
404
|
+
cachedInputTokenCost: 0.5,
|
|
405
|
+
outputTokenCost: 30,
|
|
406
|
+
outputTokensPerSecond: 66,
|
|
407
|
+
reasoning: {
|
|
408
|
+
levels: ["none", "low", "medium", "high", "xhigh"],
|
|
409
|
+
defaultLevel: "medium",
|
|
410
|
+
canDisable: true,
|
|
411
|
+
outputsThinking: false,
|
|
412
|
+
outputsSignatures: false,
|
|
413
|
+
},
|
|
414
|
+
provider: "openai",
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
type: "text",
|
|
418
|
+
modelName: "gpt-5.5-pro",
|
|
419
|
+
description: "GPT-5.5 Pro uses more compute for complex reasoning tasks. 1M context window. Knowledge cutoff: December 2025.",
|
|
420
|
+
maxInputTokens: 1_050_000,
|
|
421
|
+
maxOutputTokens: 128000,
|
|
422
|
+
inputTokenCost: 30,
|
|
423
|
+
outputTokenCost: 180,
|
|
424
|
+
reasoning: {
|
|
425
|
+
levels: ["none", "low", "medium", "high", "xhigh"],
|
|
426
|
+
defaultLevel: "medium",
|
|
427
|
+
canDisable: true,
|
|
428
|
+
outputsThinking: false,
|
|
429
|
+
outputsSignatures: false,
|
|
430
|
+
},
|
|
431
|
+
provider: "openai",
|
|
432
|
+
},
|
|
359
433
|
{
|
|
360
434
|
type: "text",
|
|
361
435
|
modelName: "gemini-3.1-pro-preview",
|
|
@@ -364,7 +438,7 @@ export const textModels = [
|
|
|
364
438
|
maxOutputTokens: 65536,
|
|
365
439
|
inputTokenCost: 2.0,
|
|
366
440
|
outputTokenCost: 12.0,
|
|
367
|
-
outputTokensPerSecond:
|
|
441
|
+
outputTokensPerSecond: 133,
|
|
368
442
|
reasoning: {
|
|
369
443
|
levels: ["low", "medium", "high"],
|
|
370
444
|
defaultLevel: "high",
|
|
@@ -393,7 +467,7 @@ export const textModels = [
|
|
|
393
467
|
maxOutputTokens: 65536,
|
|
394
468
|
inputTokenCost: 0.5,
|
|
395
469
|
outputTokenCost: 3.0,
|
|
396
|
-
outputTokensPerSecond:
|
|
470
|
+
outputTokensPerSecond: 184,
|
|
397
471
|
reasoning: {
|
|
398
472
|
levels: ["minimal", "low", "medium", "high"],
|
|
399
473
|
defaultLevel: "high",
|
|
@@ -429,7 +503,7 @@ export const textModels = [
|
|
|
429
503
|
maxOutputTokens: 65536,
|
|
430
504
|
inputTokenCost: 1.25,
|
|
431
505
|
outputTokenCost: 10.0,
|
|
432
|
-
outputTokensPerSecond:
|
|
506
|
+
outputTokensPerSecond: 145,
|
|
433
507
|
reasoning: {
|
|
434
508
|
canDisable: false,
|
|
435
509
|
outputsThinking: true,
|
|
@@ -541,12 +615,29 @@ export const textModels = [
|
|
|
541
615
|
disabled: true,
|
|
542
616
|
provider: "google",
|
|
543
617
|
},
|
|
618
|
+
{
|
|
619
|
+
type: "text",
|
|
620
|
+
modelName: "claude-opus-4-7",
|
|
621
|
+
description: "The most capable Claude model for complex reasoning and agentic coding. Features Adaptive Thinking that auto-tunes reasoning compute per request. 1M context window, 128K max output. Knowledge cutoff: January 2026.",
|
|
622
|
+
maxInputTokens: 1_000_000,
|
|
623
|
+
maxOutputTokens: 128_000,
|
|
624
|
+
inputTokenCost: 5,
|
|
625
|
+
cachedInputTokenCost: 0.5,
|
|
626
|
+
outputTokenCost: 25,
|
|
627
|
+
outputTokensPerSecond: 72,
|
|
628
|
+
reasoning: {
|
|
629
|
+
canDisable: false,
|
|
630
|
+
outputsThinking: true,
|
|
631
|
+
outputsSignatures: true,
|
|
632
|
+
},
|
|
633
|
+
provider: "anthropic",
|
|
634
|
+
},
|
|
544
635
|
{
|
|
545
636
|
type: "text",
|
|
546
637
|
modelName: "claude-opus-4-6",
|
|
547
|
-
description: "
|
|
548
|
-
maxInputTokens:
|
|
549
|
-
maxOutputTokens:
|
|
638
|
+
description: "Claude Opus 4.6 — legacy model. Use claude-opus-4-7 instead. 1M context window, 128K max output.",
|
|
639
|
+
maxInputTokens: 1_000_000,
|
|
640
|
+
maxOutputTokens: 128_000,
|
|
550
641
|
inputTokenCost: 5,
|
|
551
642
|
cachedInputTokenCost: 0.5,
|
|
552
643
|
outputTokenCost: 25,
|
|
@@ -561,12 +652,13 @@ export const textModels = [
|
|
|
561
652
|
{
|
|
562
653
|
type: "text",
|
|
563
654
|
modelName: "claude-sonnet-4-6",
|
|
564
|
-
description: "The best combination of speed and intelligence.
|
|
565
|
-
maxInputTokens:
|
|
655
|
+
description: "The best combination of speed and intelligence. 1M context window, 64K max output.",
|
|
656
|
+
maxInputTokens: 1_000_000,
|
|
566
657
|
maxOutputTokens: 64_000,
|
|
567
658
|
inputTokenCost: 3,
|
|
568
659
|
cachedInputTokenCost: 0.3,
|
|
569
660
|
outputTokenCost: 15,
|
|
661
|
+
outputTokensPerSecond: 52,
|
|
570
662
|
reasoning: {
|
|
571
663
|
canDisable: true,
|
|
572
664
|
outputsThinking: true,
|
|
@@ -626,14 +718,26 @@ export const imageModels = [
|
|
|
626
718
|
type: "image",
|
|
627
719
|
modelName: "gpt-image-1",
|
|
628
720
|
provider: "openai",
|
|
629
|
-
//
|
|
721
|
+
// Token-based pricing per https://platform.openai.com/docs/models/gpt-image-1
|
|
722
|
+
inputTokenCost: 5,
|
|
723
|
+
cachedInputTokenCost: 1.25,
|
|
724
|
+
inputImageTokenCost: 10,
|
|
725
|
+
outputImageTokenCost: 40,
|
|
726
|
+
// Rough per-image fallback estimate when usage is unavailable.
|
|
630
727
|
costPerImage: 0.25,
|
|
631
728
|
},
|
|
632
729
|
{
|
|
633
730
|
type: "image",
|
|
634
|
-
modelName: "gemini-2.5-flash-image
|
|
731
|
+
modelName: "gemini-2.5-flash-image",
|
|
732
|
+
provider: "google",
|
|
733
|
+
description: "aka nano-banana. Graduated from preview (was gemini-2.5-flash-image-preview).",
|
|
734
|
+
costPerImage: 0.04,
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
type: "image",
|
|
738
|
+
modelName: "nano-banana-pro-preview",
|
|
635
739
|
provider: "google",
|
|
636
|
-
description: "
|
|
740
|
+
description: "Higher-tier nano-banana. Preview model.",
|
|
637
741
|
costPerImage: 0.04,
|
|
638
742
|
},
|
|
639
743
|
{
|
|
@@ -643,9 +747,39 @@ export const imageModels = [
|
|
|
643
747
|
description: "High-fidelity image generation with reasoning-enhanced composition. Supports legible text rendering, complex multi-turn editing, and character consistency using up to 14 reference inputs.",
|
|
644
748
|
costPerImage: 0.05,
|
|
645
749
|
},
|
|
750
|
+
{
|
|
751
|
+
type: "image",
|
|
752
|
+
modelName: "gemini-3.1-flash-image-preview",
|
|
753
|
+
provider: "google",
|
|
754
|
+
description: "Fast image generation with Gemini 3.1 Flash. Supports resolutions from 512px to 4096px. ~$0.067/image at 1K resolution.",
|
|
755
|
+
costPerImage: 0.067,
|
|
756
|
+
},
|
|
646
757
|
];
|
|
647
758
|
export const embeddingsModels = [
|
|
648
|
-
{
|
|
759
|
+
{
|
|
760
|
+
type: "embeddings",
|
|
761
|
+
modelName: "text-embedding-3-small",
|
|
762
|
+
provider: "openai",
|
|
763
|
+
tokenCost: 0.02,
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
type: "embeddings",
|
|
767
|
+
modelName: "text-embedding-3-large",
|
|
768
|
+
provider: "openai",
|
|
769
|
+
tokenCost: 0.13,
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
type: "embeddings",
|
|
773
|
+
modelName: "gemini-embedding-001",
|
|
774
|
+
provider: "google",
|
|
775
|
+
tokenCost: 0.15,
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
type: "embeddings",
|
|
779
|
+
modelName: "gemini-embedding-2-preview",
|
|
780
|
+
provider: "google",
|
|
781
|
+
tokenCost: 0.2,
|
|
782
|
+
},
|
|
649
783
|
];
|
|
650
784
|
export const registeredTextModels = [];
|
|
651
785
|
export function registerTextModel(model) {
|
|
@@ -657,6 +791,7 @@ export function getModel(modelName) {
|
|
|
657
791
|
...imageModels,
|
|
658
792
|
...speechToTextModels,
|
|
659
793
|
...registeredTextModels,
|
|
794
|
+
...embeddingsModels,
|
|
660
795
|
];
|
|
661
796
|
return allModels.find((model) => model.modelName === modelName);
|
|
662
797
|
}
|