@roo-code/types 1.88.0 → 1.90.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.
- package/dist/index.cjs +358 -147
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5268 -1395
- package/dist/index.d.ts +5268 -1395
- package/dist/index.js +348 -144
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -75,6 +75,7 @@ var clineSays = [
|
|
|
75
75
|
"diff_error",
|
|
76
76
|
"condense_context",
|
|
77
77
|
"condense_context_error",
|
|
78
|
+
"sliding_window_truncation",
|
|
78
79
|
"codebase_search_result",
|
|
79
80
|
"user_edit_todos"
|
|
80
81
|
];
|
|
@@ -87,7 +88,14 @@ var contextCondenseSchema = z.object({
|
|
|
87
88
|
cost: z.number(),
|
|
88
89
|
prevContextTokens: z.number(),
|
|
89
90
|
newContextTokens: z.number(),
|
|
90
|
-
summary: z.string()
|
|
91
|
+
summary: z.string(),
|
|
92
|
+
condenseId: z.string().optional()
|
|
93
|
+
});
|
|
94
|
+
var contextTruncationSchema = z.object({
|
|
95
|
+
truncationId: z.string(),
|
|
96
|
+
messagesRemoved: z.number(),
|
|
97
|
+
prevContextTokens: z.number(),
|
|
98
|
+
newContextTokens: z.number()
|
|
91
99
|
});
|
|
92
100
|
var clineMessageSchema = z.object({
|
|
93
101
|
ts: z.number(),
|
|
@@ -101,7 +109,16 @@ var clineMessageSchema = z.object({
|
|
|
101
109
|
conversationHistoryIndex: z.number().optional(),
|
|
102
110
|
checkpoint: z.record(z.string(), z.unknown()).optional(),
|
|
103
111
|
progressStatus: toolProgressStatusSchema.optional(),
|
|
112
|
+
/**
|
|
113
|
+
* Data for successful context condensation.
|
|
114
|
+
* Present when `say: "condense_context"` and `partial: false`.
|
|
115
|
+
*/
|
|
104
116
|
contextCondense: contextCondenseSchema.optional(),
|
|
117
|
+
/**
|
|
118
|
+
* Data for sliding window truncation.
|
|
119
|
+
* Present when `say: "sliding_window_truncation"`.
|
|
120
|
+
*/
|
|
121
|
+
contextTruncation: contextTruncationSchema.optional(),
|
|
105
122
|
isProtected: z.boolean().optional(),
|
|
106
123
|
apiProtocol: z.union([z.literal("openai"), z.literal("anthropic")]).optional(),
|
|
107
124
|
isAnswered: z.boolean().optional()
|
|
@@ -130,8 +147,8 @@ var toolNames = [
|
|
|
130
147
|
"read_file",
|
|
131
148
|
"write_to_file",
|
|
132
149
|
"apply_diff",
|
|
133
|
-
"insert_content",
|
|
134
150
|
"search_and_replace",
|
|
151
|
+
"search_replace",
|
|
135
152
|
"apply_patch",
|
|
136
153
|
"search_files",
|
|
137
154
|
"list_files",
|
|
@@ -250,7 +267,7 @@ var rooCodeEventsSchema = z3.object({
|
|
|
250
267
|
["taskAskResponded" /* TaskAskResponded */]: z3.tuple([z3.string()]),
|
|
251
268
|
["taskUserMessage" /* TaskUserMessage */]: z3.tuple([z3.string()]),
|
|
252
269
|
["taskToolFailed" /* TaskToolFailed */]: z3.tuple([z3.string(), toolNamesSchema, z3.string()]),
|
|
253
|
-
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z3.tuple([z3.string(), tokenUsageSchema]),
|
|
270
|
+
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z3.tuple([z3.string(), tokenUsageSchema, toolUsageSchema]),
|
|
254
271
|
["modeChanged" /* ModeChanged */]: z3.tuple([z3.string()]),
|
|
255
272
|
["providerProfileChanged" /* ProviderProfileChanged */]: z3.tuple([z3.object({ name: z3.string(), provider: z3.string() })])
|
|
256
273
|
});
|
|
@@ -404,9 +421,9 @@ import { z as z5 } from "zod";
|
|
|
404
421
|
var reasoningEfforts = ["low", "medium", "high"];
|
|
405
422
|
var reasoningEffortsSchema = z5.enum(reasoningEfforts);
|
|
406
423
|
var reasoningEffortWithMinimalSchema = z5.union([reasoningEffortsSchema, z5.literal("minimal")]);
|
|
407
|
-
var reasoningEffortsExtended = ["none", "minimal", "low", "medium", "high"];
|
|
424
|
+
var reasoningEffortsExtended = ["none", "minimal", "low", "medium", "high", "xhigh"];
|
|
408
425
|
var reasoningEffortExtendedSchema = z5.enum(reasoningEffortsExtended);
|
|
409
|
-
var reasoningEffortSettingValues = ["disable", "none", "minimal", "low", "medium", "high"];
|
|
426
|
+
var reasoningEffortSettingValues = ["disable", "none", "minimal", "low", "medium", "high", "xhigh"];
|
|
410
427
|
var reasoningEffortSettingSchema = z5.enum(reasoningEffortSettingValues);
|
|
411
428
|
var verbosityLevels = ["low", "medium", "high"];
|
|
412
429
|
var verbosityLevelsSchema = z5.enum(verbosityLevels);
|
|
@@ -434,7 +451,7 @@ var modelInfoSchema = z5.object({
|
|
|
434
451
|
supportsTemperature: z5.boolean().optional(),
|
|
435
452
|
defaultTemperature: z5.number().optional(),
|
|
436
453
|
requiredReasoningBudget: z5.boolean().optional(),
|
|
437
|
-
supportsReasoningEffort: z5.union([z5.boolean(), z5.array(z5.enum(["disable", "none", "minimal", "low", "medium", "high"]))]).optional(),
|
|
454
|
+
supportsReasoningEffort: z5.union([z5.boolean(), z5.array(z5.enum(["disable", "none", "minimal", "low", "medium", "high", "xhigh"]))]).optional(),
|
|
438
455
|
requiredReasoningEffort: z5.boolean().optional(),
|
|
439
456
|
preserveReasoning: z5.boolean().optional(),
|
|
440
457
|
supportedParameters: z5.array(modelParametersSchema).optional(),
|
|
@@ -450,6 +467,8 @@ var modelInfoSchema = z5.object({
|
|
|
450
467
|
cachableFields: z5.array(z5.string()).optional(),
|
|
451
468
|
// Flag to indicate if the model is deprecated and should not be used
|
|
452
469
|
deprecated: z5.boolean().optional(),
|
|
470
|
+
// Flag to indicate if the model should hide vendor/company identity in responses
|
|
471
|
+
isStealthModel: z5.boolean().optional(),
|
|
453
472
|
// Flag to indicate if the model is free (no cost)
|
|
454
473
|
isFree: z5.boolean().optional(),
|
|
455
474
|
// Flag to indicate if the model supports native tool calling (OpenAI-style function calling)
|
|
@@ -516,7 +535,9 @@ var codebaseIndexConfigSchema = z6.object({
|
|
|
516
535
|
codebaseIndexOpenAiCompatibleModelDimension: z6.number().optional(),
|
|
517
536
|
// Bedrock specific fields
|
|
518
537
|
codebaseIndexBedrockRegion: z6.string().optional(),
|
|
519
|
-
codebaseIndexBedrockProfile: z6.string().optional()
|
|
538
|
+
codebaseIndexBedrockProfile: z6.string().optional(),
|
|
539
|
+
// OpenRouter specific fields
|
|
540
|
+
codebaseIndexOpenRouterSpecificProvider: z6.string().optional()
|
|
520
541
|
});
|
|
521
542
|
var codebaseIndexModelsSchema = z6.object({
|
|
522
543
|
openai: z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
|
|
@@ -761,7 +782,7 @@ var ANTHROPIC_DEFAULT_MAX_TOKENS = 8192;
|
|
|
761
782
|
// src/providers/baseten.ts
|
|
762
783
|
var basetenModels = {
|
|
763
784
|
"moonshotai/Kimi-K2-Thinking": {
|
|
764
|
-
maxTokens:
|
|
785
|
+
maxTokens: 16384,
|
|
765
786
|
contextWindow: 262e3,
|
|
766
787
|
supportsImages: false,
|
|
767
788
|
supportsPromptCache: false,
|
|
@@ -773,7 +794,7 @@ var basetenModels = {
|
|
|
773
794
|
description: "Kimi K2 Thinking - A model with enhanced reasoning capabilities from Kimi K2"
|
|
774
795
|
},
|
|
775
796
|
"zai-org/GLM-4.6": {
|
|
776
|
-
maxTokens:
|
|
797
|
+
maxTokens: 16384,
|
|
777
798
|
contextWindow: 2e5,
|
|
778
799
|
supportsImages: false,
|
|
779
800
|
supportsPromptCache: false,
|
|
@@ -785,7 +806,7 @@ var basetenModels = {
|
|
|
785
806
|
description: "Frontier open model with advanced agentic, reasoning and coding capabilities"
|
|
786
807
|
},
|
|
787
808
|
"deepseek-ai/DeepSeek-R1": {
|
|
788
|
-
maxTokens:
|
|
809
|
+
maxTokens: 16384,
|
|
789
810
|
contextWindow: 163840,
|
|
790
811
|
supportsImages: false,
|
|
791
812
|
supportsPromptCache: false,
|
|
@@ -796,7 +817,7 @@ var basetenModels = {
|
|
|
796
817
|
description: "DeepSeek's first-generation reasoning model"
|
|
797
818
|
},
|
|
798
819
|
"deepseek-ai/DeepSeek-R1-0528": {
|
|
799
|
-
maxTokens:
|
|
820
|
+
maxTokens: 16384,
|
|
800
821
|
contextWindow: 163840,
|
|
801
822
|
supportsImages: false,
|
|
802
823
|
supportsPromptCache: false,
|
|
@@ -807,7 +828,7 @@ var basetenModels = {
|
|
|
807
828
|
description: "The latest revision of DeepSeek's first-generation reasoning model"
|
|
808
829
|
},
|
|
809
830
|
"deepseek-ai/DeepSeek-V3-0324": {
|
|
810
|
-
maxTokens:
|
|
831
|
+
maxTokens: 16384,
|
|
811
832
|
contextWindow: 163840,
|
|
812
833
|
supportsImages: false,
|
|
813
834
|
supportsPromptCache: false,
|
|
@@ -818,7 +839,7 @@ var basetenModels = {
|
|
|
818
839
|
description: "Fast general-purpose LLM with enhanced reasoning capabilities"
|
|
819
840
|
},
|
|
820
841
|
"deepseek-ai/DeepSeek-V3.1": {
|
|
821
|
-
maxTokens:
|
|
842
|
+
maxTokens: 16384,
|
|
822
843
|
contextWindow: 163840,
|
|
823
844
|
supportsImages: false,
|
|
824
845
|
supportsPromptCache: false,
|
|
@@ -828,8 +849,20 @@ var basetenModels = {
|
|
|
828
849
|
cacheReadsPrice: 0,
|
|
829
850
|
description: "Extremely capable general-purpose LLM with hybrid reasoning capabilities and advanced tool calling"
|
|
830
851
|
},
|
|
852
|
+
"deepseek-ai/DeepSeek-V3.2": {
|
|
853
|
+
maxTokens: 16384,
|
|
854
|
+
contextWindow: 163840,
|
|
855
|
+
supportsImages: false,
|
|
856
|
+
supportsPromptCache: false,
|
|
857
|
+
supportsNativeTools: true,
|
|
858
|
+
inputPrice: 0.3,
|
|
859
|
+
outputPrice: 0.45,
|
|
860
|
+
cacheWritesPrice: 0,
|
|
861
|
+
cacheReadsPrice: 0,
|
|
862
|
+
description: "DeepSeek's hybrid reasoning model with efficient long context scaling with GPT-5 level performance"
|
|
863
|
+
},
|
|
831
864
|
"Qwen/Qwen3-235B-A22B-Instruct-2507": {
|
|
832
|
-
maxTokens:
|
|
865
|
+
maxTokens: 16384,
|
|
833
866
|
contextWindow: 262144,
|
|
834
867
|
supportsImages: false,
|
|
835
868
|
supportsPromptCache: false,
|
|
@@ -840,7 +873,7 @@ var basetenModels = {
|
|
|
840
873
|
description: "Mixture-of-experts LLM with math and reasoning capabilities"
|
|
841
874
|
},
|
|
842
875
|
"Qwen/Qwen3-Coder-480B-A35B-Instruct": {
|
|
843
|
-
maxTokens:
|
|
876
|
+
maxTokens: 16384,
|
|
844
877
|
contextWindow: 262144,
|
|
845
878
|
supportsImages: false,
|
|
846
879
|
supportsPromptCache: false,
|
|
@@ -851,7 +884,7 @@ var basetenModels = {
|
|
|
851
884
|
description: "Mixture-of-experts LLM with advanced coding and reasoning capabilities"
|
|
852
885
|
},
|
|
853
886
|
"openai/gpt-oss-120b": {
|
|
854
|
-
maxTokens:
|
|
887
|
+
maxTokens: 16384,
|
|
855
888
|
contextWindow: 128072,
|
|
856
889
|
supportsImages: false,
|
|
857
890
|
supportsPromptCache: false,
|
|
@@ -863,7 +896,7 @@ var basetenModels = {
|
|
|
863
896
|
description: "Extremely capable general-purpose LLM with strong, controllable reasoning capabilities"
|
|
864
897
|
},
|
|
865
898
|
"moonshotai/Kimi-K2-Instruct-0905": {
|
|
866
|
-
maxTokens:
|
|
899
|
+
maxTokens: 16384,
|
|
867
900
|
contextWindow: 262e3,
|
|
868
901
|
supportsImages: false,
|
|
869
902
|
supportsPromptCache: false,
|
|
@@ -887,6 +920,7 @@ var bedrockModels = {
|
|
|
887
920
|
supportsImages: true,
|
|
888
921
|
supportsPromptCache: true,
|
|
889
922
|
supportsReasoningBudget: true,
|
|
923
|
+
supportsNativeTools: true,
|
|
890
924
|
inputPrice: 3,
|
|
891
925
|
outputPrice: 15,
|
|
892
926
|
cacheWritesPrice: 3.75,
|
|
@@ -900,6 +934,7 @@ var bedrockModels = {
|
|
|
900
934
|
contextWindow: 3e5,
|
|
901
935
|
supportsImages: true,
|
|
902
936
|
supportsPromptCache: true,
|
|
937
|
+
supportsNativeTools: true,
|
|
903
938
|
inputPrice: 0.8,
|
|
904
939
|
outputPrice: 3.2,
|
|
905
940
|
cacheWritesPrice: 0.8,
|
|
@@ -915,6 +950,7 @@ var bedrockModels = {
|
|
|
915
950
|
contextWindow: 3e5,
|
|
916
951
|
supportsImages: true,
|
|
917
952
|
supportsPromptCache: false,
|
|
953
|
+
supportsNativeTools: true,
|
|
918
954
|
inputPrice: 1,
|
|
919
955
|
outputPrice: 4,
|
|
920
956
|
cacheWritesPrice: 1,
|
|
@@ -928,6 +964,7 @@ var bedrockModels = {
|
|
|
928
964
|
contextWindow: 3e5,
|
|
929
965
|
supportsImages: true,
|
|
930
966
|
supportsPromptCache: true,
|
|
967
|
+
supportsNativeTools: true,
|
|
931
968
|
inputPrice: 0.06,
|
|
932
969
|
outputPrice: 0.24,
|
|
933
970
|
cacheWritesPrice: 0.06,
|
|
@@ -943,6 +980,7 @@ var bedrockModels = {
|
|
|
943
980
|
contextWindow: 128e3,
|
|
944
981
|
supportsImages: false,
|
|
945
982
|
supportsPromptCache: true,
|
|
983
|
+
supportsNativeTools: true,
|
|
946
984
|
inputPrice: 0.035,
|
|
947
985
|
outputPrice: 0.14,
|
|
948
986
|
cacheWritesPrice: 0.035,
|
|
@@ -959,6 +997,7 @@ var bedrockModels = {
|
|
|
959
997
|
supportsImages: true,
|
|
960
998
|
supportsPromptCache: true,
|
|
961
999
|
supportsReasoningBudget: true,
|
|
1000
|
+
supportsNativeTools: true,
|
|
962
1001
|
inputPrice: 3,
|
|
963
1002
|
outputPrice: 15,
|
|
964
1003
|
cacheWritesPrice: 3.75,
|
|
@@ -973,6 +1012,7 @@ var bedrockModels = {
|
|
|
973
1012
|
supportsImages: true,
|
|
974
1013
|
supportsPromptCache: true,
|
|
975
1014
|
supportsReasoningBudget: true,
|
|
1015
|
+
supportsNativeTools: true,
|
|
976
1016
|
inputPrice: 15,
|
|
977
1017
|
outputPrice: 75,
|
|
978
1018
|
cacheWritesPrice: 18.75,
|
|
@@ -987,6 +1027,7 @@ var bedrockModels = {
|
|
|
987
1027
|
supportsImages: true,
|
|
988
1028
|
supportsPromptCache: true,
|
|
989
1029
|
supportsReasoningBudget: true,
|
|
1030
|
+
supportsNativeTools: true,
|
|
990
1031
|
inputPrice: 5,
|
|
991
1032
|
outputPrice: 25,
|
|
992
1033
|
cacheWritesPrice: 6.25,
|
|
@@ -1001,6 +1042,7 @@ var bedrockModels = {
|
|
|
1001
1042
|
supportsImages: true,
|
|
1002
1043
|
supportsPromptCache: true,
|
|
1003
1044
|
supportsReasoningBudget: true,
|
|
1045
|
+
supportsNativeTools: true,
|
|
1004
1046
|
inputPrice: 15,
|
|
1005
1047
|
outputPrice: 75,
|
|
1006
1048
|
cacheWritesPrice: 18.75,
|
|
@@ -1015,6 +1057,7 @@ var bedrockModels = {
|
|
|
1015
1057
|
supportsImages: true,
|
|
1016
1058
|
supportsPromptCache: true,
|
|
1017
1059
|
supportsReasoningBudget: true,
|
|
1060
|
+
supportsNativeTools: true,
|
|
1018
1061
|
inputPrice: 3,
|
|
1019
1062
|
outputPrice: 15,
|
|
1020
1063
|
cacheWritesPrice: 3.75,
|
|
@@ -1028,6 +1071,7 @@ var bedrockModels = {
|
|
|
1028
1071
|
contextWindow: 2e5,
|
|
1029
1072
|
supportsImages: true,
|
|
1030
1073
|
supportsPromptCache: true,
|
|
1074
|
+
supportsNativeTools: true,
|
|
1031
1075
|
inputPrice: 3,
|
|
1032
1076
|
outputPrice: 15,
|
|
1033
1077
|
cacheWritesPrice: 3.75,
|
|
@@ -1041,6 +1085,7 @@ var bedrockModels = {
|
|
|
1041
1085
|
contextWindow: 2e5,
|
|
1042
1086
|
supportsImages: false,
|
|
1043
1087
|
supportsPromptCache: true,
|
|
1088
|
+
supportsNativeTools: true,
|
|
1044
1089
|
inputPrice: 0.8,
|
|
1045
1090
|
outputPrice: 4,
|
|
1046
1091
|
cacheWritesPrice: 1,
|
|
@@ -1055,6 +1100,7 @@ var bedrockModels = {
|
|
|
1055
1100
|
supportsImages: true,
|
|
1056
1101
|
supportsPromptCache: true,
|
|
1057
1102
|
supportsReasoningBudget: true,
|
|
1103
|
+
supportsNativeTools: true,
|
|
1058
1104
|
inputPrice: 1,
|
|
1059
1105
|
outputPrice: 5,
|
|
1060
1106
|
cacheWritesPrice: 1.25,
|
|
@@ -1070,6 +1116,7 @@ var bedrockModels = {
|
|
|
1070
1116
|
contextWindow: 2e5,
|
|
1071
1117
|
supportsImages: true,
|
|
1072
1118
|
supportsPromptCache: false,
|
|
1119
|
+
supportsNativeTools: true,
|
|
1073
1120
|
inputPrice: 3,
|
|
1074
1121
|
outputPrice: 15
|
|
1075
1122
|
},
|
|
@@ -1078,6 +1125,7 @@ var bedrockModels = {
|
|
|
1078
1125
|
contextWindow: 2e5,
|
|
1079
1126
|
supportsImages: true,
|
|
1080
1127
|
supportsPromptCache: false,
|
|
1128
|
+
supportsNativeTools: true,
|
|
1081
1129
|
inputPrice: 15,
|
|
1082
1130
|
outputPrice: 75
|
|
1083
1131
|
},
|
|
@@ -1086,6 +1134,7 @@ var bedrockModels = {
|
|
|
1086
1134
|
contextWindow: 2e5,
|
|
1087
1135
|
supportsImages: true,
|
|
1088
1136
|
supportsPromptCache: false,
|
|
1137
|
+
supportsNativeTools: true,
|
|
1089
1138
|
inputPrice: 3,
|
|
1090
1139
|
outputPrice: 15
|
|
1091
1140
|
},
|
|
@@ -1094,6 +1143,7 @@ var bedrockModels = {
|
|
|
1094
1143
|
contextWindow: 2e5,
|
|
1095
1144
|
supportsImages: true,
|
|
1096
1145
|
supportsPromptCache: false,
|
|
1146
|
+
supportsNativeTools: true,
|
|
1097
1147
|
inputPrice: 0.25,
|
|
1098
1148
|
outputPrice: 1.25
|
|
1099
1149
|
},
|
|
@@ -1102,6 +1152,7 @@ var bedrockModels = {
|
|
|
1102
1152
|
contextWindow: 1e5,
|
|
1103
1153
|
supportsImages: false,
|
|
1104
1154
|
supportsPromptCache: false,
|
|
1155
|
+
supportsNativeTools: true,
|
|
1105
1156
|
inputPrice: 8,
|
|
1106
1157
|
outputPrice: 24,
|
|
1107
1158
|
description: "Claude 2.1"
|
|
@@ -1111,6 +1162,7 @@ var bedrockModels = {
|
|
|
1111
1162
|
contextWindow: 1e5,
|
|
1112
1163
|
supportsImages: false,
|
|
1113
1164
|
supportsPromptCache: false,
|
|
1165
|
+
supportsNativeTools: true,
|
|
1114
1166
|
inputPrice: 8,
|
|
1115
1167
|
outputPrice: 24,
|
|
1116
1168
|
description: "Claude 2.0"
|
|
@@ -1120,6 +1172,7 @@ var bedrockModels = {
|
|
|
1120
1172
|
contextWindow: 1e5,
|
|
1121
1173
|
supportsImages: false,
|
|
1122
1174
|
supportsPromptCache: false,
|
|
1175
|
+
supportsNativeTools: true,
|
|
1123
1176
|
inputPrice: 0.8,
|
|
1124
1177
|
outputPrice: 2.4,
|
|
1125
1178
|
description: "Claude Instant"
|
|
@@ -1129,6 +1182,7 @@ var bedrockModels = {
|
|
|
1129
1182
|
contextWindow: 128e3,
|
|
1130
1183
|
supportsImages: false,
|
|
1131
1184
|
supportsPromptCache: false,
|
|
1185
|
+
supportsNativeTools: true,
|
|
1132
1186
|
inputPrice: 1.35,
|
|
1133
1187
|
outputPrice: 5.4
|
|
1134
1188
|
},
|
|
@@ -1137,6 +1191,7 @@ var bedrockModels = {
|
|
|
1137
1191
|
contextWindow: 128e3,
|
|
1138
1192
|
supportsImages: false,
|
|
1139
1193
|
supportsPromptCache: false,
|
|
1194
|
+
supportsNativeTools: true,
|
|
1140
1195
|
inputPrice: 0.5,
|
|
1141
1196
|
outputPrice: 1.5,
|
|
1142
1197
|
description: "GPT-OSS 20B - Optimized for low latency and local/specialized use cases"
|
|
@@ -1146,6 +1201,7 @@ var bedrockModels = {
|
|
|
1146
1201
|
contextWindow: 128e3,
|
|
1147
1202
|
supportsImages: false,
|
|
1148
1203
|
supportsPromptCache: false,
|
|
1204
|
+
supportsNativeTools: true,
|
|
1149
1205
|
inputPrice: 2,
|
|
1150
1206
|
outputPrice: 6,
|
|
1151
1207
|
description: "GPT-OSS 120B - Production-ready, general-purpose, high-reasoning model"
|
|
@@ -1155,6 +1211,7 @@ var bedrockModels = {
|
|
|
1155
1211
|
contextWindow: 128e3,
|
|
1156
1212
|
supportsImages: false,
|
|
1157
1213
|
supportsPromptCache: false,
|
|
1214
|
+
supportsNativeTools: true,
|
|
1158
1215
|
inputPrice: 0.72,
|
|
1159
1216
|
outputPrice: 0.72,
|
|
1160
1217
|
description: "Llama 3.3 Instruct (70B)"
|
|
@@ -1164,6 +1221,7 @@ var bedrockModels = {
|
|
|
1164
1221
|
contextWindow: 128e3,
|
|
1165
1222
|
supportsImages: true,
|
|
1166
1223
|
supportsPromptCache: false,
|
|
1224
|
+
supportsNativeTools: true,
|
|
1167
1225
|
inputPrice: 0.72,
|
|
1168
1226
|
outputPrice: 0.72,
|
|
1169
1227
|
description: "Llama 3.2 Instruct (90B)"
|
|
@@ -1173,6 +1231,7 @@ var bedrockModels = {
|
|
|
1173
1231
|
contextWindow: 128e3,
|
|
1174
1232
|
supportsImages: true,
|
|
1175
1233
|
supportsPromptCache: false,
|
|
1234
|
+
supportsNativeTools: true,
|
|
1176
1235
|
inputPrice: 0.16,
|
|
1177
1236
|
outputPrice: 0.16,
|
|
1178
1237
|
description: "Llama 3.2 Instruct (11B)"
|
|
@@ -1182,6 +1241,7 @@ var bedrockModels = {
|
|
|
1182
1241
|
contextWindow: 128e3,
|
|
1183
1242
|
supportsImages: false,
|
|
1184
1243
|
supportsPromptCache: false,
|
|
1244
|
+
supportsNativeTools: true,
|
|
1185
1245
|
inputPrice: 0.15,
|
|
1186
1246
|
outputPrice: 0.15,
|
|
1187
1247
|
description: "Llama 3.2 Instruct (3B)"
|
|
@@ -1191,6 +1251,7 @@ var bedrockModels = {
|
|
|
1191
1251
|
contextWindow: 128e3,
|
|
1192
1252
|
supportsImages: false,
|
|
1193
1253
|
supportsPromptCache: false,
|
|
1254
|
+
supportsNativeTools: true,
|
|
1194
1255
|
inputPrice: 0.1,
|
|
1195
1256
|
outputPrice: 0.1,
|
|
1196
1257
|
description: "Llama 3.2 Instruct (1B)"
|
|
@@ -1200,6 +1261,7 @@ var bedrockModels = {
|
|
|
1200
1261
|
contextWindow: 128e3,
|
|
1201
1262
|
supportsImages: false,
|
|
1202
1263
|
supportsPromptCache: false,
|
|
1264
|
+
supportsNativeTools: true,
|
|
1203
1265
|
inputPrice: 2.4,
|
|
1204
1266
|
outputPrice: 2.4,
|
|
1205
1267
|
description: "Llama 3.1 Instruct (405B)"
|
|
@@ -1209,6 +1271,7 @@ var bedrockModels = {
|
|
|
1209
1271
|
contextWindow: 128e3,
|
|
1210
1272
|
supportsImages: false,
|
|
1211
1273
|
supportsPromptCache: false,
|
|
1274
|
+
supportsNativeTools: true,
|
|
1212
1275
|
inputPrice: 0.72,
|
|
1213
1276
|
outputPrice: 0.72,
|
|
1214
1277
|
description: "Llama 3.1 Instruct (70B)"
|
|
@@ -1218,6 +1281,7 @@ var bedrockModels = {
|
|
|
1218
1281
|
contextWindow: 128e3,
|
|
1219
1282
|
supportsImages: false,
|
|
1220
1283
|
supportsPromptCache: false,
|
|
1284
|
+
supportsNativeTools: true,
|
|
1221
1285
|
inputPrice: 0.9,
|
|
1222
1286
|
outputPrice: 0.9,
|
|
1223
1287
|
description: "Llama 3.1 Instruct (70B) (w/ latency optimized inference)"
|
|
@@ -1227,6 +1291,7 @@ var bedrockModels = {
|
|
|
1227
1291
|
contextWindow: 8e3,
|
|
1228
1292
|
supportsImages: false,
|
|
1229
1293
|
supportsPromptCache: false,
|
|
1294
|
+
supportsNativeTools: true,
|
|
1230
1295
|
inputPrice: 0.22,
|
|
1231
1296
|
outputPrice: 0.22,
|
|
1232
1297
|
description: "Llama 3.1 Instruct (8B)"
|
|
@@ -1236,6 +1301,7 @@ var bedrockModels = {
|
|
|
1236
1301
|
contextWindow: 8e3,
|
|
1237
1302
|
supportsImages: false,
|
|
1238
1303
|
supportsPromptCache: false,
|
|
1304
|
+
supportsNativeTools: true,
|
|
1239
1305
|
inputPrice: 2.65,
|
|
1240
1306
|
outputPrice: 3.5
|
|
1241
1307
|
},
|
|
@@ -1244,6 +1310,7 @@ var bedrockModels = {
|
|
|
1244
1310
|
contextWindow: 4e3,
|
|
1245
1311
|
supportsImages: false,
|
|
1246
1312
|
supportsPromptCache: false,
|
|
1313
|
+
supportsNativeTools: true,
|
|
1247
1314
|
inputPrice: 0.3,
|
|
1248
1315
|
outputPrice: 0.6
|
|
1249
1316
|
},
|
|
@@ -1252,6 +1319,7 @@ var bedrockModels = {
|
|
|
1252
1319
|
contextWindow: 8e3,
|
|
1253
1320
|
supportsImages: false,
|
|
1254
1321
|
supportsPromptCache: false,
|
|
1322
|
+
supportsNativeTools: true,
|
|
1255
1323
|
inputPrice: 0.15,
|
|
1256
1324
|
outputPrice: 0.2,
|
|
1257
1325
|
description: "Amazon Titan Text Lite"
|
|
@@ -1261,6 +1329,7 @@ var bedrockModels = {
|
|
|
1261
1329
|
contextWindow: 8e3,
|
|
1262
1330
|
supportsImages: false,
|
|
1263
1331
|
supportsPromptCache: false,
|
|
1332
|
+
supportsNativeTools: true,
|
|
1264
1333
|
inputPrice: 0.2,
|
|
1265
1334
|
outputPrice: 0.6,
|
|
1266
1335
|
description: "Amazon Titan Text Express"
|
|
@@ -1280,6 +1349,52 @@ var bedrockModels = {
|
|
|
1280
1349
|
supportsPromptCache: false,
|
|
1281
1350
|
inputPrice: 0.02,
|
|
1282
1351
|
description: "Amazon Titan Text Embeddings V2"
|
|
1352
|
+
},
|
|
1353
|
+
"moonshot.kimi-k2-thinking": {
|
|
1354
|
+
maxTokens: 32e3,
|
|
1355
|
+
contextWindow: 262144,
|
|
1356
|
+
supportsImages: false,
|
|
1357
|
+
supportsPromptCache: false,
|
|
1358
|
+
supportsNativeTools: true,
|
|
1359
|
+
defaultToolProtocol: "native",
|
|
1360
|
+
preserveReasoning: true,
|
|
1361
|
+
inputPrice: 0.6,
|
|
1362
|
+
outputPrice: 2.5,
|
|
1363
|
+
description: "Kimi K2 Thinking (1T parameter MoE model with 32B active parameters)"
|
|
1364
|
+
},
|
|
1365
|
+
"minimax.minimax-m2": {
|
|
1366
|
+
maxTokens: 16384,
|
|
1367
|
+
contextWindow: 196608,
|
|
1368
|
+
supportsImages: false,
|
|
1369
|
+
supportsPromptCache: false,
|
|
1370
|
+
supportsNativeTools: true,
|
|
1371
|
+
defaultToolProtocol: "native",
|
|
1372
|
+
preserveReasoning: true,
|
|
1373
|
+
inputPrice: 0.3,
|
|
1374
|
+
outputPrice: 1.2,
|
|
1375
|
+
description: "MiniMax M2 (230B parameter MoE model with 10B active parameters)"
|
|
1376
|
+
},
|
|
1377
|
+
"qwen.qwen3-next-80b-a3b": {
|
|
1378
|
+
maxTokens: 8192,
|
|
1379
|
+
contextWindow: 262144,
|
|
1380
|
+
supportsImages: false,
|
|
1381
|
+
supportsPromptCache: false,
|
|
1382
|
+
supportsNativeTools: true,
|
|
1383
|
+
defaultToolProtocol: "native",
|
|
1384
|
+
inputPrice: 0.15,
|
|
1385
|
+
outputPrice: 1.2,
|
|
1386
|
+
description: "Qwen3 Next 80B (MoE model with 3B active parameters)"
|
|
1387
|
+
},
|
|
1388
|
+
"qwen.qwen3-coder-480b-a35b-v1:0": {
|
|
1389
|
+
maxTokens: 8192,
|
|
1390
|
+
contextWindow: 262144,
|
|
1391
|
+
supportsImages: false,
|
|
1392
|
+
supportsPromptCache: false,
|
|
1393
|
+
supportsNativeTools: true,
|
|
1394
|
+
defaultToolProtocol: "native",
|
|
1395
|
+
inputPrice: 0.45,
|
|
1396
|
+
outputPrice: 1.8,
|
|
1397
|
+
description: "Qwen3 Coder 480B (MoE model with 35B active parameters)"
|
|
1283
1398
|
}
|
|
1284
1399
|
};
|
|
1285
1400
|
var BEDROCK_DEFAULT_TEMPERATURE = 0.3;
|
|
@@ -1345,47 +1460,56 @@ var BEDROCK_GLOBAL_INFERENCE_MODEL_IDS = [
|
|
|
1345
1460
|
var cerebrasDefaultModelId = "gpt-oss-120b";
|
|
1346
1461
|
var cerebrasModels = {
|
|
1347
1462
|
"zai-glm-4.6": {
|
|
1348
|
-
maxTokens:
|
|
1349
|
-
//
|
|
1463
|
+
maxTokens: 8192,
|
|
1464
|
+
// Conservative default to avoid premature rate limiting (Cerebras reserves quota upfront)
|
|
1350
1465
|
contextWindow: 131072,
|
|
1351
1466
|
supportsImages: false,
|
|
1352
1467
|
supportsPromptCache: false,
|
|
1468
|
+
supportsNativeTools: true,
|
|
1353
1469
|
inputPrice: 0,
|
|
1354
1470
|
outputPrice: 0,
|
|
1355
1471
|
description: "Highly intelligent general purpose model with up to 1,000 tokens/s"
|
|
1356
1472
|
},
|
|
1357
1473
|
"qwen-3-235b-a22b-instruct-2507": {
|
|
1358
|
-
maxTokens:
|
|
1474
|
+
maxTokens: 8192,
|
|
1475
|
+
// Conservative default to avoid premature rate limiting
|
|
1359
1476
|
contextWindow: 64e3,
|
|
1360
1477
|
supportsImages: false,
|
|
1361
1478
|
supportsPromptCache: false,
|
|
1479
|
+
supportsNativeTools: true,
|
|
1362
1480
|
inputPrice: 0,
|
|
1363
1481
|
outputPrice: 0,
|
|
1364
1482
|
description: "Intelligent model with ~1400 tokens/s"
|
|
1365
1483
|
},
|
|
1366
1484
|
"llama-3.3-70b": {
|
|
1367
|
-
maxTokens:
|
|
1485
|
+
maxTokens: 8192,
|
|
1486
|
+
// Conservative default to avoid premature rate limiting
|
|
1368
1487
|
contextWindow: 64e3,
|
|
1369
1488
|
supportsImages: false,
|
|
1370
1489
|
supportsPromptCache: false,
|
|
1490
|
+
supportsNativeTools: true,
|
|
1371
1491
|
inputPrice: 0,
|
|
1372
1492
|
outputPrice: 0,
|
|
1373
1493
|
description: "Powerful model with ~2600 tokens/s"
|
|
1374
1494
|
},
|
|
1375
1495
|
"qwen-3-32b": {
|
|
1376
|
-
maxTokens:
|
|
1496
|
+
maxTokens: 8192,
|
|
1497
|
+
// Conservative default to avoid premature rate limiting
|
|
1377
1498
|
contextWindow: 64e3,
|
|
1378
1499
|
supportsImages: false,
|
|
1379
1500
|
supportsPromptCache: false,
|
|
1501
|
+
supportsNativeTools: true,
|
|
1380
1502
|
inputPrice: 0,
|
|
1381
1503
|
outputPrice: 0,
|
|
1382
1504
|
description: "SOTA coding performance with ~2500 tokens/s"
|
|
1383
1505
|
},
|
|
1384
1506
|
"gpt-oss-120b": {
|
|
1385
|
-
maxTokens:
|
|
1507
|
+
maxTokens: 8192,
|
|
1508
|
+
// Conservative default to avoid premature rate limiting
|
|
1386
1509
|
contextWindow: 64e3,
|
|
1387
1510
|
supportsImages: false,
|
|
1388
1511
|
supportsPromptCache: false,
|
|
1512
|
+
supportsNativeTools: true,
|
|
1389
1513
|
inputPrice: 0,
|
|
1390
1514
|
outputPrice: 0,
|
|
1391
1515
|
description: "OpenAI GPT OSS model with ~2800 tokens/s\n\n\u2022 64K context window\n\u2022 Excels at efficient reasoning across science, math, and coding"
|
|
@@ -1906,35 +2030,37 @@ var deepSeekModels = {
|
|
|
1906
2030
|
supportsImages: false,
|
|
1907
2031
|
supportsPromptCache: true,
|
|
1908
2032
|
supportsNativeTools: true,
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
2033
|
+
defaultToolProtocol: "native",
|
|
2034
|
+
inputPrice: 0.28,
|
|
2035
|
+
// $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
|
|
2036
|
+
outputPrice: 0.42,
|
|
2037
|
+
// $0.42 per million tokens - Updated Dec 9, 2025
|
|
2038
|
+
cacheWritesPrice: 0.28,
|
|
2039
|
+
// $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
|
|
2040
|
+
cacheReadsPrice: 0.028,
|
|
2041
|
+
// $0.028 per million tokens (cache hit) - Updated Dec 9, 2025
|
|
2042
|
+
description: `DeepSeek-V3.2 (Non-thinking Mode) achieves a significant breakthrough in inference speed over previous models. It tops the leaderboard among open-source models and rivals the most advanced closed-source models globally. Supports JSON output, tool calls, chat prefix completion (beta), and FIM completion (beta).`
|
|
1918
2043
|
},
|
|
1919
2044
|
"deepseek-reasoner": {
|
|
1920
|
-
maxTokens:
|
|
1921
|
-
//
|
|
2045
|
+
maxTokens: 8192,
|
|
2046
|
+
// 8K max output
|
|
1922
2047
|
contextWindow: 128e3,
|
|
1923
2048
|
supportsImages: false,
|
|
1924
2049
|
supportsPromptCache: true,
|
|
1925
2050
|
supportsNativeTools: true,
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
2051
|
+
defaultToolProtocol: "native",
|
|
2052
|
+
inputPrice: 0.28,
|
|
2053
|
+
// $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
|
|
2054
|
+
outputPrice: 0.42,
|
|
2055
|
+
// $0.42 per million tokens - Updated Dec 9, 2025
|
|
2056
|
+
cacheWritesPrice: 0.28,
|
|
2057
|
+
// $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
|
|
2058
|
+
cacheReadsPrice: 0.028,
|
|
2059
|
+
// $0.028 per million tokens (cache hit) - Updated Dec 9, 2025
|
|
2060
|
+
description: `DeepSeek-V3.2 (Thinking Mode) achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks. Supports Chain of Thought reasoning with up to 8K output tokens. Supports JSON output, tool calls, and chat prefix completion (beta).`
|
|
1935
2061
|
}
|
|
1936
2062
|
};
|
|
1937
|
-
var DEEP_SEEK_DEFAULT_TEMPERATURE = 0
|
|
2063
|
+
var DEEP_SEEK_DEFAULT_TEMPERATURE = 0;
|
|
1938
2064
|
|
|
1939
2065
|
// src/providers/doubao.ts
|
|
1940
2066
|
var doubaoDefaultModelId = "doubao-seed-1-6-250615";
|
|
@@ -2389,21 +2515,6 @@ var geminiModels = {
|
|
|
2389
2515
|
}
|
|
2390
2516
|
};
|
|
2391
2517
|
|
|
2392
|
-
// src/providers/glama.ts
|
|
2393
|
-
var glamaDefaultModelId = "anthropic/claude-3-7-sonnet";
|
|
2394
|
-
var glamaDefaultModelInfo = {
|
|
2395
|
-
maxTokens: 8192,
|
|
2396
|
-
contextWindow: 2e5,
|
|
2397
|
-
supportsImages: true,
|
|
2398
|
-
supportsPromptCache: true,
|
|
2399
|
-
inputPrice: 3,
|
|
2400
|
-
outputPrice: 15,
|
|
2401
|
-
cacheWritesPrice: 3.75,
|
|
2402
|
-
cacheReadsPrice: 0.3,
|
|
2403
|
-
description: "Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. Claude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks. Read more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)"
|
|
2404
|
-
};
|
|
2405
|
-
var GLAMA_DEFAULT_TEMPERATURE = 0;
|
|
2406
|
-
|
|
2407
2518
|
// src/providers/groq.ts
|
|
2408
2519
|
var groqDefaultModelId = "moonshotai/kimi-k2-instruct-0905";
|
|
2409
2520
|
var groqModels = {
|
|
@@ -2584,6 +2695,7 @@ var litellmDefaultModelInfo = {
|
|
|
2584
2695
|
contextWindow: 2e5,
|
|
2585
2696
|
supportsImages: true,
|
|
2586
2697
|
supportsPromptCache: true,
|
|
2698
|
+
supportsNativeTools: true,
|
|
2587
2699
|
inputPrice: 3,
|
|
2588
2700
|
outputPrice: 15,
|
|
2589
2701
|
cacheWritesPrice: 3.75,
|
|
@@ -2771,6 +2883,7 @@ var ollamaDefaultModelInfo = {
|
|
|
2771
2883
|
contextWindow: 2e5,
|
|
2772
2884
|
supportsImages: true,
|
|
2773
2885
|
supportsPromptCache: true,
|
|
2886
|
+
supportsNativeTools: true,
|
|
2774
2887
|
inputPrice: 0,
|
|
2775
2888
|
outputPrice: 0,
|
|
2776
2889
|
cacheWritesPrice: 0,
|
|
@@ -2781,10 +2894,30 @@ var ollamaDefaultModelInfo = {
|
|
|
2781
2894
|
// src/providers/openai.ts
|
|
2782
2895
|
var openAiNativeDefaultModelId = "gpt-5.1";
|
|
2783
2896
|
var openAiNativeModels = {
|
|
2897
|
+
"gpt-5.1-codex-max": {
|
|
2898
|
+
maxTokens: 128e3,
|
|
2899
|
+
contextWindow: 4e5,
|
|
2900
|
+
supportsNativeTools: true,
|
|
2901
|
+
includedTools: ["apply_patch"],
|
|
2902
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2903
|
+
supportsImages: true,
|
|
2904
|
+
supportsPromptCache: true,
|
|
2905
|
+
promptCacheRetention: "24h",
|
|
2906
|
+
supportsReasoningEffort: ["low", "medium", "high", "xhigh"],
|
|
2907
|
+
reasoningEffort: "medium",
|
|
2908
|
+
inputPrice: 1.25,
|
|
2909
|
+
outputPrice: 10,
|
|
2910
|
+
cacheReadsPrice: 0.125,
|
|
2911
|
+
supportsTemperature: false,
|
|
2912
|
+
tiers: [{ name: "priority", contextWindow: 4e5, inputPrice: 2.5, outputPrice: 20, cacheReadsPrice: 0.25 }],
|
|
2913
|
+
description: "GPT-5.1 Codex Max: Our most intelligent coding model optimized for long-horizon, agentic coding tasks"
|
|
2914
|
+
},
|
|
2784
2915
|
"gpt-5.1": {
|
|
2785
2916
|
maxTokens: 128e3,
|
|
2786
2917
|
contextWindow: 4e5,
|
|
2787
2918
|
supportsNativeTools: true,
|
|
2919
|
+
includedTools: ["apply_patch"],
|
|
2920
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2788
2921
|
supportsImages: true,
|
|
2789
2922
|
supportsPromptCache: true,
|
|
2790
2923
|
promptCacheRetention: "24h",
|
|
@@ -2805,6 +2938,8 @@ var openAiNativeModels = {
|
|
|
2805
2938
|
maxTokens: 128e3,
|
|
2806
2939
|
contextWindow: 4e5,
|
|
2807
2940
|
supportsNativeTools: true,
|
|
2941
|
+
includedTools: ["apply_patch"],
|
|
2942
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2808
2943
|
supportsImages: true,
|
|
2809
2944
|
supportsPromptCache: true,
|
|
2810
2945
|
promptCacheRetention: "24h",
|
|
@@ -2821,6 +2956,8 @@ var openAiNativeModels = {
|
|
|
2821
2956
|
maxTokens: 128e3,
|
|
2822
2957
|
contextWindow: 4e5,
|
|
2823
2958
|
supportsNativeTools: true,
|
|
2959
|
+
includedTools: ["apply_patch"],
|
|
2960
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2824
2961
|
supportsImages: true,
|
|
2825
2962
|
supportsPromptCache: true,
|
|
2826
2963
|
promptCacheRetention: "24h",
|
|
@@ -2836,6 +2973,8 @@ var openAiNativeModels = {
|
|
|
2836
2973
|
maxTokens: 128e3,
|
|
2837
2974
|
contextWindow: 4e5,
|
|
2838
2975
|
supportsNativeTools: true,
|
|
2976
|
+
includedTools: ["apply_patch"],
|
|
2977
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2839
2978
|
supportsImages: true,
|
|
2840
2979
|
supportsPromptCache: true,
|
|
2841
2980
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -2855,6 +2994,8 @@ var openAiNativeModels = {
|
|
|
2855
2994
|
maxTokens: 128e3,
|
|
2856
2995
|
contextWindow: 4e5,
|
|
2857
2996
|
supportsNativeTools: true,
|
|
2997
|
+
includedTools: ["apply_patch"],
|
|
2998
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2858
2999
|
supportsImages: true,
|
|
2859
3000
|
supportsPromptCache: true,
|
|
2860
3001
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -2874,6 +3015,8 @@ var openAiNativeModels = {
|
|
|
2874
3015
|
maxTokens: 128e3,
|
|
2875
3016
|
contextWindow: 4e5,
|
|
2876
3017
|
supportsNativeTools: true,
|
|
3018
|
+
includedTools: ["apply_patch"],
|
|
3019
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2877
3020
|
supportsImages: true,
|
|
2878
3021
|
supportsPromptCache: true,
|
|
2879
3022
|
supportsReasoningEffort: ["low", "medium", "high"],
|
|
@@ -2889,6 +3032,8 @@ var openAiNativeModels = {
|
|
|
2889
3032
|
maxTokens: 128e3,
|
|
2890
3033
|
contextWindow: 4e5,
|
|
2891
3034
|
supportsNativeTools: true,
|
|
3035
|
+
includedTools: ["apply_patch"],
|
|
3036
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2892
3037
|
supportsImages: true,
|
|
2893
3038
|
supportsPromptCache: true,
|
|
2894
3039
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -2905,6 +3050,8 @@ var openAiNativeModels = {
|
|
|
2905
3050
|
maxTokens: 128e3,
|
|
2906
3051
|
contextWindow: 4e5,
|
|
2907
3052
|
supportsNativeTools: true,
|
|
3053
|
+
includedTools: ["apply_patch"],
|
|
3054
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2908
3055
|
supportsImages: true,
|
|
2909
3056
|
supportsPromptCache: true,
|
|
2910
3057
|
inputPrice: 1.25,
|
|
@@ -2916,6 +3063,8 @@ var openAiNativeModels = {
|
|
|
2916
3063
|
maxTokens: 32768,
|
|
2917
3064
|
contextWindow: 1047576,
|
|
2918
3065
|
supportsNativeTools: true,
|
|
3066
|
+
includedTools: ["apply_patch"],
|
|
3067
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2919
3068
|
supportsImages: true,
|
|
2920
3069
|
supportsPromptCache: true,
|
|
2921
3070
|
inputPrice: 2,
|
|
@@ -2930,6 +3079,8 @@ var openAiNativeModels = {
|
|
|
2930
3079
|
maxTokens: 32768,
|
|
2931
3080
|
contextWindow: 1047576,
|
|
2932
3081
|
supportsNativeTools: true,
|
|
3082
|
+
includedTools: ["apply_patch"],
|
|
3083
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2933
3084
|
supportsImages: true,
|
|
2934
3085
|
supportsPromptCache: true,
|
|
2935
3086
|
inputPrice: 0.4,
|
|
@@ -2944,6 +3095,8 @@ var openAiNativeModels = {
|
|
|
2944
3095
|
maxTokens: 32768,
|
|
2945
3096
|
contextWindow: 1047576,
|
|
2946
3097
|
supportsNativeTools: true,
|
|
3098
|
+
includedTools: ["apply_patch"],
|
|
3099
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
2947
3100
|
supportsImages: true,
|
|
2948
3101
|
supportsPromptCache: true,
|
|
2949
3102
|
inputPrice: 0.1,
|
|
@@ -3151,6 +3304,8 @@ var openAiNativeModels = {
|
|
|
3151
3304
|
maxTokens: 128e3,
|
|
3152
3305
|
contextWindow: 4e5,
|
|
3153
3306
|
supportsNativeTools: true,
|
|
3307
|
+
includedTools: ["apply_patch"],
|
|
3308
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3154
3309
|
supportsImages: true,
|
|
3155
3310
|
supportsPromptCache: true,
|
|
3156
3311
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -3170,6 +3325,8 @@ var openAiNativeModels = {
|
|
|
3170
3325
|
maxTokens: 128e3,
|
|
3171
3326
|
contextWindow: 4e5,
|
|
3172
3327
|
supportsNativeTools: true,
|
|
3328
|
+
includedTools: ["apply_patch"],
|
|
3329
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3173
3330
|
supportsImages: true,
|
|
3174
3331
|
supportsPromptCache: true,
|
|
3175
3332
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -3189,6 +3346,8 @@ var openAiNativeModels = {
|
|
|
3189
3346
|
maxTokens: 128e3,
|
|
3190
3347
|
contextWindow: 4e5,
|
|
3191
3348
|
supportsNativeTools: true,
|
|
3349
|
+
includedTools: ["apply_patch"],
|
|
3350
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3192
3351
|
supportsImages: true,
|
|
3193
3352
|
supportsPromptCache: true,
|
|
3194
3353
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -3351,7 +3510,18 @@ var RooModelSchema = z7.object({
|
|
|
3351
3510
|
type: z7.literal("language"),
|
|
3352
3511
|
tags: z7.array(z7.string()).optional(),
|
|
3353
3512
|
pricing: RooPricingSchema,
|
|
3354
|
-
deprecated: z7.boolean().optional()
|
|
3513
|
+
deprecated: z7.boolean().optional(),
|
|
3514
|
+
default_temperature: z7.number().optional(),
|
|
3515
|
+
// Dynamic settings that map directly to ModelInfo properties
|
|
3516
|
+
// Allows the API to configure model-specific defaults like includedTools, excludedTools, reasoningEffort, etc.
|
|
3517
|
+
// These are always direct values (e.g., includedTools: ['search_replace']) for backward compatibility with old clients.
|
|
3518
|
+
settings: z7.record(z7.string(), z7.unknown()).optional(),
|
|
3519
|
+
// Versioned settings keyed by version number (e.g., '3.36.4').
|
|
3520
|
+
// Each version key maps to a settings object that is used when plugin version >= that version.
|
|
3521
|
+
// New clients find the highest version key <= current version and use those settings.
|
|
3522
|
+
// Old clients ignore this field and use plain values from `settings`.
|
|
3523
|
+
// Example: { '3.36.4': { includedTools: ['search_replace'] }, '3.35.0': { ... } }
|
|
3524
|
+
versionedSettings: z7.record(z7.string(), z7.record(z7.string(), z7.unknown())).optional()
|
|
3355
3525
|
});
|
|
3356
3526
|
var RooModelsResponseSchema = z7.object({
|
|
3357
3527
|
object: z7.literal("list"),
|
|
@@ -3469,6 +3639,7 @@ var unboundDefaultModelInfo = {
|
|
|
3469
3639
|
contextWindow: 2e5,
|
|
3470
3640
|
supportsImages: true,
|
|
3471
3641
|
supportsPromptCache: true,
|
|
3642
|
+
supportsNativeTools: true,
|
|
3472
3643
|
inputPrice: 3,
|
|
3473
3644
|
outputPrice: 15,
|
|
3474
3645
|
cacheWritesPrice: 3.75,
|
|
@@ -4116,15 +4287,17 @@ var xaiDefaultModelId = "grok-code-fast-1";
|
|
|
4116
4287
|
var xaiModels = {
|
|
4117
4288
|
"grok-code-fast-1": {
|
|
4118
4289
|
maxTokens: 16384,
|
|
4119
|
-
contextWindow:
|
|
4120
|
-
supportsImages:
|
|
4290
|
+
contextWindow: 256e3,
|
|
4291
|
+
supportsImages: true,
|
|
4121
4292
|
supportsPromptCache: true,
|
|
4122
4293
|
supportsNativeTools: true,
|
|
4123
4294
|
inputPrice: 0.2,
|
|
4124
4295
|
outputPrice: 1.5,
|
|
4125
4296
|
cacheWritesPrice: 0.02,
|
|
4126
4297
|
cacheReadsPrice: 0.02,
|
|
4127
|
-
description: "xAI's Grok Code Fast model with 256K context window"
|
|
4298
|
+
description: "xAI's Grok Code Fast model with 256K context window",
|
|
4299
|
+
includedTools: ["search_replace"],
|
|
4300
|
+
excludedTools: ["apply_diff"]
|
|
4128
4301
|
},
|
|
4129
4302
|
"grok-4-1-fast-reasoning": {
|
|
4130
4303
|
maxTokens: 65536,
|
|
@@ -4136,7 +4309,9 @@ var xaiModels = {
|
|
|
4136
4309
|
outputPrice: 0.5,
|
|
4137
4310
|
cacheWritesPrice: 0.05,
|
|
4138
4311
|
cacheReadsPrice: 0.05,
|
|
4139
|
-
description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning"
|
|
4312
|
+
description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning",
|
|
4313
|
+
includedTools: ["search_replace"],
|
|
4314
|
+
excludedTools: ["apply_diff"]
|
|
4140
4315
|
},
|
|
4141
4316
|
"grok-4-1-fast-non-reasoning": {
|
|
4142
4317
|
maxTokens: 65536,
|
|
@@ -4148,7 +4323,9 @@ var xaiModels = {
|
|
|
4148
4323
|
outputPrice: 0.5,
|
|
4149
4324
|
cacheWritesPrice: 0.05,
|
|
4150
4325
|
cacheReadsPrice: 0.05,
|
|
4151
|
-
description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling"
|
|
4326
|
+
description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling",
|
|
4327
|
+
includedTools: ["search_replace"],
|
|
4328
|
+
excludedTools: ["apply_diff"]
|
|
4152
4329
|
},
|
|
4153
4330
|
"grok-4-fast-reasoning": {
|
|
4154
4331
|
maxTokens: 65536,
|
|
@@ -4160,7 +4337,9 @@ var xaiModels = {
|
|
|
4160
4337
|
outputPrice: 0.5,
|
|
4161
4338
|
cacheWritesPrice: 0.05,
|
|
4162
4339
|
cacheReadsPrice: 0.05,
|
|
4163
|
-
description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning"
|
|
4340
|
+
description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning",
|
|
4341
|
+
includedTools: ["search_replace"],
|
|
4342
|
+
excludedTools: ["apply_diff"]
|
|
4164
4343
|
},
|
|
4165
4344
|
"grok-4-fast-non-reasoning": {
|
|
4166
4345
|
maxTokens: 65536,
|
|
@@ -4172,9 +4351,11 @@ var xaiModels = {
|
|
|
4172
4351
|
outputPrice: 0.5,
|
|
4173
4352
|
cacheWritesPrice: 0.05,
|
|
4174
4353
|
cacheReadsPrice: 0.05,
|
|
4175
|
-
description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling"
|
|
4354
|
+
description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling",
|
|
4355
|
+
includedTools: ["search_replace"],
|
|
4356
|
+
excludedTools: ["apply_diff"]
|
|
4176
4357
|
},
|
|
4177
|
-
"grok-4": {
|
|
4358
|
+
"grok-4-0709": {
|
|
4178
4359
|
maxTokens: 8192,
|
|
4179
4360
|
contextWindow: 256e3,
|
|
4180
4361
|
supportsImages: true,
|
|
@@ -4184,36 +4365,14 @@ var xaiModels = {
|
|
|
4184
4365
|
outputPrice: 15,
|
|
4185
4366
|
cacheWritesPrice: 0.75,
|
|
4186
4367
|
cacheReadsPrice: 0.75,
|
|
4187
|
-
description: "xAI's Grok-4 model with 256K context window"
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
maxTokens: 8192,
|
|
4191
|
-
contextWindow: 131072,
|
|
4192
|
-
supportsImages: false,
|
|
4193
|
-
supportsPromptCache: true,
|
|
4194
|
-
supportsNativeTools: true,
|
|
4195
|
-
inputPrice: 3,
|
|
4196
|
-
outputPrice: 15,
|
|
4197
|
-
cacheWritesPrice: 0.75,
|
|
4198
|
-
cacheReadsPrice: 0.75,
|
|
4199
|
-
description: "xAI's Grok-3 model with 128K context window"
|
|
4200
|
-
},
|
|
4201
|
-
"grok-3-fast": {
|
|
4202
|
-
maxTokens: 8192,
|
|
4203
|
-
contextWindow: 131072,
|
|
4204
|
-
supportsImages: false,
|
|
4205
|
-
supportsPromptCache: true,
|
|
4206
|
-
supportsNativeTools: true,
|
|
4207
|
-
inputPrice: 5,
|
|
4208
|
-
outputPrice: 25,
|
|
4209
|
-
cacheWritesPrice: 1.25,
|
|
4210
|
-
cacheReadsPrice: 1.25,
|
|
4211
|
-
description: "xAI's Grok-3 fast model with 128K context window"
|
|
4368
|
+
description: "xAI's Grok-4 model with 256K context window",
|
|
4369
|
+
includedTools: ["search_replace"],
|
|
4370
|
+
excludedTools: ["apply_diff"]
|
|
4212
4371
|
},
|
|
4213
4372
|
"grok-3-mini": {
|
|
4214
4373
|
maxTokens: 8192,
|
|
4215
4374
|
contextWindow: 131072,
|
|
4216
|
-
supportsImages:
|
|
4375
|
+
supportsImages: true,
|
|
4217
4376
|
supportsPromptCache: true,
|
|
4218
4377
|
supportsNativeTools: true,
|
|
4219
4378
|
inputPrice: 0.3,
|
|
@@ -4221,40 +4380,24 @@ var xaiModels = {
|
|
|
4221
4380
|
cacheWritesPrice: 0.07,
|
|
4222
4381
|
cacheReadsPrice: 0.07,
|
|
4223
4382
|
description: "xAI's Grok-3 mini model with 128K context window",
|
|
4224
|
-
supportsReasoningEffort:
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
contextWindow: 131072,
|
|
4229
|
-
supportsImages: false,
|
|
4230
|
-
supportsPromptCache: true,
|
|
4231
|
-
supportsNativeTools: true,
|
|
4232
|
-
inputPrice: 0.6,
|
|
4233
|
-
outputPrice: 4,
|
|
4234
|
-
cacheWritesPrice: 0.15,
|
|
4235
|
-
cacheReadsPrice: 0.15,
|
|
4236
|
-
description: "xAI's Grok-3 mini fast model with 128K context window",
|
|
4237
|
-
supportsReasoningEffort: true
|
|
4383
|
+
supportsReasoningEffort: ["low", "high"],
|
|
4384
|
+
reasoningEffort: "low",
|
|
4385
|
+
includedTools: ["search_replace"],
|
|
4386
|
+
excludedTools: ["apply_diff"]
|
|
4238
4387
|
},
|
|
4239
|
-
"grok-
|
|
4388
|
+
"grok-3": {
|
|
4240
4389
|
maxTokens: 8192,
|
|
4241
4390
|
contextWindow: 131072,
|
|
4242
|
-
supportsImages: false,
|
|
4243
|
-
supportsPromptCache: false,
|
|
4244
|
-
supportsNativeTools: true,
|
|
4245
|
-
inputPrice: 2,
|
|
4246
|
-
outputPrice: 10,
|
|
4247
|
-
description: "xAI's Grok-2 model (version 1212) with 128K context window"
|
|
4248
|
-
},
|
|
4249
|
-
"grok-2-vision-1212": {
|
|
4250
|
-
maxTokens: 8192,
|
|
4251
|
-
contextWindow: 32768,
|
|
4252
4391
|
supportsImages: true,
|
|
4253
|
-
supportsPromptCache:
|
|
4392
|
+
supportsPromptCache: true,
|
|
4254
4393
|
supportsNativeTools: true,
|
|
4255
|
-
inputPrice:
|
|
4256
|
-
outputPrice:
|
|
4257
|
-
|
|
4394
|
+
inputPrice: 3,
|
|
4395
|
+
outputPrice: 15,
|
|
4396
|
+
cacheWritesPrice: 0.75,
|
|
4397
|
+
cacheReadsPrice: 0.75,
|
|
4398
|
+
description: "xAI's Grok-3 model with 128K context window",
|
|
4399
|
+
includedTools: ["search_replace"],
|
|
4400
|
+
excludedTools: ["apply_diff"]
|
|
4258
4401
|
}
|
|
4259
4402
|
};
|
|
4260
4403
|
|
|
@@ -4361,7 +4504,6 @@ var internationalZAiModels = {
|
|
|
4361
4504
|
supportsImages: false,
|
|
4362
4505
|
supportsPromptCache: true,
|
|
4363
4506
|
supportsNativeTools: true,
|
|
4364
|
-
supportsReasoningBinary: true,
|
|
4365
4507
|
inputPrice: 0.6,
|
|
4366
4508
|
outputPrice: 2.2,
|
|
4367
4509
|
cacheWritesPrice: 0,
|
|
@@ -4434,7 +4576,6 @@ var internationalZAiModels = {
|
|
|
4434
4576
|
supportsImages: false,
|
|
4435
4577
|
supportsPromptCache: true,
|
|
4436
4578
|
supportsNativeTools: true,
|
|
4437
|
-
supportsReasoningBinary: true,
|
|
4438
4579
|
inputPrice: 0.6,
|
|
4439
4580
|
outputPrice: 2.2,
|
|
4440
4581
|
cacheWritesPrice: 0,
|
|
@@ -4462,7 +4603,6 @@ var mainlandZAiModels = {
|
|
|
4462
4603
|
supportsImages: false,
|
|
4463
4604
|
supportsPromptCache: true,
|
|
4464
4605
|
supportsNativeTools: true,
|
|
4465
|
-
supportsReasoningBinary: true,
|
|
4466
4606
|
inputPrice: 0.29,
|
|
4467
4607
|
outputPrice: 1.14,
|
|
4468
4608
|
cacheWritesPrice: 0,
|
|
@@ -4535,7 +4675,6 @@ var mainlandZAiModels = {
|
|
|
4535
4675
|
supportsImages: false,
|
|
4536
4676
|
supportsPromptCache: true,
|
|
4537
4677
|
supportsNativeTools: true,
|
|
4538
|
-
supportsReasoningBinary: true,
|
|
4539
4678
|
inputPrice: 0.29,
|
|
4540
4679
|
outputPrice: 1.14,
|
|
4541
4680
|
cacheWritesPrice: 0,
|
|
@@ -4611,8 +4750,6 @@ function getProviderDefaultModelId(provider, options = { isChina: false }) {
|
|
|
4611
4750
|
return openRouterDefaultModelId;
|
|
4612
4751
|
case "requesty":
|
|
4613
4752
|
return requestyDefaultModelId;
|
|
4614
|
-
case "glama":
|
|
4615
|
-
return glamaDefaultModelId;
|
|
4616
4753
|
case "unbound":
|
|
4617
4754
|
return unboundDefaultModelId;
|
|
4618
4755
|
case "litellm":
|
|
@@ -4699,7 +4836,6 @@ var dynamicProviders = [
|
|
|
4699
4836
|
"io-intelligence",
|
|
4700
4837
|
"requesty",
|
|
4701
4838
|
"unbound",
|
|
4702
|
-
"glama",
|
|
4703
4839
|
"roo",
|
|
4704
4840
|
"chutes"
|
|
4705
4841
|
];
|
|
@@ -4781,10 +4917,6 @@ var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
|
4781
4917
|
claudeCodePath: z8.string().optional(),
|
|
4782
4918
|
claudeCodeMaxOutputTokens: z8.number().int().min(1).max(2e5).optional()
|
|
4783
4919
|
});
|
|
4784
|
-
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
4785
|
-
glamaModelId: z8.string().optional(),
|
|
4786
|
-
glamaApiKey: z8.string().optional()
|
|
4787
|
-
});
|
|
4788
4920
|
var openRouterSchema = baseProviderSettingsSchema.extend({
|
|
4789
4921
|
openRouterApiKey: z8.string().optional(),
|
|
4790
4922
|
openRouterModelId: z8.string().optional(),
|
|
@@ -4969,7 +5101,6 @@ var defaultSchema = z8.object({
|
|
|
4969
5101
|
var providerSettingsSchemaDiscriminated = z8.discriminatedUnion("apiProvider", [
|
|
4970
5102
|
anthropicSchema.merge(z8.object({ apiProvider: z8.literal("anthropic") })),
|
|
4971
5103
|
claudeCodeSchema.merge(z8.object({ apiProvider: z8.literal("claude-code") })),
|
|
4972
|
-
glamaSchema.merge(z8.object({ apiProvider: z8.literal("glama") })),
|
|
4973
5104
|
openRouterSchema.merge(z8.object({ apiProvider: z8.literal("openrouter") })),
|
|
4974
5105
|
bedrockSchema.merge(z8.object({ apiProvider: z8.literal("bedrock") })),
|
|
4975
5106
|
vertexSchema.merge(z8.object({ apiProvider: z8.literal("vertex") })),
|
|
@@ -5011,7 +5142,6 @@ var providerSettingsSchema = z8.object({
|
|
|
5011
5142
|
apiProvider: providerNamesSchema.optional(),
|
|
5012
5143
|
...anthropicSchema.shape,
|
|
5013
5144
|
...claudeCodeSchema.shape,
|
|
5014
|
-
...glamaSchema.shape,
|
|
5015
5145
|
...openRouterSchema.shape,
|
|
5016
5146
|
...bedrockSchema.shape,
|
|
5017
5147
|
...vertexSchema.shape,
|
|
@@ -5056,7 +5186,6 @@ var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscrimina
|
|
|
5056
5186
|
var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
|
|
5057
5187
|
var modelIdKeys = [
|
|
5058
5188
|
"apiModelId",
|
|
5059
|
-
"glamaModelId",
|
|
5060
5189
|
"openRouterModelId",
|
|
5061
5190
|
"openAiModelId",
|
|
5062
5191
|
"ollamaModelId",
|
|
@@ -5078,7 +5207,6 @@ var isTypicalProvider = (key) => isProviderName(key) && !isInternalProvider(key)
|
|
|
5078
5207
|
var modelIdKeysByProvider = {
|
|
5079
5208
|
anthropic: "apiModelId",
|
|
5080
5209
|
"claude-code": "apiModelId",
|
|
5081
|
-
glama: "glamaModelId",
|
|
5082
5210
|
openrouter: "openRouterModelId",
|
|
5083
5211
|
bedrock: "apiModelId",
|
|
5084
5212
|
vertex: "apiModelId",
|
|
@@ -5209,7 +5337,6 @@ var MODELS_BY_PROVIDER = {
|
|
|
5209
5337
|
zai: { id: "zai", label: "Z.ai", models: Object.keys(internationalZAiModels) },
|
|
5210
5338
|
baseten: { id: "baseten", label: "Baseten", models: Object.keys(basetenModels) },
|
|
5211
5339
|
// Dynamic providers; models pulled from remote APIs.
|
|
5212
|
-
glama: { id: "glama", label: "Glama", models: [] },
|
|
5213
5340
|
huggingface: { id: "huggingface", label: "Hugging Face", models: [] },
|
|
5214
5341
|
litellm: { id: "litellm", label: "LiteLLM", models: [] },
|
|
5215
5342
|
openrouter: { id: "openrouter", label: "OpenRouter", models: [] },
|
|
@@ -5441,6 +5568,67 @@ var rooCodeTelemetryEventSchema = z11.discriminatedUnion("type", [
|
|
|
5441
5568
|
})
|
|
5442
5569
|
})
|
|
5443
5570
|
]);
|
|
5571
|
+
var EXPECTED_API_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
5572
|
+
402,
|
|
5573
|
+
// Payment required - billing issues
|
|
5574
|
+
429
|
|
5575
|
+
// Rate limit - expected when hitting API limits
|
|
5576
|
+
]);
|
|
5577
|
+
var EXPECTED_ERROR_MESSAGE_PATTERNS = [
|
|
5578
|
+
/^429\b/,
|
|
5579
|
+
// Message starts with "429"
|
|
5580
|
+
/rate limit/i
|
|
5581
|
+
// Contains "rate limit" (case insensitive)
|
|
5582
|
+
];
|
|
5583
|
+
function isOpenAISdkError(error) {
|
|
5584
|
+
return typeof error === "object" && error !== null && "status" in error && typeof error.status === "number";
|
|
5585
|
+
}
|
|
5586
|
+
function getErrorStatusCode(error) {
|
|
5587
|
+
if (isOpenAISdkError(error)) {
|
|
5588
|
+
return error.status;
|
|
5589
|
+
}
|
|
5590
|
+
return void 0;
|
|
5591
|
+
}
|
|
5592
|
+
function getErrorMessage(error) {
|
|
5593
|
+
if (isOpenAISdkError(error)) {
|
|
5594
|
+
return error.error?.metadata?.raw || error.error?.message || error.message;
|
|
5595
|
+
}
|
|
5596
|
+
return void 0;
|
|
5597
|
+
}
|
|
5598
|
+
function shouldReportApiErrorToTelemetry(errorCode, errorMessage) {
|
|
5599
|
+
if (errorCode !== void 0 && EXPECTED_API_ERROR_CODES.has(errorCode)) {
|
|
5600
|
+
return false;
|
|
5601
|
+
}
|
|
5602
|
+
if (errorMessage) {
|
|
5603
|
+
for (const pattern of EXPECTED_ERROR_MESSAGE_PATTERNS) {
|
|
5604
|
+
if (pattern.test(errorMessage)) {
|
|
5605
|
+
return false;
|
|
5606
|
+
}
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5609
|
+
return true;
|
|
5610
|
+
}
|
|
5611
|
+
var ApiProviderError = class extends Error {
|
|
5612
|
+
constructor(message, provider, modelId, operation, errorCode) {
|
|
5613
|
+
super(message);
|
|
5614
|
+
this.provider = provider;
|
|
5615
|
+
this.modelId = modelId;
|
|
5616
|
+
this.operation = operation;
|
|
5617
|
+
this.errorCode = errorCode;
|
|
5618
|
+
this.name = "ApiProviderError";
|
|
5619
|
+
}
|
|
5620
|
+
};
|
|
5621
|
+
function isApiProviderError(error) {
|
|
5622
|
+
return error instanceof Error && error.name === "ApiProviderError" && "provider" in error && "modelId" in error && "operation" in error;
|
|
5623
|
+
}
|
|
5624
|
+
function extractApiProviderErrorProperties(error) {
|
|
5625
|
+
return {
|
|
5626
|
+
provider: error.provider,
|
|
5627
|
+
modelId: error.modelId,
|
|
5628
|
+
operation: error.operation,
|
|
5629
|
+
...error.errorCode !== void 0 && { errorCode: error.errorCode }
|
|
5630
|
+
};
|
|
5631
|
+
}
|
|
5444
5632
|
|
|
5445
5633
|
// src/mode.ts
|
|
5446
5634
|
import { z as z12 } from "zod";
|
|
@@ -5519,7 +5707,7 @@ var DEFAULT_MODES = [
|
|
|
5519
5707
|
whenToUse: "Use this mode when you need to plan, design, or strategize before implementation. Perfect for breaking down complex problems, creating technical specifications, designing system architecture, or brainstorming solutions before coding.",
|
|
5520
5708
|
description: "Plan and design before implementation",
|
|
5521
5709
|
groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"],
|
|
5522
|
-
customInstructions: "1. Do some information gathering (using provided tools) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be:\n - Specific and actionable\n - Listed in logical execution order\n - Focused on a single, well-defined outcome\n - Clear enough that another mode could execute it independently\n\n **Note:** If the `update_todo_list` tool is not available, write the plan to a markdown file (e.g., `plan.md` or `todo.md`) instead.\n\n4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished.\n\n5. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and refine the todo list.\n\n6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes (\"\") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors.\n\n7. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done
|
|
5710
|
+
customInstructions: "1. Do some information gathering (using provided tools) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be:\n - Specific and actionable\n - Listed in logical execution order\n - Focused on a single, well-defined outcome\n - Clear enough that another mode could execute it independently\n\n **Note:** If the `update_todo_list` tool is not available, write the plan to a markdown file (e.g., `plan.md` or `todo.md`) instead.\n\n4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished.\n\n5. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and refine the todo list.\n\n6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes (\"\") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors.\n\n7. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.**\n\n**CRITICAL: Never provide level of effort time estimates (e.g., hours, days, weeks) for tasks. Focus solely on breaking down the work into clear, actionable steps without estimating how long they will take.**\n\nUnless told otherwise, if you want to save a plan file, put it in the /plans directory"
|
|
5523
5711
|
},
|
|
5524
5712
|
{
|
|
5525
5713
|
slug: "code",
|
|
@@ -5737,7 +5925,6 @@ var GLOBAL_SETTINGS_KEYS = globalSettingsSchema.keyof().options;
|
|
|
5737
5925
|
var rooCodeSettingsSchema = providerSettingsSchema.merge(globalSettingsSchema);
|
|
5738
5926
|
var SECRET_STATE_KEYS = [
|
|
5739
5927
|
"apiKey",
|
|
5740
|
-
"glamaApiKey",
|
|
5741
5928
|
"openRouterApiKey",
|
|
5742
5929
|
"awsAccessKey",
|
|
5743
5930
|
"awsApiKey",
|
|
@@ -6303,6 +6490,16 @@ var usageStatsSchema = z16.object({
|
|
|
6303
6490
|
// Period in days (e.g., 30)
|
|
6304
6491
|
});
|
|
6305
6492
|
|
|
6493
|
+
// src/context-management.ts
|
|
6494
|
+
var CONTEXT_MANAGEMENT_EVENTS = [
|
|
6495
|
+
"condense_context",
|
|
6496
|
+
"condense_context_error",
|
|
6497
|
+
"sliding_window_truncation"
|
|
6498
|
+
];
|
|
6499
|
+
function isContextManagementEvent(value) {
|
|
6500
|
+
return typeof value === "string" && CONTEXT_MANAGEMENT_EVENTS.includes(value);
|
|
6501
|
+
}
|
|
6502
|
+
|
|
6306
6503
|
// src/cookie-consent.ts
|
|
6307
6504
|
var CONSENT_COOKIE_NAME = "roo-code-cookie-consent";
|
|
6308
6505
|
var COOKIE_CONSENT_EVENTS = {
|
|
@@ -6494,6 +6691,7 @@ export {
|
|
|
6494
6691
|
ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
6495
6692
|
ANTHROPIC_STYLE_PROVIDERS,
|
|
6496
6693
|
AWS_INFERENCE_PROFILE_MAPPING,
|
|
6694
|
+
ApiProviderError,
|
|
6497
6695
|
BEDROCK_1M_CONTEXT_MODEL_IDS,
|
|
6498
6696
|
BEDROCK_DEFAULT_CONTEXT,
|
|
6499
6697
|
BEDROCK_DEFAULT_TEMPERATURE,
|
|
@@ -6503,6 +6701,7 @@ export {
|
|
|
6503
6701
|
CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
|
|
6504
6702
|
CODEBASE_INDEX_DEFAULTS,
|
|
6505
6703
|
CONSENT_COOKIE_NAME,
|
|
6704
|
+
CONTEXT_MANAGEMENT_EVENTS,
|
|
6506
6705
|
COOKIE_CONSENT_EVENTS,
|
|
6507
6706
|
ConnectionState,
|
|
6508
6707
|
DEEP_SEEK_DEFAULT_TEMPERATURE,
|
|
@@ -6515,10 +6714,10 @@ export {
|
|
|
6515
6714
|
DOUBAO_API_CHAT_PATH,
|
|
6516
6715
|
EVALS_SETTINGS,
|
|
6517
6716
|
EVALS_TIMEOUT,
|
|
6717
|
+
EXPECTED_API_ERROR_CODES,
|
|
6518
6718
|
ExtensionBridgeCommandName,
|
|
6519
6719
|
ExtensionBridgeEventName,
|
|
6520
6720
|
ExtensionSocketEvents,
|
|
6521
|
-
GLAMA_DEFAULT_TEMPERATURE,
|
|
6522
6721
|
GLOBAL_SECRET_KEYS,
|
|
6523
6722
|
GLOBAL_SETTINGS_KEYS,
|
|
6524
6723
|
GLOBAL_STATE_KEYS,
|
|
@@ -6602,6 +6801,7 @@ export {
|
|
|
6602
6801
|
commandExecutionStatusSchema,
|
|
6603
6802
|
commandIds,
|
|
6604
6803
|
contextCondenseSchema,
|
|
6804
|
+
contextTruncationSchema,
|
|
6605
6805
|
convertModelNameForVertex,
|
|
6606
6806
|
customModePromptsSchema,
|
|
6607
6807
|
customModesSettingsSchema,
|
|
@@ -6623,6 +6823,7 @@ export {
|
|
|
6623
6823
|
extensionBridgeCommandSchema,
|
|
6624
6824
|
extensionBridgeEventSchema,
|
|
6625
6825
|
extensionInstanceSchema,
|
|
6826
|
+
extractApiProviderErrorProperties,
|
|
6626
6827
|
fauxProviders,
|
|
6627
6828
|
featherlessDefaultModelId,
|
|
6628
6829
|
featherlessModels,
|
|
@@ -6634,12 +6835,12 @@ export {
|
|
|
6634
6835
|
getApiProtocol,
|
|
6635
6836
|
getClaudeCodeModelId,
|
|
6636
6837
|
getEffectiveProtocol,
|
|
6838
|
+
getErrorMessage,
|
|
6839
|
+
getErrorStatusCode,
|
|
6637
6840
|
getImageGenerationProvider,
|
|
6638
6841
|
getModelId,
|
|
6639
6842
|
getProviderDefaultModelId,
|
|
6640
6843
|
gitPropertiesSchema,
|
|
6641
|
-
glamaDefaultModelId,
|
|
6642
|
-
glamaDefaultModelInfo,
|
|
6643
6844
|
globalSettingsSchema,
|
|
6644
6845
|
groqDefaultModelId,
|
|
6645
6846
|
groqModels,
|
|
@@ -6656,6 +6857,8 @@ export {
|
|
|
6656
6857
|
ioIntelligenceDefaultModelId,
|
|
6657
6858
|
ioIntelligenceModels,
|
|
6658
6859
|
ipcMessageSchema,
|
|
6860
|
+
isApiProviderError,
|
|
6861
|
+
isContextManagementEvent,
|
|
6659
6862
|
isCustomProvider,
|
|
6660
6863
|
isDynamicProvider,
|
|
6661
6864
|
isFauxProvider,
|
|
@@ -6744,6 +6947,7 @@ export {
|
|
|
6744
6947
|
serviceTierSchema,
|
|
6745
6948
|
serviceTiers,
|
|
6746
6949
|
shareResponseSchema,
|
|
6950
|
+
shouldReportApiErrorToTelemetry,
|
|
6747
6951
|
shouldUseSingleFileRead,
|
|
6748
6952
|
staticAppPropertiesSchema,
|
|
6749
6953
|
suggestionItemSchema,
|