smoltalk 0.11.1 → 0.12.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/model.js +2 -2
- package/dist/models.d.ts +148 -17
- package/dist/models.js +176 -19
- package/package.json +1 -1
package/dist/model.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getModel,
|
|
1
|
+
import { getModel, resolveModelForProvider, isSpeechToTextModel, isTextToSpeechModel, ModelNameSchema, } from "./models.js";
|
|
2
2
|
import { SmolError } from "./smolError.js";
|
|
3
3
|
import { round } from "./util/util.js";
|
|
4
4
|
const TOKEN_COST_UNIT = 1_000_000;
|
|
@@ -27,7 +27,7 @@ export class Model {
|
|
|
27
27
|
calculateCost(usage) {
|
|
28
28
|
let model;
|
|
29
29
|
if (this.provider !== undefined) {
|
|
30
|
-
model =
|
|
30
|
+
model = resolveModelForProvider(this.provider, this.model, this.modelData);
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
33
|
model = getModel(this.model, this.modelData);
|
package/dist/models.d.ts
CHANGED
|
@@ -868,16 +868,17 @@ export declare const textModels: readonly [{
|
|
|
868
868
|
}, {
|
|
869
869
|
readonly type: "text";
|
|
870
870
|
readonly modelName: "gpt-5.6-sol";
|
|
871
|
-
readonly description: "GPT-5.6 Sol is the flagship model of the GPT-5.6 family for the most complex coding and agentic tasks. 1M context window. Standard pricing for ≤272K tokens, 2x input/1.5x output for >272K. Knowledge cutoff: February 2026.";
|
|
871
|
+
readonly description: "GPT-5.6 Sol is the flagship model of the GPT-5.6 family for the most complex coding and agentic tasks. 1M context window. Standard pricing for ≤272K tokens, 2x input/1.5x output for >272K. Reflects the August 21, 2026 promotional price cut (input $5→$4, output $30→$20), which runs through at least November 21, 2026. Knowledge cutoff: February 2026.";
|
|
872
872
|
readonly maxInputTokens: 1050000;
|
|
873
873
|
readonly maxOutputTokens: 128000;
|
|
874
|
-
readonly inputTokenCost:
|
|
875
|
-
readonly cachedInputTokenCost: 0.
|
|
876
|
-
readonly outputTokenCost:
|
|
874
|
+
readonly inputTokenCost: 4;
|
|
875
|
+
readonly cachedInputTokenCost: 0.4;
|
|
876
|
+
readonly outputTokenCost: 20;
|
|
877
|
+
readonly outputTokensPerSecond: 71;
|
|
877
878
|
readonly longContext: {
|
|
878
|
-
readonly inputTokenCost:
|
|
879
|
-
readonly cachedInputTokenCost:
|
|
880
|
-
readonly outputTokenCost:
|
|
879
|
+
readonly inputTokenCost: 8;
|
|
880
|
+
readonly cachedInputTokenCost: 0.8;
|
|
881
|
+
readonly outputTokenCost: 30;
|
|
881
882
|
readonly thresholdTokens: 200000;
|
|
882
883
|
};
|
|
883
884
|
readonly reasoning: {
|
|
@@ -908,6 +909,7 @@ export declare const textModels: readonly [{
|
|
|
908
909
|
readonly inputTokenCost: 2;
|
|
909
910
|
readonly cachedInputTokenCost: 0.2;
|
|
910
911
|
readonly outputTokenCost: 12;
|
|
912
|
+
readonly outputTokensPerSecond: 98;
|
|
911
913
|
readonly longContext: {
|
|
912
914
|
readonly inputTokenCost: 4;
|
|
913
915
|
readonly cachedInputTokenCost: 0.4;
|
|
@@ -942,6 +944,7 @@ export declare const textModels: readonly [{
|
|
|
942
944
|
readonly inputTokenCost: 0.2;
|
|
943
945
|
readonly cachedInputTokenCost: 0.02;
|
|
944
946
|
readonly outputTokenCost: 1.2;
|
|
947
|
+
readonly outputTokensPerSecond: 116;
|
|
945
948
|
readonly longContext: {
|
|
946
949
|
readonly inputTokenCost: 0.4;
|
|
947
950
|
readonly cachedInputTokenCost: 0.04;
|
|
@@ -1030,15 +1033,75 @@ export declare const textModels: readonly [{
|
|
|
1030
1033
|
readonly temperatureSupported: true;
|
|
1031
1034
|
readonly disabled: true;
|
|
1032
1035
|
readonly provider: "google";
|
|
1036
|
+
}, {
|
|
1037
|
+
readonly type: "text";
|
|
1038
|
+
readonly modelName: "gemini-3.8-flash";
|
|
1039
|
+
readonly description: "Google's most intelligent Flash model (GA September 2, 2026), built on Gemini 3.7 Flash and engineered for long-horizon software engineering, autonomous agents, and complex enterprise workflows. 1M context window, 64K output. Introductory pricing $0.75 input / $3.75 output per 1M through December 31, 2026 ($1.50 / $7.50 thereafter). Thinking levels low/medium/high — `minimal` returns an error.";
|
|
1040
|
+
readonly maxInputTokens: 1048576;
|
|
1041
|
+
readonly maxOutputTokens: 65536;
|
|
1042
|
+
readonly inputTokenCost: 0.75;
|
|
1043
|
+
readonly cachedInputTokenCost: 0.075;
|
|
1044
|
+
readonly outputTokenCost: 3.75;
|
|
1045
|
+
readonly outputTokensPerSecond: 312;
|
|
1046
|
+
readonly inputAudioTokenCost: 1.5;
|
|
1047
|
+
readonly reasoning: {
|
|
1048
|
+
readonly levels: readonly ["low", "medium", "high"];
|
|
1049
|
+
readonly defaultLevel: "medium";
|
|
1050
|
+
readonly canDisable: false;
|
|
1051
|
+
readonly outputsThinking: true;
|
|
1052
|
+
readonly outputsSignatures: true;
|
|
1053
|
+
};
|
|
1054
|
+
readonly modalities: {
|
|
1055
|
+
readonly input: readonly ["text", "image", "video", "audio", "pdf"];
|
|
1056
|
+
readonly output: readonly ["text"];
|
|
1057
|
+
};
|
|
1058
|
+
readonly knowledge: "2026-03";
|
|
1059
|
+
readonly releaseDate: "2026-09-02";
|
|
1060
|
+
readonly lastUpdated: "2026-09-02";
|
|
1061
|
+
readonly family: "gemini-flash";
|
|
1062
|
+
readonly openWeights: false;
|
|
1063
|
+
readonly structuredOutput: true;
|
|
1064
|
+
readonly temperatureSupported: true;
|
|
1065
|
+
readonly provider: "google";
|
|
1066
|
+
}, {
|
|
1067
|
+
readonly type: "text";
|
|
1068
|
+
readonly modelName: "gemini-3.7-flash";
|
|
1069
|
+
readonly description: "Gemini 3.7 Flash (GA August 13, 2026) for complex coding, agentic workflows, and reliable multi-step execution. Superseded by gemini-3.8-flash but fully supported. 1M context window, 64K output. Introductory pricing $0.75 input / $3.75 output per 1M through December 31, 2026 ($1.50 / $7.50 thereafter). Thinking levels low/medium/high — `minimal` returns an error.";
|
|
1070
|
+
readonly maxInputTokens: 1048576;
|
|
1071
|
+
readonly maxOutputTokens: 65536;
|
|
1072
|
+
readonly inputTokenCost: 0.75;
|
|
1073
|
+
readonly cachedInputTokenCost: 0.075;
|
|
1074
|
+
readonly outputTokenCost: 3.75;
|
|
1075
|
+
readonly outputTokensPerSecond: 272;
|
|
1076
|
+
readonly inputAudioTokenCost: 1.5;
|
|
1077
|
+
readonly reasoning: {
|
|
1078
|
+
readonly levels: readonly ["low", "medium", "high"];
|
|
1079
|
+
readonly defaultLevel: "medium";
|
|
1080
|
+
readonly canDisable: false;
|
|
1081
|
+
readonly outputsThinking: true;
|
|
1082
|
+
readonly outputsSignatures: true;
|
|
1083
|
+
};
|
|
1084
|
+
readonly modalities: {
|
|
1085
|
+
readonly input: readonly ["text", "image", "video", "audio", "pdf"];
|
|
1086
|
+
readonly output: readonly ["text"];
|
|
1087
|
+
};
|
|
1088
|
+
readonly knowledge: "2026-03";
|
|
1089
|
+
readonly releaseDate: "2026-08-13";
|
|
1090
|
+
readonly lastUpdated: "2026-08-13";
|
|
1091
|
+
readonly family: "gemini-flash";
|
|
1092
|
+
readonly openWeights: false;
|
|
1093
|
+
readonly structuredOutput: true;
|
|
1094
|
+
readonly temperatureSupported: true;
|
|
1095
|
+
readonly provider: "google";
|
|
1033
1096
|
}, {
|
|
1034
1097
|
readonly type: "text";
|
|
1035
1098
|
readonly modelName: "gemini-3.6-flash";
|
|
1036
|
-
readonly description: "
|
|
1099
|
+
readonly description: "Gemini 3.6 Flash (GA July 21, 2026), balancing speed and multimodal capabilities across general agentic and everyday tasks. Superseded by gemini-3.7-flash / gemini-3.8-flash. 1M context window, 64K output. Introductory pricing $0.75 input / $3.75 output per 1M through December 31, 2026 ($1.50 / $7.50 thereafter). Context caching: $0.075/1M read.";
|
|
1037
1100
|
readonly maxInputTokens: 1048576;
|
|
1038
1101
|
readonly maxOutputTokens: 65536;
|
|
1039
|
-
readonly inputTokenCost:
|
|
1040
|
-
readonly cachedInputTokenCost: 0.
|
|
1041
|
-
readonly outputTokenCost:
|
|
1102
|
+
readonly inputTokenCost: 0.75;
|
|
1103
|
+
readonly cachedInputTokenCost: 0.075;
|
|
1104
|
+
readonly outputTokenCost: 3.75;
|
|
1042
1105
|
readonly inputAudioTokenCost: 1.5;
|
|
1043
1106
|
readonly reasoning: {
|
|
1044
1107
|
readonly levels: readonly ["minimal", "low", "medium", "high"];
|
|
@@ -1127,6 +1190,7 @@ export declare const textModels: readonly [{
|
|
|
1127
1190
|
readonly inputTokenCost: 0.3;
|
|
1128
1191
|
readonly cachedInputTokenCost: 0.03;
|
|
1129
1192
|
readonly outputTokenCost: 2.5;
|
|
1193
|
+
readonly outputTokensPerSecond: 347;
|
|
1130
1194
|
readonly inputAudioTokenCost: 0.5;
|
|
1131
1195
|
readonly reasoning: {
|
|
1132
1196
|
readonly levels: readonly ["minimal", "low", "medium", "high"];
|
|
@@ -1380,16 +1444,75 @@ export declare const textModels: readonly [{
|
|
|
1380
1444
|
readonly costUnit: "characters";
|
|
1381
1445
|
readonly disabled: true;
|
|
1382
1446
|
readonly provider: "google";
|
|
1447
|
+
}, {
|
|
1448
|
+
readonly type: "text";
|
|
1449
|
+
readonly modelName: "claude-fable-5-1";
|
|
1450
|
+
readonly description: "Anthropic's most capable widely released model, for the most demanding reasoning and long-horizon agentic work. Successor to claude-fable-5 in the same tier at the same per-token price, but cache reads are 0.025x base input ($0.25/MTok) rather than the standard 0.1x. Thinking is always on (cannot be disabled); the raw chain of thought is never returned. Forced tool use (tool_choice any/tool) returns a 400. Requires 30-day data retention (not available under zero data retention). 1M context window, 128K max output.";
|
|
1451
|
+
readonly maxInputTokens: 1000000;
|
|
1452
|
+
readonly maxOutputTokens: 128000;
|
|
1453
|
+
readonly inputTokenCost: 10;
|
|
1454
|
+
readonly cachedInputTokenCost: 0.25;
|
|
1455
|
+
readonly cacheCreationInputTokenCost: 12.5;
|
|
1456
|
+
readonly outputTokenCost: 50;
|
|
1457
|
+
readonly reasoning: {
|
|
1458
|
+
readonly thinkingStyle: "adaptive";
|
|
1459
|
+
readonly levels: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
1460
|
+
readonly defaultLevel: "high";
|
|
1461
|
+
readonly canDisable: false;
|
|
1462
|
+
readonly outputsThinking: true;
|
|
1463
|
+
readonly outputsSignatures: true;
|
|
1464
|
+
};
|
|
1465
|
+
readonly modalities: {
|
|
1466
|
+
readonly input: readonly ["text", "image", "pdf"];
|
|
1467
|
+
readonly output: readonly ["text"];
|
|
1468
|
+
};
|
|
1469
|
+
readonly knowledge: "2026-06";
|
|
1470
|
+
readonly releaseDate: "2026-09-01";
|
|
1471
|
+
readonly lastUpdated: "2026-09-01";
|
|
1472
|
+
readonly family: "claude-fable";
|
|
1473
|
+
readonly openWeights: false;
|
|
1474
|
+
readonly temperatureSupported: false;
|
|
1475
|
+
readonly provider: "anthropic";
|
|
1476
|
+
}, {
|
|
1477
|
+
readonly type: "text";
|
|
1478
|
+
readonly modelName: "claude-opus-5";
|
|
1479
|
+
readonly description: "Opus-tier model above Opus 4.8, strongest on deep reasoning, agentic and long-horizon work, at half the cost of claude-fable-5-1. Thinking is on by default; it can be disabled only at effort `high` or below (xhigh/max return a 400). 1M context window, 128K max output.";
|
|
1480
|
+
readonly maxInputTokens: 1000000;
|
|
1481
|
+
readonly maxOutputTokens: 128000;
|
|
1482
|
+
readonly inputTokenCost: 5;
|
|
1483
|
+
readonly cachedInputTokenCost: 0.5;
|
|
1484
|
+
readonly cacheCreationInputTokenCost: 6.25;
|
|
1485
|
+
readonly outputTokenCost: 25;
|
|
1486
|
+
readonly reasoning: {
|
|
1487
|
+
readonly thinkingStyle: "adaptive";
|
|
1488
|
+
readonly levels: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
1489
|
+
readonly defaultLevel: "high";
|
|
1490
|
+
readonly canDisable: true;
|
|
1491
|
+
readonly outputsThinking: true;
|
|
1492
|
+
readonly outputsSignatures: true;
|
|
1493
|
+
};
|
|
1494
|
+
readonly modalities: {
|
|
1495
|
+
readonly input: readonly ["text", "image", "pdf"];
|
|
1496
|
+
readonly output: readonly ["text"];
|
|
1497
|
+
};
|
|
1498
|
+
readonly knowledge: "2026-05";
|
|
1499
|
+
readonly releaseDate: "2026-07-24";
|
|
1500
|
+
readonly lastUpdated: "2026-07-24";
|
|
1501
|
+
readonly family: "claude-opus";
|
|
1502
|
+
readonly openWeights: false;
|
|
1503
|
+
readonly temperatureSupported: false;
|
|
1504
|
+
readonly provider: "anthropic";
|
|
1383
1505
|
}, {
|
|
1384
1506
|
readonly type: "text";
|
|
1385
1507
|
readonly modelName: "claude-fable-5";
|
|
1386
|
-
readonly description: "
|
|
1508
|
+
readonly description: "Previous-generation Fable model, superseded by claude-fable-5-1 at the same per-token price (5.1 also cuts cache reads to $0.25/MTok). Thinking is always on (cannot be disabled); the raw chain of thought is never returned. Requires 30-day data retention (not available under zero data retention). 1M context window, 128K max output.";
|
|
1387
1509
|
readonly maxInputTokens: 1000000;
|
|
1388
1510
|
readonly maxOutputTokens: 128000;
|
|
1389
1511
|
readonly inputTokenCost: 10;
|
|
1390
1512
|
readonly cachedInputTokenCost: 1;
|
|
1391
1513
|
readonly cacheCreationInputTokenCost: 12.5;
|
|
1392
1514
|
readonly outputTokenCost: 50;
|
|
1515
|
+
readonly outputTokensPerSecond: 65;
|
|
1393
1516
|
readonly reasoning: {
|
|
1394
1517
|
readonly thinkingStyle: "adaptive";
|
|
1395
1518
|
readonly levels: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
@@ -1494,13 +1617,14 @@ export declare const textModels: readonly [{
|
|
|
1494
1617
|
}, {
|
|
1495
1618
|
readonly type: "text";
|
|
1496
1619
|
readonly modelName: "claude-sonnet-5";
|
|
1497
|
-
readonly description: "The best combination of speed and intelligence in the Sonnet tier, with near-Opus quality on coding and agentic work. Adaptive thinking on by default; supports the full low/medium/high/xhigh/max effort range. New tokenizer (~30% more tokens for the same text vs Sonnet 4.6).
|
|
1620
|
+
readonly description: "The best combination of speed and intelligence in the Sonnet tier, with near-Opus quality on coding and agentic work. Adaptive thinking on by default; supports the full low/medium/high/xhigh/max effort range. New tokenizer (~30% more tokens for the same text vs Sonnet 4.6). The $2/$10 per MTok launch rate is now the standard price — the increase to $3/$15 scheduled for 2026-09-01 was cancelled. 1M context window, 128K max output.";
|
|
1498
1621
|
readonly maxInputTokens: 1000000;
|
|
1499
1622
|
readonly maxOutputTokens: 128000;
|
|
1500
|
-
readonly inputTokenCost:
|
|
1501
|
-
readonly cachedInputTokenCost: 0.
|
|
1502
|
-
readonly cacheCreationInputTokenCost:
|
|
1503
|
-
readonly outputTokenCost:
|
|
1623
|
+
readonly inputTokenCost: 2;
|
|
1624
|
+
readonly cachedInputTokenCost: 0.2;
|
|
1625
|
+
readonly cacheCreationInputTokenCost: 2.5;
|
|
1626
|
+
readonly outputTokenCost: 10;
|
|
1627
|
+
readonly outputTokensPerSecond: 71;
|
|
1504
1628
|
readonly reasoning: {
|
|
1505
1629
|
readonly thinkingStyle: "adaptive";
|
|
1506
1630
|
readonly levels: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
@@ -1805,6 +1929,13 @@ export declare function getModel(modelName: ModelName, requestData?: ModelDataBl
|
|
|
1805
1929
|
* matching entry comes first and can silently pick the wrong provider.
|
|
1806
1930
|
*/
|
|
1807
1931
|
export declare function getModelForProvider(provider: string, modelName: ModelName, requestData?: ModelDataBlob): ModelType | undefined;
|
|
1932
|
+
/**
|
|
1933
|
+
* Like `getModelForProvider`, but when the exact provider key misses and the
|
|
1934
|
+
* provider is a known API variant (e.g. "openai-responses"), retries under
|
|
1935
|
+
* its catalog family ("openai"). The exact match always wins so
|
|
1936
|
+
* variant-exclusive entries (o3-pro etc.) keep their own data.
|
|
1937
|
+
*/
|
|
1938
|
+
export declare function resolveModelForProvider(provider: string, modelName: ModelName, requestData?: ModelDataBlob): ModelType | undefined;
|
|
1808
1939
|
/**
|
|
1809
1940
|
* Whether a model is known to accept the given input modality ("image", "pdf", …).
|
|
1810
1941
|
* Returns undefined when the model is unknown or carries no `modalities` data —
|
package/dist/models.js
CHANGED
|
@@ -812,16 +812,17 @@ export const textModels = [
|
|
|
812
812
|
{
|
|
813
813
|
type: "text",
|
|
814
814
|
modelName: "gpt-5.6-sol",
|
|
815
|
-
description: "GPT-5.6 Sol is the flagship model of the GPT-5.6 family for the most complex coding and agentic tasks. 1M context window. Standard pricing for ≤272K tokens, 2x input/1.5x output for >272K. Knowledge cutoff: February 2026.",
|
|
815
|
+
description: "GPT-5.6 Sol is the flagship model of the GPT-5.6 family for the most complex coding and agentic tasks. 1M context window. Standard pricing for ≤272K tokens, 2x input/1.5x output for >272K. Reflects the August 21, 2026 promotional price cut (input $5→$4, output $30→$20), which runs through at least November 21, 2026. Knowledge cutoff: February 2026.",
|
|
816
816
|
maxInputTokens: 1050000,
|
|
817
817
|
maxOutputTokens: 128000,
|
|
818
|
-
inputTokenCost:
|
|
819
|
-
cachedInputTokenCost: 0.
|
|
820
|
-
outputTokenCost:
|
|
818
|
+
inputTokenCost: 4,
|
|
819
|
+
cachedInputTokenCost: 0.4,
|
|
820
|
+
outputTokenCost: 20,
|
|
821
|
+
outputTokensPerSecond: 71,
|
|
821
822
|
longContext: {
|
|
822
|
-
inputTokenCost:
|
|
823
|
-
cachedInputTokenCost:
|
|
824
|
-
outputTokenCost:
|
|
823
|
+
inputTokenCost: 8,
|
|
824
|
+
cachedInputTokenCost: 0.8,
|
|
825
|
+
outputTokenCost: 30,
|
|
825
826
|
thresholdTokens: 200000,
|
|
826
827
|
},
|
|
827
828
|
reasoning: {
|
|
@@ -853,6 +854,7 @@ export const textModels = [
|
|
|
853
854
|
inputTokenCost: 2,
|
|
854
855
|
cachedInputTokenCost: 0.2,
|
|
855
856
|
outputTokenCost: 12,
|
|
857
|
+
outputTokensPerSecond: 98,
|
|
856
858
|
longContext: {
|
|
857
859
|
inputTokenCost: 4,
|
|
858
860
|
cachedInputTokenCost: 0.4,
|
|
@@ -888,6 +890,7 @@ export const textModels = [
|
|
|
888
890
|
inputTokenCost: 0.2,
|
|
889
891
|
cachedInputTokenCost: 0.02,
|
|
890
892
|
outputTokenCost: 1.2,
|
|
893
|
+
outputTokensPerSecond: 116,
|
|
891
894
|
longContext: {
|
|
892
895
|
inputTokenCost: 0.4,
|
|
893
896
|
cachedInputTokenCost: 0.04,
|
|
@@ -979,15 +982,77 @@ export const textModels = [
|
|
|
979
982
|
disabled: true,
|
|
980
983
|
provider: "google",
|
|
981
984
|
},
|
|
985
|
+
{
|
|
986
|
+
type: "text",
|
|
987
|
+
modelName: "gemini-3.8-flash",
|
|
988
|
+
description: "Google's most intelligent Flash model (GA September 2, 2026), built on Gemini 3.7 Flash and engineered for long-horizon software engineering, autonomous agents, and complex enterprise workflows. 1M context window, 64K output. Introductory pricing $0.75 input / $3.75 output per 1M through December 31, 2026 ($1.50 / $7.50 thereafter). Thinking levels low/medium/high — `minimal` returns an error.",
|
|
989
|
+
maxInputTokens: 1048576,
|
|
990
|
+
maxOutputTokens: 65536,
|
|
991
|
+
inputTokenCost: 0.75,
|
|
992
|
+
cachedInputTokenCost: 0.075,
|
|
993
|
+
outputTokenCost: 3.75,
|
|
994
|
+
outputTokensPerSecond: 312,
|
|
995
|
+
inputAudioTokenCost: 1.5,
|
|
996
|
+
reasoning: {
|
|
997
|
+
levels: ["low", "medium", "high"],
|
|
998
|
+
defaultLevel: "medium",
|
|
999
|
+
canDisable: false,
|
|
1000
|
+
outputsThinking: true,
|
|
1001
|
+
outputsSignatures: true,
|
|
1002
|
+
},
|
|
1003
|
+
modalities: {
|
|
1004
|
+
input: ["text", "image", "video", "audio", "pdf"],
|
|
1005
|
+
output: ["text"],
|
|
1006
|
+
},
|
|
1007
|
+
knowledge: "2026-03",
|
|
1008
|
+
releaseDate: "2026-09-02",
|
|
1009
|
+
lastUpdated: "2026-09-02",
|
|
1010
|
+
family: "gemini-flash",
|
|
1011
|
+
openWeights: false,
|
|
1012
|
+
structuredOutput: true,
|
|
1013
|
+
temperatureSupported: true,
|
|
1014
|
+
provider: "google",
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
type: "text",
|
|
1018
|
+
modelName: "gemini-3.7-flash",
|
|
1019
|
+
description: "Gemini 3.7 Flash (GA August 13, 2026) for complex coding, agentic workflows, and reliable multi-step execution. Superseded by gemini-3.8-flash but fully supported. 1M context window, 64K output. Introductory pricing $0.75 input / $3.75 output per 1M through December 31, 2026 ($1.50 / $7.50 thereafter). Thinking levels low/medium/high — `minimal` returns an error.",
|
|
1020
|
+
maxInputTokens: 1048576,
|
|
1021
|
+
maxOutputTokens: 65536,
|
|
1022
|
+
inputTokenCost: 0.75,
|
|
1023
|
+
cachedInputTokenCost: 0.075,
|
|
1024
|
+
outputTokenCost: 3.75,
|
|
1025
|
+
outputTokensPerSecond: 272,
|
|
1026
|
+
inputAudioTokenCost: 1.5,
|
|
1027
|
+
reasoning: {
|
|
1028
|
+
levels: ["low", "medium", "high"],
|
|
1029
|
+
defaultLevel: "medium",
|
|
1030
|
+
canDisable: false,
|
|
1031
|
+
outputsThinking: true,
|
|
1032
|
+
outputsSignatures: true,
|
|
1033
|
+
},
|
|
1034
|
+
modalities: {
|
|
1035
|
+
input: ["text", "image", "video", "audio", "pdf"],
|
|
1036
|
+
output: ["text"],
|
|
1037
|
+
},
|
|
1038
|
+
knowledge: "2026-03",
|
|
1039
|
+
releaseDate: "2026-08-13",
|
|
1040
|
+
lastUpdated: "2026-08-13",
|
|
1041
|
+
family: "gemini-flash",
|
|
1042
|
+
openWeights: false,
|
|
1043
|
+
structuredOutput: true,
|
|
1044
|
+
temperatureSupported: true,
|
|
1045
|
+
provider: "google",
|
|
1046
|
+
},
|
|
982
1047
|
{
|
|
983
1048
|
type: "text",
|
|
984
1049
|
modelName: "gemini-3.6-flash",
|
|
985
|
-
description: "
|
|
1050
|
+
description: "Gemini 3.6 Flash (GA July 21, 2026), balancing speed and multimodal capabilities across general agentic and everyday tasks. Superseded by gemini-3.7-flash / gemini-3.8-flash. 1M context window, 64K output. Introductory pricing $0.75 input / $3.75 output per 1M through December 31, 2026 ($1.50 / $7.50 thereafter). Context caching: $0.075/1M read.",
|
|
986
1051
|
maxInputTokens: 1048576,
|
|
987
1052
|
maxOutputTokens: 65536,
|
|
988
|
-
inputTokenCost:
|
|
989
|
-
cachedInputTokenCost: 0.
|
|
990
|
-
outputTokenCost:
|
|
1053
|
+
inputTokenCost: 0.75,
|
|
1054
|
+
cachedInputTokenCost: 0.075,
|
|
1055
|
+
outputTokenCost: 3.75,
|
|
991
1056
|
inputAudioTokenCost: 1.5,
|
|
992
1057
|
reasoning: {
|
|
993
1058
|
levels: ["minimal", "low", "medium", "high"],
|
|
@@ -1079,6 +1144,7 @@ export const textModels = [
|
|
|
1079
1144
|
inputTokenCost: 0.3,
|
|
1080
1145
|
cachedInputTokenCost: 0.03,
|
|
1081
1146
|
outputTokenCost: 2.5,
|
|
1147
|
+
outputTokensPerSecond: 347,
|
|
1082
1148
|
inputAudioTokenCost: 0.5,
|
|
1083
1149
|
reasoning: {
|
|
1084
1150
|
levels: ["minimal", "low", "medium", "high"],
|
|
@@ -1347,16 +1413,77 @@ export const textModels = [
|
|
|
1347
1413
|
disabled: true,
|
|
1348
1414
|
provider: "google",
|
|
1349
1415
|
},
|
|
1416
|
+
{
|
|
1417
|
+
type: "text",
|
|
1418
|
+
modelName: "claude-fable-5-1",
|
|
1419
|
+
description: "Anthropic's most capable widely released model, for the most demanding reasoning and long-horizon agentic work. Successor to claude-fable-5 in the same tier at the same per-token price, but cache reads are 0.025x base input ($0.25/MTok) rather than the standard 0.1x. Thinking is always on (cannot be disabled); the raw chain of thought is never returned. Forced tool use (tool_choice any/tool) returns a 400. Requires 30-day data retention (not available under zero data retention). 1M context window, 128K max output.",
|
|
1420
|
+
maxInputTokens: 1000000,
|
|
1421
|
+
maxOutputTokens: 128000,
|
|
1422
|
+
inputTokenCost: 10,
|
|
1423
|
+
cachedInputTokenCost: 0.25,
|
|
1424
|
+
cacheCreationInputTokenCost: 12.5,
|
|
1425
|
+
outputTokenCost: 50,
|
|
1426
|
+
reasoning: {
|
|
1427
|
+
thinkingStyle: "adaptive",
|
|
1428
|
+
levels: ["low", "medium", "high", "xhigh", "max"],
|
|
1429
|
+
defaultLevel: "high",
|
|
1430
|
+
canDisable: false,
|
|
1431
|
+
outputsThinking: true,
|
|
1432
|
+
outputsSignatures: true,
|
|
1433
|
+
},
|
|
1434
|
+
modalities: {
|
|
1435
|
+
input: ["text", "image", "pdf"],
|
|
1436
|
+
output: ["text"],
|
|
1437
|
+
},
|
|
1438
|
+
knowledge: "2026-06",
|
|
1439
|
+
releaseDate: "2026-09-01",
|
|
1440
|
+
lastUpdated: "2026-09-01",
|
|
1441
|
+
family: "claude-fable",
|
|
1442
|
+
openWeights: false,
|
|
1443
|
+
temperatureSupported: false,
|
|
1444
|
+
provider: "anthropic",
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
type: "text",
|
|
1448
|
+
modelName: "claude-opus-5",
|
|
1449
|
+
description: "Opus-tier model above Opus 4.8, strongest on deep reasoning, agentic and long-horizon work, at half the cost of claude-fable-5-1. Thinking is on by default; it can be disabled only at effort `high` or below (xhigh/max return a 400). 1M context window, 128K max output.",
|
|
1450
|
+
maxInputTokens: 1000000,
|
|
1451
|
+
maxOutputTokens: 128000,
|
|
1452
|
+
inputTokenCost: 5,
|
|
1453
|
+
cachedInputTokenCost: 0.5,
|
|
1454
|
+
cacheCreationInputTokenCost: 6.25,
|
|
1455
|
+
outputTokenCost: 25,
|
|
1456
|
+
reasoning: {
|
|
1457
|
+
thinkingStyle: "adaptive",
|
|
1458
|
+
levels: ["low", "medium", "high", "xhigh", "max"],
|
|
1459
|
+
defaultLevel: "high",
|
|
1460
|
+
canDisable: true,
|
|
1461
|
+
outputsThinking: true,
|
|
1462
|
+
outputsSignatures: true,
|
|
1463
|
+
},
|
|
1464
|
+
modalities: {
|
|
1465
|
+
input: ["text", "image", "pdf"],
|
|
1466
|
+
output: ["text"],
|
|
1467
|
+
},
|
|
1468
|
+
knowledge: "2026-05",
|
|
1469
|
+
releaseDate: "2026-07-24",
|
|
1470
|
+
lastUpdated: "2026-07-24",
|
|
1471
|
+
family: "claude-opus",
|
|
1472
|
+
openWeights: false,
|
|
1473
|
+
temperatureSupported: false,
|
|
1474
|
+
provider: "anthropic",
|
|
1475
|
+
},
|
|
1350
1476
|
{
|
|
1351
1477
|
type: "text",
|
|
1352
1478
|
modelName: "claude-fable-5",
|
|
1353
|
-
description: "
|
|
1479
|
+
description: "Previous-generation Fable model, superseded by claude-fable-5-1 at the same per-token price (5.1 also cuts cache reads to $0.25/MTok). Thinking is always on (cannot be disabled); the raw chain of thought is never returned. Requires 30-day data retention (not available under zero data retention). 1M context window, 128K max output.",
|
|
1354
1480
|
maxInputTokens: 1000000,
|
|
1355
1481
|
maxOutputTokens: 128000,
|
|
1356
1482
|
inputTokenCost: 10,
|
|
1357
1483
|
cachedInputTokenCost: 1,
|
|
1358
1484
|
cacheCreationInputTokenCost: 12.5,
|
|
1359
1485
|
outputTokenCost: 50,
|
|
1486
|
+
outputTokensPerSecond: 65,
|
|
1360
1487
|
reasoning: {
|
|
1361
1488
|
thinkingStyle: "adaptive",
|
|
1362
1489
|
levels: ["low", "medium", "high", "xhigh", "max"],
|
|
@@ -1465,13 +1592,14 @@ export const textModels = [
|
|
|
1465
1592
|
{
|
|
1466
1593
|
type: "text",
|
|
1467
1594
|
modelName: "claude-sonnet-5",
|
|
1468
|
-
description: "The best combination of speed and intelligence in the Sonnet tier, with near-Opus quality on coding and agentic work. Adaptive thinking on by default; supports the full low/medium/high/xhigh/max effort range. New tokenizer (~30% more tokens for the same text vs Sonnet 4.6).
|
|
1595
|
+
description: "The best combination of speed and intelligence in the Sonnet tier, with near-Opus quality on coding and agentic work. Adaptive thinking on by default; supports the full low/medium/high/xhigh/max effort range. New tokenizer (~30% more tokens for the same text vs Sonnet 4.6). The $2/$10 per MTok launch rate is now the standard price — the increase to $3/$15 scheduled for 2026-09-01 was cancelled. 1M context window, 128K max output.",
|
|
1469
1596
|
maxInputTokens: 1000000,
|
|
1470
1597
|
maxOutputTokens: 128000,
|
|
1471
|
-
inputTokenCost:
|
|
1472
|
-
cachedInputTokenCost: 0.
|
|
1473
|
-
cacheCreationInputTokenCost:
|
|
1474
|
-
outputTokenCost:
|
|
1598
|
+
inputTokenCost: 2,
|
|
1599
|
+
cachedInputTokenCost: 0.2,
|
|
1600
|
+
cacheCreationInputTokenCost: 2.5,
|
|
1601
|
+
outputTokenCost: 10,
|
|
1602
|
+
outputTokensPerSecond: 71,
|
|
1475
1603
|
reasoning: {
|
|
1476
1604
|
thinkingStyle: "adaptive",
|
|
1477
1605
|
levels: ["low", "medium", "high", "xhigh", "max"],
|
|
@@ -1884,7 +2012,7 @@ export const hostedTools = [
|
|
|
1884
2012
|
category: "maps_grounding",
|
|
1885
2013
|
description: "Grounding with Google Maps (Gemini 3 only).",
|
|
1886
2014
|
providerToolId: "google_maps",
|
|
1887
|
-
models: ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-3.5-flash", "gemini-3.6-flash", "gemini-3.1-flash-lite", "gemini-3.5-flash-lite"],
|
|
2015
|
+
models: ["gemini-3-pro-preview", "gemini-3.1-pro-preview", "gemini-3-flash-preview", "gemini-3.5-flash", "gemini-3.6-flash", "gemini-3.7-flash", "gemini-3.8-flash", "gemini-3.1-flash-lite", "gemini-3.5-flash-lite"],
|
|
1888
2016
|
pricing: { unit: "per_call", note: "Gemini 3 family only; see Google pricing." },
|
|
1889
2017
|
},
|
|
1890
2018
|
{
|
|
@@ -1954,6 +2082,35 @@ export function getModel(modelName, requestData) {
|
|
|
1954
2082
|
export function getModelForProvider(provider, modelName, requestData) {
|
|
1955
2083
|
return getAllModels(requestData).find((model) => model.modelName === modelName && model.provider === provider);
|
|
1956
2084
|
}
|
|
2085
|
+
/**
|
|
2086
|
+
* API-variant provider names mapped to the catalog family whose entries they
|
|
2087
|
+
* share. "openai-responses" is the same vendor with the same pricing and
|
|
2088
|
+
* modalities as "openai" — only Responses-exclusive models are cataloged
|
|
2089
|
+
* under "openai-responses" itself. Unrelated providers (gateways like
|
|
2090
|
+
* "openrouter"/"openai-compat", custom registrations) are deliberately NOT
|
|
2091
|
+
* aliased: a same-named model under another provider must not lend its
|
|
2092
|
+
* pricing or capabilities across providers.
|
|
2093
|
+
*/
|
|
2094
|
+
const PROVIDER_FAMILY_ALIAS = {
|
|
2095
|
+
"openai-responses": "openai",
|
|
2096
|
+
};
|
|
2097
|
+
/**
|
|
2098
|
+
* Like `getModelForProvider`, but when the exact provider key misses and the
|
|
2099
|
+
* provider is a known API variant (e.g. "openai-responses"), retries under
|
|
2100
|
+
* its catalog family ("openai"). The exact match always wins so
|
|
2101
|
+
* variant-exclusive entries (o3-pro etc.) keep their own data.
|
|
2102
|
+
*/
|
|
2103
|
+
export function resolveModelForProvider(provider, modelName, requestData) {
|
|
2104
|
+
const exact = getModelForProvider(provider, modelName, requestData);
|
|
2105
|
+
if (exact) {
|
|
2106
|
+
return exact;
|
|
2107
|
+
}
|
|
2108
|
+
const family = PROVIDER_FAMILY_ALIAS[provider];
|
|
2109
|
+
if (family === undefined) {
|
|
2110
|
+
return undefined;
|
|
2111
|
+
}
|
|
2112
|
+
return getModelForProvider(family, modelName, requestData);
|
|
2113
|
+
}
|
|
1957
2114
|
/**
|
|
1958
2115
|
* Whether a model is known to accept the given input modality ("image", "pdf", …).
|
|
1959
2116
|
* Returns undefined when the model is unknown or carries no `modalities` data —
|
|
@@ -1962,7 +2119,7 @@ export function getModelForProvider(provider, modelName, requestData) {
|
|
|
1962
2119
|
export function modelSupportsInputModality(modelName, modality, requestData, provider) {
|
|
1963
2120
|
let model;
|
|
1964
2121
|
if (provider !== undefined) {
|
|
1965
|
-
model =
|
|
2122
|
+
model = resolveModelForProvider(provider, modelName, requestData);
|
|
1966
2123
|
}
|
|
1967
2124
|
else {
|
|
1968
2125
|
model = getModel(modelName, requestData);
|