@roo-code/types 1.89.0 → 1.91.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 +374 -153
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5357 -1430
- package/dist/index.d.ts +5357 -1430
- package/dist/index.js +364 -150
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ __export(index_exports, {
|
|
|
23
23
|
ANTHROPIC_DEFAULT_MAX_TOKENS: () => ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
24
24
|
ANTHROPIC_STYLE_PROVIDERS: () => ANTHROPIC_STYLE_PROVIDERS,
|
|
25
25
|
AWS_INFERENCE_PROFILE_MAPPING: () => AWS_INFERENCE_PROFILE_MAPPING,
|
|
26
|
+
ApiProviderError: () => ApiProviderError,
|
|
26
27
|
BEDROCK_1M_CONTEXT_MODEL_IDS: () => BEDROCK_1M_CONTEXT_MODEL_IDS,
|
|
27
28
|
BEDROCK_DEFAULT_CONTEXT: () => BEDROCK_DEFAULT_CONTEXT,
|
|
28
29
|
BEDROCK_DEFAULT_TEMPERATURE: () => BEDROCK_DEFAULT_TEMPERATURE,
|
|
@@ -32,6 +33,7 @@ __export(index_exports, {
|
|
|
32
33
|
CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS: () => CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
|
|
33
34
|
CODEBASE_INDEX_DEFAULTS: () => CODEBASE_INDEX_DEFAULTS,
|
|
34
35
|
CONSENT_COOKIE_NAME: () => CONSENT_COOKIE_NAME,
|
|
36
|
+
CONTEXT_MANAGEMENT_EVENTS: () => CONTEXT_MANAGEMENT_EVENTS,
|
|
35
37
|
COOKIE_CONSENT_EVENTS: () => COOKIE_CONSENT_EVENTS,
|
|
36
38
|
ConnectionState: () => ConnectionState,
|
|
37
39
|
DEEP_SEEK_DEFAULT_TEMPERATURE: () => DEEP_SEEK_DEFAULT_TEMPERATURE,
|
|
@@ -44,10 +46,10 @@ __export(index_exports, {
|
|
|
44
46
|
DOUBAO_API_CHAT_PATH: () => DOUBAO_API_CHAT_PATH,
|
|
45
47
|
EVALS_SETTINGS: () => EVALS_SETTINGS,
|
|
46
48
|
EVALS_TIMEOUT: () => EVALS_TIMEOUT,
|
|
49
|
+
EXPECTED_API_ERROR_CODES: () => EXPECTED_API_ERROR_CODES,
|
|
47
50
|
ExtensionBridgeCommandName: () => ExtensionBridgeCommandName,
|
|
48
51
|
ExtensionBridgeEventName: () => ExtensionBridgeEventName,
|
|
49
52
|
ExtensionSocketEvents: () => ExtensionSocketEvents,
|
|
50
|
-
GLAMA_DEFAULT_TEMPERATURE: () => GLAMA_DEFAULT_TEMPERATURE,
|
|
51
53
|
GLOBAL_SECRET_KEYS: () => GLOBAL_SECRET_KEYS,
|
|
52
54
|
GLOBAL_SETTINGS_KEYS: () => GLOBAL_SETTINGS_KEYS,
|
|
53
55
|
GLOBAL_STATE_KEYS: () => GLOBAL_STATE_KEYS,
|
|
@@ -131,6 +133,7 @@ __export(index_exports, {
|
|
|
131
133
|
commandExecutionStatusSchema: () => commandExecutionStatusSchema,
|
|
132
134
|
commandIds: () => commandIds,
|
|
133
135
|
contextCondenseSchema: () => contextCondenseSchema,
|
|
136
|
+
contextTruncationSchema: () => contextTruncationSchema,
|
|
134
137
|
convertModelNameForVertex: () => convertModelNameForVertex,
|
|
135
138
|
customModePromptsSchema: () => customModePromptsSchema,
|
|
136
139
|
customModesSettingsSchema: () => customModesSettingsSchema,
|
|
@@ -152,6 +155,7 @@ __export(index_exports, {
|
|
|
152
155
|
extensionBridgeCommandSchema: () => extensionBridgeCommandSchema,
|
|
153
156
|
extensionBridgeEventSchema: () => extensionBridgeEventSchema,
|
|
154
157
|
extensionInstanceSchema: () => extensionInstanceSchema,
|
|
158
|
+
extractApiProviderErrorProperties: () => extractApiProviderErrorProperties,
|
|
155
159
|
fauxProviders: () => fauxProviders,
|
|
156
160
|
featherlessDefaultModelId: () => featherlessDefaultModelId,
|
|
157
161
|
featherlessModels: () => featherlessModels,
|
|
@@ -163,12 +167,12 @@ __export(index_exports, {
|
|
|
163
167
|
getApiProtocol: () => getApiProtocol,
|
|
164
168
|
getClaudeCodeModelId: () => getClaudeCodeModelId,
|
|
165
169
|
getEffectiveProtocol: () => getEffectiveProtocol,
|
|
170
|
+
getErrorMessage: () => getErrorMessage,
|
|
171
|
+
getErrorStatusCode: () => getErrorStatusCode,
|
|
166
172
|
getImageGenerationProvider: () => getImageGenerationProvider,
|
|
167
173
|
getModelId: () => getModelId,
|
|
168
174
|
getProviderDefaultModelId: () => getProviderDefaultModelId,
|
|
169
175
|
gitPropertiesSchema: () => gitPropertiesSchema,
|
|
170
|
-
glamaDefaultModelId: () => glamaDefaultModelId,
|
|
171
|
-
glamaDefaultModelInfo: () => glamaDefaultModelInfo,
|
|
172
176
|
globalSettingsSchema: () => globalSettingsSchema,
|
|
173
177
|
groqDefaultModelId: () => groqDefaultModelId,
|
|
174
178
|
groqModels: () => groqModels,
|
|
@@ -185,6 +189,8 @@ __export(index_exports, {
|
|
|
185
189
|
ioIntelligenceDefaultModelId: () => ioIntelligenceDefaultModelId,
|
|
186
190
|
ioIntelligenceModels: () => ioIntelligenceModels,
|
|
187
191
|
ipcMessageSchema: () => ipcMessageSchema,
|
|
192
|
+
isApiProviderError: () => isApiProviderError,
|
|
193
|
+
isContextManagementEvent: () => isContextManagementEvent,
|
|
188
194
|
isCustomProvider: () => isCustomProvider,
|
|
189
195
|
isDynamicProvider: () => isDynamicProvider,
|
|
190
196
|
isFauxProvider: () => isFauxProvider,
|
|
@@ -273,6 +279,7 @@ __export(index_exports, {
|
|
|
273
279
|
serviceTierSchema: () => serviceTierSchema,
|
|
274
280
|
serviceTiers: () => serviceTiers,
|
|
275
281
|
shareResponseSchema: () => shareResponseSchema,
|
|
282
|
+
shouldReportApiErrorToTelemetry: () => shouldReportApiErrorToTelemetry,
|
|
276
283
|
shouldUseSingleFileRead: () => shouldUseSingleFileRead,
|
|
277
284
|
staticAppPropertiesSchema: () => staticAppPropertiesSchema,
|
|
278
285
|
suggestionItemSchema: () => suggestionItemSchema,
|
|
@@ -393,6 +400,7 @@ var clineSays = [
|
|
|
393
400
|
"diff_error",
|
|
394
401
|
"condense_context",
|
|
395
402
|
"condense_context_error",
|
|
403
|
+
"sliding_window_truncation",
|
|
396
404
|
"codebase_search_result",
|
|
397
405
|
"user_edit_todos"
|
|
398
406
|
];
|
|
@@ -405,7 +413,14 @@ var contextCondenseSchema = import_zod.z.object({
|
|
|
405
413
|
cost: import_zod.z.number(),
|
|
406
414
|
prevContextTokens: import_zod.z.number(),
|
|
407
415
|
newContextTokens: import_zod.z.number(),
|
|
408
|
-
summary: import_zod.z.string()
|
|
416
|
+
summary: import_zod.z.string(),
|
|
417
|
+
condenseId: import_zod.z.string().optional()
|
|
418
|
+
});
|
|
419
|
+
var contextTruncationSchema = import_zod.z.object({
|
|
420
|
+
truncationId: import_zod.z.string(),
|
|
421
|
+
messagesRemoved: import_zod.z.number(),
|
|
422
|
+
prevContextTokens: import_zod.z.number(),
|
|
423
|
+
newContextTokens: import_zod.z.number()
|
|
409
424
|
});
|
|
410
425
|
var clineMessageSchema = import_zod.z.object({
|
|
411
426
|
ts: import_zod.z.number(),
|
|
@@ -419,7 +434,16 @@ var clineMessageSchema = import_zod.z.object({
|
|
|
419
434
|
conversationHistoryIndex: import_zod.z.number().optional(),
|
|
420
435
|
checkpoint: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()).optional(),
|
|
421
436
|
progressStatus: toolProgressStatusSchema.optional(),
|
|
437
|
+
/**
|
|
438
|
+
* Data for successful context condensation.
|
|
439
|
+
* Present when `say: "condense_context"` and `partial: false`.
|
|
440
|
+
*/
|
|
422
441
|
contextCondense: contextCondenseSchema.optional(),
|
|
442
|
+
/**
|
|
443
|
+
* Data for sliding window truncation.
|
|
444
|
+
* Present when `say: "sliding_window_truncation"`.
|
|
445
|
+
*/
|
|
446
|
+
contextTruncation: contextTruncationSchema.optional(),
|
|
423
447
|
isProtected: import_zod.z.boolean().optional(),
|
|
424
448
|
apiProtocol: import_zod.z.union([import_zod.z.literal("openai"), import_zod.z.literal("anthropic")]).optional(),
|
|
425
449
|
isAnswered: import_zod.z.boolean().optional()
|
|
@@ -448,12 +472,11 @@ var toolNames = [
|
|
|
448
472
|
"read_file",
|
|
449
473
|
"write_to_file",
|
|
450
474
|
"apply_diff",
|
|
451
|
-
"insert_content",
|
|
452
475
|
"search_and_replace",
|
|
476
|
+
"search_replace",
|
|
453
477
|
"apply_patch",
|
|
454
478
|
"search_files",
|
|
455
479
|
"list_files",
|
|
456
|
-
"list_code_definition_names",
|
|
457
480
|
"browser_action",
|
|
458
481
|
"use_mcp_tool",
|
|
459
482
|
"access_mcp_resource",
|
|
@@ -568,7 +591,7 @@ var rooCodeEventsSchema = import_zod3.z.object({
|
|
|
568
591
|
["taskAskResponded" /* TaskAskResponded */]: import_zod3.z.tuple([import_zod3.z.string()]),
|
|
569
592
|
["taskUserMessage" /* TaskUserMessage */]: import_zod3.z.tuple([import_zod3.z.string()]),
|
|
570
593
|
["taskToolFailed" /* TaskToolFailed */]: import_zod3.z.tuple([import_zod3.z.string(), toolNamesSchema, import_zod3.z.string()]),
|
|
571
|
-
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: import_zod3.z.tuple([import_zod3.z.string(), tokenUsageSchema]),
|
|
594
|
+
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: import_zod3.z.tuple([import_zod3.z.string(), tokenUsageSchema, toolUsageSchema]),
|
|
572
595
|
["modeChanged" /* ModeChanged */]: import_zod3.z.tuple([import_zod3.z.string()]),
|
|
573
596
|
["providerProfileChanged" /* ProviderProfileChanged */]: import_zod3.z.tuple([import_zod3.z.object({ name: import_zod3.z.string(), provider: import_zod3.z.string() })])
|
|
574
597
|
});
|
|
@@ -722,9 +745,9 @@ var import_zod5 = require("zod");
|
|
|
722
745
|
var reasoningEfforts = ["low", "medium", "high"];
|
|
723
746
|
var reasoningEffortsSchema = import_zod5.z.enum(reasoningEfforts);
|
|
724
747
|
var reasoningEffortWithMinimalSchema = import_zod5.z.union([reasoningEffortsSchema, import_zod5.z.literal("minimal")]);
|
|
725
|
-
var reasoningEffortsExtended = ["none", "minimal", "low", "medium", "high"];
|
|
748
|
+
var reasoningEffortsExtended = ["none", "minimal", "low", "medium", "high", "xhigh"];
|
|
726
749
|
var reasoningEffortExtendedSchema = import_zod5.z.enum(reasoningEffortsExtended);
|
|
727
|
-
var reasoningEffortSettingValues = ["disable", "none", "minimal", "low", "medium", "high"];
|
|
750
|
+
var reasoningEffortSettingValues = ["disable", "none", "minimal", "low", "medium", "high", "xhigh"];
|
|
728
751
|
var reasoningEffortSettingSchema = import_zod5.z.enum(reasoningEffortSettingValues);
|
|
729
752
|
var verbosityLevels = ["low", "medium", "high"];
|
|
730
753
|
var verbosityLevelsSchema = import_zod5.z.enum(verbosityLevels);
|
|
@@ -752,7 +775,7 @@ var modelInfoSchema = import_zod5.z.object({
|
|
|
752
775
|
supportsTemperature: import_zod5.z.boolean().optional(),
|
|
753
776
|
defaultTemperature: import_zod5.z.number().optional(),
|
|
754
777
|
requiredReasoningBudget: import_zod5.z.boolean().optional(),
|
|
755
|
-
supportsReasoningEffort: import_zod5.z.union([import_zod5.z.boolean(), import_zod5.z.array(import_zod5.z.enum(["disable", "none", "minimal", "low", "medium", "high"]))]).optional(),
|
|
778
|
+
supportsReasoningEffort: import_zod5.z.union([import_zod5.z.boolean(), import_zod5.z.array(import_zod5.z.enum(["disable", "none", "minimal", "low", "medium", "high", "xhigh"]))]).optional(),
|
|
756
779
|
requiredReasoningEffort: import_zod5.z.boolean().optional(),
|
|
757
780
|
preserveReasoning: import_zod5.z.boolean().optional(),
|
|
758
781
|
supportedParameters: import_zod5.z.array(modelParametersSchema).optional(),
|
|
@@ -768,6 +791,8 @@ var modelInfoSchema = import_zod5.z.object({
|
|
|
768
791
|
cachableFields: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
769
792
|
// Flag to indicate if the model is deprecated and should not be used
|
|
770
793
|
deprecated: import_zod5.z.boolean().optional(),
|
|
794
|
+
// Flag to indicate if the model should hide vendor/company identity in responses
|
|
795
|
+
isStealthModel: import_zod5.z.boolean().optional(),
|
|
771
796
|
// Flag to indicate if the model is free (no cost)
|
|
772
797
|
isFree: import_zod5.z.boolean().optional(),
|
|
773
798
|
// Flag to indicate if the model supports native tool calling (OpenAI-style function calling)
|
|
@@ -834,7 +859,9 @@ var codebaseIndexConfigSchema = import_zod6.z.object({
|
|
|
834
859
|
codebaseIndexOpenAiCompatibleModelDimension: import_zod6.z.number().optional(),
|
|
835
860
|
// Bedrock specific fields
|
|
836
861
|
codebaseIndexBedrockRegion: import_zod6.z.string().optional(),
|
|
837
|
-
codebaseIndexBedrockProfile: import_zod6.z.string().optional()
|
|
862
|
+
codebaseIndexBedrockProfile: import_zod6.z.string().optional(),
|
|
863
|
+
// OpenRouter specific fields
|
|
864
|
+
codebaseIndexOpenRouterSpecificProvider: import_zod6.z.string().optional()
|
|
838
865
|
});
|
|
839
866
|
var codebaseIndexModelsSchema = import_zod6.z.object({
|
|
840
867
|
openai: import_zod6.z.record(import_zod6.z.string(), import_zod6.z.object({ dimension: import_zod6.z.number() })).optional(),
|
|
@@ -1079,7 +1106,7 @@ var ANTHROPIC_DEFAULT_MAX_TOKENS = 8192;
|
|
|
1079
1106
|
// src/providers/baseten.ts
|
|
1080
1107
|
var basetenModels = {
|
|
1081
1108
|
"moonshotai/Kimi-K2-Thinking": {
|
|
1082
|
-
maxTokens:
|
|
1109
|
+
maxTokens: 16384,
|
|
1083
1110
|
contextWindow: 262e3,
|
|
1084
1111
|
supportsImages: false,
|
|
1085
1112
|
supportsPromptCache: false,
|
|
@@ -1091,7 +1118,7 @@ var basetenModels = {
|
|
|
1091
1118
|
description: "Kimi K2 Thinking - A model with enhanced reasoning capabilities from Kimi K2"
|
|
1092
1119
|
},
|
|
1093
1120
|
"zai-org/GLM-4.6": {
|
|
1094
|
-
maxTokens:
|
|
1121
|
+
maxTokens: 16384,
|
|
1095
1122
|
contextWindow: 2e5,
|
|
1096
1123
|
supportsImages: false,
|
|
1097
1124
|
supportsPromptCache: false,
|
|
@@ -1103,7 +1130,7 @@ var basetenModels = {
|
|
|
1103
1130
|
description: "Frontier open model with advanced agentic, reasoning and coding capabilities"
|
|
1104
1131
|
},
|
|
1105
1132
|
"deepseek-ai/DeepSeek-R1": {
|
|
1106
|
-
maxTokens:
|
|
1133
|
+
maxTokens: 16384,
|
|
1107
1134
|
contextWindow: 163840,
|
|
1108
1135
|
supportsImages: false,
|
|
1109
1136
|
supportsPromptCache: false,
|
|
@@ -1114,7 +1141,7 @@ var basetenModels = {
|
|
|
1114
1141
|
description: "DeepSeek's first-generation reasoning model"
|
|
1115
1142
|
},
|
|
1116
1143
|
"deepseek-ai/DeepSeek-R1-0528": {
|
|
1117
|
-
maxTokens:
|
|
1144
|
+
maxTokens: 16384,
|
|
1118
1145
|
contextWindow: 163840,
|
|
1119
1146
|
supportsImages: false,
|
|
1120
1147
|
supportsPromptCache: false,
|
|
@@ -1125,7 +1152,7 @@ var basetenModels = {
|
|
|
1125
1152
|
description: "The latest revision of DeepSeek's first-generation reasoning model"
|
|
1126
1153
|
},
|
|
1127
1154
|
"deepseek-ai/DeepSeek-V3-0324": {
|
|
1128
|
-
maxTokens:
|
|
1155
|
+
maxTokens: 16384,
|
|
1129
1156
|
contextWindow: 163840,
|
|
1130
1157
|
supportsImages: false,
|
|
1131
1158
|
supportsPromptCache: false,
|
|
@@ -1136,7 +1163,7 @@ var basetenModels = {
|
|
|
1136
1163
|
description: "Fast general-purpose LLM with enhanced reasoning capabilities"
|
|
1137
1164
|
},
|
|
1138
1165
|
"deepseek-ai/DeepSeek-V3.1": {
|
|
1139
|
-
maxTokens:
|
|
1166
|
+
maxTokens: 16384,
|
|
1140
1167
|
contextWindow: 163840,
|
|
1141
1168
|
supportsImages: false,
|
|
1142
1169
|
supportsPromptCache: false,
|
|
@@ -1146,8 +1173,20 @@ var basetenModels = {
|
|
|
1146
1173
|
cacheReadsPrice: 0,
|
|
1147
1174
|
description: "Extremely capable general-purpose LLM with hybrid reasoning capabilities and advanced tool calling"
|
|
1148
1175
|
},
|
|
1176
|
+
"deepseek-ai/DeepSeek-V3.2": {
|
|
1177
|
+
maxTokens: 16384,
|
|
1178
|
+
contextWindow: 163840,
|
|
1179
|
+
supportsImages: false,
|
|
1180
|
+
supportsPromptCache: false,
|
|
1181
|
+
supportsNativeTools: true,
|
|
1182
|
+
inputPrice: 0.3,
|
|
1183
|
+
outputPrice: 0.45,
|
|
1184
|
+
cacheWritesPrice: 0,
|
|
1185
|
+
cacheReadsPrice: 0,
|
|
1186
|
+
description: "DeepSeek's hybrid reasoning model with efficient long context scaling with GPT-5 level performance"
|
|
1187
|
+
},
|
|
1149
1188
|
"Qwen/Qwen3-235B-A22B-Instruct-2507": {
|
|
1150
|
-
maxTokens:
|
|
1189
|
+
maxTokens: 16384,
|
|
1151
1190
|
contextWindow: 262144,
|
|
1152
1191
|
supportsImages: false,
|
|
1153
1192
|
supportsPromptCache: false,
|
|
@@ -1158,7 +1197,7 @@ var basetenModels = {
|
|
|
1158
1197
|
description: "Mixture-of-experts LLM with math and reasoning capabilities"
|
|
1159
1198
|
},
|
|
1160
1199
|
"Qwen/Qwen3-Coder-480B-A35B-Instruct": {
|
|
1161
|
-
maxTokens:
|
|
1200
|
+
maxTokens: 16384,
|
|
1162
1201
|
contextWindow: 262144,
|
|
1163
1202
|
supportsImages: false,
|
|
1164
1203
|
supportsPromptCache: false,
|
|
@@ -1169,7 +1208,7 @@ var basetenModels = {
|
|
|
1169
1208
|
description: "Mixture-of-experts LLM with advanced coding and reasoning capabilities"
|
|
1170
1209
|
},
|
|
1171
1210
|
"openai/gpt-oss-120b": {
|
|
1172
|
-
maxTokens:
|
|
1211
|
+
maxTokens: 16384,
|
|
1173
1212
|
contextWindow: 128072,
|
|
1174
1213
|
supportsImages: false,
|
|
1175
1214
|
supportsPromptCache: false,
|
|
@@ -1181,7 +1220,7 @@ var basetenModels = {
|
|
|
1181
1220
|
description: "Extremely capable general-purpose LLM with strong, controllable reasoning capabilities"
|
|
1182
1221
|
},
|
|
1183
1222
|
"moonshotai/Kimi-K2-Instruct-0905": {
|
|
1184
|
-
maxTokens:
|
|
1223
|
+
maxTokens: 16384,
|
|
1185
1224
|
contextWindow: 262e3,
|
|
1186
1225
|
supportsImages: false,
|
|
1187
1226
|
supportsPromptCache: false,
|
|
@@ -1634,6 +1673,52 @@ var bedrockModels = {
|
|
|
1634
1673
|
supportsPromptCache: false,
|
|
1635
1674
|
inputPrice: 0.02,
|
|
1636
1675
|
description: "Amazon Titan Text Embeddings V2"
|
|
1676
|
+
},
|
|
1677
|
+
"moonshot.kimi-k2-thinking": {
|
|
1678
|
+
maxTokens: 32e3,
|
|
1679
|
+
contextWindow: 262144,
|
|
1680
|
+
supportsImages: false,
|
|
1681
|
+
supportsPromptCache: false,
|
|
1682
|
+
supportsNativeTools: true,
|
|
1683
|
+
defaultToolProtocol: "native",
|
|
1684
|
+
preserveReasoning: true,
|
|
1685
|
+
inputPrice: 0.6,
|
|
1686
|
+
outputPrice: 2.5,
|
|
1687
|
+
description: "Kimi K2 Thinking (1T parameter MoE model with 32B active parameters)"
|
|
1688
|
+
},
|
|
1689
|
+
"minimax.minimax-m2": {
|
|
1690
|
+
maxTokens: 16384,
|
|
1691
|
+
contextWindow: 196608,
|
|
1692
|
+
supportsImages: false,
|
|
1693
|
+
supportsPromptCache: false,
|
|
1694
|
+
supportsNativeTools: true,
|
|
1695
|
+
defaultToolProtocol: "native",
|
|
1696
|
+
preserveReasoning: true,
|
|
1697
|
+
inputPrice: 0.3,
|
|
1698
|
+
outputPrice: 1.2,
|
|
1699
|
+
description: "MiniMax M2 (230B parameter MoE model with 10B active parameters)"
|
|
1700
|
+
},
|
|
1701
|
+
"qwen.qwen3-next-80b-a3b": {
|
|
1702
|
+
maxTokens: 8192,
|
|
1703
|
+
contextWindow: 262144,
|
|
1704
|
+
supportsImages: false,
|
|
1705
|
+
supportsPromptCache: false,
|
|
1706
|
+
supportsNativeTools: true,
|
|
1707
|
+
defaultToolProtocol: "native",
|
|
1708
|
+
inputPrice: 0.15,
|
|
1709
|
+
outputPrice: 1.2,
|
|
1710
|
+
description: "Qwen3 Next 80B (MoE model with 3B active parameters)"
|
|
1711
|
+
},
|
|
1712
|
+
"qwen.qwen3-coder-480b-a35b-v1:0": {
|
|
1713
|
+
maxTokens: 8192,
|
|
1714
|
+
contextWindow: 262144,
|
|
1715
|
+
supportsImages: false,
|
|
1716
|
+
supportsPromptCache: false,
|
|
1717
|
+
supportsNativeTools: true,
|
|
1718
|
+
defaultToolProtocol: "native",
|
|
1719
|
+
inputPrice: 0.45,
|
|
1720
|
+
outputPrice: 1.8,
|
|
1721
|
+
description: "Qwen3 Coder 480B (MoE model with 35B active parameters)"
|
|
1637
1722
|
}
|
|
1638
1723
|
};
|
|
1639
1724
|
var BEDROCK_DEFAULT_TEMPERATURE = 0.3;
|
|
@@ -1699,8 +1784,8 @@ var BEDROCK_GLOBAL_INFERENCE_MODEL_IDS = [
|
|
|
1699
1784
|
var cerebrasDefaultModelId = "gpt-oss-120b";
|
|
1700
1785
|
var cerebrasModels = {
|
|
1701
1786
|
"zai-glm-4.6": {
|
|
1702
|
-
maxTokens:
|
|
1703
|
-
//
|
|
1787
|
+
maxTokens: 8192,
|
|
1788
|
+
// Conservative default to avoid premature rate limiting (Cerebras reserves quota upfront)
|
|
1704
1789
|
contextWindow: 131072,
|
|
1705
1790
|
supportsImages: false,
|
|
1706
1791
|
supportsPromptCache: false,
|
|
@@ -1710,7 +1795,8 @@ var cerebrasModels = {
|
|
|
1710
1795
|
description: "Highly intelligent general purpose model with up to 1,000 tokens/s"
|
|
1711
1796
|
},
|
|
1712
1797
|
"qwen-3-235b-a22b-instruct-2507": {
|
|
1713
|
-
maxTokens:
|
|
1798
|
+
maxTokens: 8192,
|
|
1799
|
+
// Conservative default to avoid premature rate limiting
|
|
1714
1800
|
contextWindow: 64e3,
|
|
1715
1801
|
supportsImages: false,
|
|
1716
1802
|
supportsPromptCache: false,
|
|
@@ -1720,7 +1806,8 @@ var cerebrasModels = {
|
|
|
1720
1806
|
description: "Intelligent model with ~1400 tokens/s"
|
|
1721
1807
|
},
|
|
1722
1808
|
"llama-3.3-70b": {
|
|
1723
|
-
maxTokens:
|
|
1809
|
+
maxTokens: 8192,
|
|
1810
|
+
// Conservative default to avoid premature rate limiting
|
|
1724
1811
|
contextWindow: 64e3,
|
|
1725
1812
|
supportsImages: false,
|
|
1726
1813
|
supportsPromptCache: false,
|
|
@@ -1730,7 +1817,8 @@ var cerebrasModels = {
|
|
|
1730
1817
|
description: "Powerful model with ~2600 tokens/s"
|
|
1731
1818
|
},
|
|
1732
1819
|
"qwen-3-32b": {
|
|
1733
|
-
maxTokens:
|
|
1820
|
+
maxTokens: 8192,
|
|
1821
|
+
// Conservative default to avoid premature rate limiting
|
|
1734
1822
|
contextWindow: 64e3,
|
|
1735
1823
|
supportsImages: false,
|
|
1736
1824
|
supportsPromptCache: false,
|
|
@@ -1740,7 +1828,8 @@ var cerebrasModels = {
|
|
|
1740
1828
|
description: "SOTA coding performance with ~2500 tokens/s"
|
|
1741
1829
|
},
|
|
1742
1830
|
"gpt-oss-120b": {
|
|
1743
|
-
maxTokens:
|
|
1831
|
+
maxTokens: 8192,
|
|
1832
|
+
// Conservative default to avoid premature rate limiting
|
|
1744
1833
|
contextWindow: 64e3,
|
|
1745
1834
|
supportsImages: false,
|
|
1746
1835
|
supportsPromptCache: false,
|
|
@@ -2265,35 +2354,37 @@ var deepSeekModels = {
|
|
|
2265
2354
|
supportsImages: false,
|
|
2266
2355
|
supportsPromptCache: true,
|
|
2267
2356
|
supportsNativeTools: true,
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2357
|
+
defaultToolProtocol: "native",
|
|
2358
|
+
inputPrice: 0.28,
|
|
2359
|
+
// $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
|
|
2360
|
+
outputPrice: 0.42,
|
|
2361
|
+
// $0.42 per million tokens - Updated Dec 9, 2025
|
|
2362
|
+
cacheWritesPrice: 0.28,
|
|
2363
|
+
// $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
|
|
2364
|
+
cacheReadsPrice: 0.028,
|
|
2365
|
+
// $0.028 per million tokens (cache hit) - Updated Dec 9, 2025
|
|
2366
|
+
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).`
|
|
2277
2367
|
},
|
|
2278
2368
|
"deepseek-reasoner": {
|
|
2279
|
-
maxTokens:
|
|
2280
|
-
//
|
|
2369
|
+
maxTokens: 8192,
|
|
2370
|
+
// 8K max output
|
|
2281
2371
|
contextWindow: 128e3,
|
|
2282
2372
|
supportsImages: false,
|
|
2283
2373
|
supportsPromptCache: true,
|
|
2284
2374
|
supportsNativeTools: true,
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2375
|
+
defaultToolProtocol: "native",
|
|
2376
|
+
inputPrice: 0.28,
|
|
2377
|
+
// $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
|
|
2378
|
+
outputPrice: 0.42,
|
|
2379
|
+
// $0.42 per million tokens - Updated Dec 9, 2025
|
|
2380
|
+
cacheWritesPrice: 0.28,
|
|
2381
|
+
// $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
|
|
2382
|
+
cacheReadsPrice: 0.028,
|
|
2383
|
+
// $0.028 per million tokens (cache hit) - Updated Dec 9, 2025
|
|
2384
|
+
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).`
|
|
2294
2385
|
}
|
|
2295
2386
|
};
|
|
2296
|
-
var DEEP_SEEK_DEFAULT_TEMPERATURE = 0
|
|
2387
|
+
var DEEP_SEEK_DEFAULT_TEMPERATURE = 0;
|
|
2297
2388
|
|
|
2298
2389
|
// src/providers/doubao.ts
|
|
2299
2390
|
var doubaoDefaultModelId = "doubao-seed-1-6-250615";
|
|
@@ -2748,21 +2839,6 @@ var geminiModels = {
|
|
|
2748
2839
|
}
|
|
2749
2840
|
};
|
|
2750
2841
|
|
|
2751
|
-
// src/providers/glama.ts
|
|
2752
|
-
var glamaDefaultModelId = "anthropic/claude-3-7-sonnet";
|
|
2753
|
-
var glamaDefaultModelInfo = {
|
|
2754
|
-
maxTokens: 8192,
|
|
2755
|
-
contextWindow: 2e5,
|
|
2756
|
-
supportsImages: true,
|
|
2757
|
-
supportsPromptCache: true,
|
|
2758
|
-
inputPrice: 3,
|
|
2759
|
-
outputPrice: 15,
|
|
2760
|
-
cacheWritesPrice: 3.75,
|
|
2761
|
-
cacheReadsPrice: 0.3,
|
|
2762
|
-
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)"
|
|
2763
|
-
};
|
|
2764
|
-
var GLAMA_DEFAULT_TEMPERATURE = 0;
|
|
2765
|
-
|
|
2766
2842
|
// src/providers/groq.ts
|
|
2767
2843
|
var groqDefaultModelId = "moonshotai/kimi-k2-instruct-0905";
|
|
2768
2844
|
var groqModels = {
|
|
@@ -2943,6 +3019,7 @@ var litellmDefaultModelInfo = {
|
|
|
2943
3019
|
contextWindow: 2e5,
|
|
2944
3020
|
supportsImages: true,
|
|
2945
3021
|
supportsPromptCache: true,
|
|
3022
|
+
supportsNativeTools: true,
|
|
2946
3023
|
inputPrice: 3,
|
|
2947
3024
|
outputPrice: 15,
|
|
2948
3025
|
cacheWritesPrice: 3.75,
|
|
@@ -3139,12 +3216,67 @@ var ollamaDefaultModelInfo = {
|
|
|
3139
3216
|
};
|
|
3140
3217
|
|
|
3141
3218
|
// src/providers/openai.ts
|
|
3142
|
-
var openAiNativeDefaultModelId = "gpt-5.1";
|
|
3219
|
+
var openAiNativeDefaultModelId = "gpt-5.1-codex-max";
|
|
3143
3220
|
var openAiNativeModels = {
|
|
3221
|
+
"gpt-5.1-codex-max": {
|
|
3222
|
+
maxTokens: 128e3,
|
|
3223
|
+
contextWindow: 4e5,
|
|
3224
|
+
supportsNativeTools: true,
|
|
3225
|
+
includedTools: ["apply_patch"],
|
|
3226
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3227
|
+
supportsImages: true,
|
|
3228
|
+
supportsPromptCache: true,
|
|
3229
|
+
promptCacheRetention: "24h",
|
|
3230
|
+
supportsReasoningEffort: ["low", "medium", "high", "xhigh"],
|
|
3231
|
+
reasoningEffort: "xhigh",
|
|
3232
|
+
inputPrice: 1.25,
|
|
3233
|
+
outputPrice: 10,
|
|
3234
|
+
cacheReadsPrice: 0.125,
|
|
3235
|
+
supportsTemperature: false,
|
|
3236
|
+
tiers: [{ name: "priority", contextWindow: 4e5, inputPrice: 2.5, outputPrice: 20, cacheReadsPrice: 0.25 }],
|
|
3237
|
+
description: "GPT-5.1 Codex Max: Our most intelligent coding model optimized for long-horizon, agentic coding tasks"
|
|
3238
|
+
},
|
|
3239
|
+
"gpt-5.2": {
|
|
3240
|
+
maxTokens: 128e3,
|
|
3241
|
+
contextWindow: 4e5,
|
|
3242
|
+
supportsNativeTools: true,
|
|
3243
|
+
includedTools: ["apply_patch"],
|
|
3244
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3245
|
+
supportsImages: true,
|
|
3246
|
+
supportsPromptCache: true,
|
|
3247
|
+
promptCacheRetention: "24h",
|
|
3248
|
+
supportsReasoningEffort: ["none", "low", "medium", "high", "xhigh"],
|
|
3249
|
+
reasoningEffort: "medium",
|
|
3250
|
+
inputPrice: 1.75,
|
|
3251
|
+
outputPrice: 14,
|
|
3252
|
+
cacheReadsPrice: 0.175,
|
|
3253
|
+
supportsVerbosity: true,
|
|
3254
|
+
supportsTemperature: false,
|
|
3255
|
+
tiers: [
|
|
3256
|
+
{ name: "flex", contextWindow: 4e5, inputPrice: 0.875, outputPrice: 7, cacheReadsPrice: 0.0875 },
|
|
3257
|
+
{ name: "priority", contextWindow: 4e5, inputPrice: 3.5, outputPrice: 28, cacheReadsPrice: 0.35 }
|
|
3258
|
+
],
|
|
3259
|
+
description: "GPT-5.2: Our flagship model for coding and agentic tasks across industries"
|
|
3260
|
+
},
|
|
3261
|
+
"gpt-5.2-chat-latest": {
|
|
3262
|
+
maxTokens: 16384,
|
|
3263
|
+
contextWindow: 128e3,
|
|
3264
|
+
supportsNativeTools: true,
|
|
3265
|
+
includedTools: ["apply_patch"],
|
|
3266
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3267
|
+
supportsImages: true,
|
|
3268
|
+
supportsPromptCache: true,
|
|
3269
|
+
inputPrice: 1.75,
|
|
3270
|
+
outputPrice: 14,
|
|
3271
|
+
cacheReadsPrice: 0.175,
|
|
3272
|
+
description: "GPT-5.2 Chat: Optimized for conversational AI and chat use cases"
|
|
3273
|
+
},
|
|
3144
3274
|
"gpt-5.1": {
|
|
3145
3275
|
maxTokens: 128e3,
|
|
3146
3276
|
contextWindow: 4e5,
|
|
3147
3277
|
supportsNativeTools: true,
|
|
3278
|
+
includedTools: ["apply_patch"],
|
|
3279
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3148
3280
|
supportsImages: true,
|
|
3149
3281
|
supportsPromptCache: true,
|
|
3150
3282
|
promptCacheRetention: "24h",
|
|
@@ -3165,6 +3297,8 @@ var openAiNativeModels = {
|
|
|
3165
3297
|
maxTokens: 128e3,
|
|
3166
3298
|
contextWindow: 4e5,
|
|
3167
3299
|
supportsNativeTools: true,
|
|
3300
|
+
includedTools: ["apply_patch"],
|
|
3301
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3168
3302
|
supportsImages: true,
|
|
3169
3303
|
supportsPromptCache: true,
|
|
3170
3304
|
promptCacheRetention: "24h",
|
|
@@ -3181,6 +3315,8 @@ var openAiNativeModels = {
|
|
|
3181
3315
|
maxTokens: 128e3,
|
|
3182
3316
|
contextWindow: 4e5,
|
|
3183
3317
|
supportsNativeTools: true,
|
|
3318
|
+
includedTools: ["apply_patch"],
|
|
3319
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3184
3320
|
supportsImages: true,
|
|
3185
3321
|
supportsPromptCache: true,
|
|
3186
3322
|
promptCacheRetention: "24h",
|
|
@@ -3196,6 +3332,8 @@ var openAiNativeModels = {
|
|
|
3196
3332
|
maxTokens: 128e3,
|
|
3197
3333
|
contextWindow: 4e5,
|
|
3198
3334
|
supportsNativeTools: true,
|
|
3335
|
+
includedTools: ["apply_patch"],
|
|
3336
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3199
3337
|
supportsImages: true,
|
|
3200
3338
|
supportsPromptCache: true,
|
|
3201
3339
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -3215,6 +3353,8 @@ var openAiNativeModels = {
|
|
|
3215
3353
|
maxTokens: 128e3,
|
|
3216
3354
|
contextWindow: 4e5,
|
|
3217
3355
|
supportsNativeTools: true,
|
|
3356
|
+
includedTools: ["apply_patch"],
|
|
3357
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3218
3358
|
supportsImages: true,
|
|
3219
3359
|
supportsPromptCache: true,
|
|
3220
3360
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -3234,6 +3374,8 @@ var openAiNativeModels = {
|
|
|
3234
3374
|
maxTokens: 128e3,
|
|
3235
3375
|
contextWindow: 4e5,
|
|
3236
3376
|
supportsNativeTools: true,
|
|
3377
|
+
includedTools: ["apply_patch"],
|
|
3378
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3237
3379
|
supportsImages: true,
|
|
3238
3380
|
supportsPromptCache: true,
|
|
3239
3381
|
supportsReasoningEffort: ["low", "medium", "high"],
|
|
@@ -3249,6 +3391,8 @@ var openAiNativeModels = {
|
|
|
3249
3391
|
maxTokens: 128e3,
|
|
3250
3392
|
contextWindow: 4e5,
|
|
3251
3393
|
supportsNativeTools: true,
|
|
3394
|
+
includedTools: ["apply_patch"],
|
|
3395
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3252
3396
|
supportsImages: true,
|
|
3253
3397
|
supportsPromptCache: true,
|
|
3254
3398
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -3265,6 +3409,8 @@ var openAiNativeModels = {
|
|
|
3265
3409
|
maxTokens: 128e3,
|
|
3266
3410
|
contextWindow: 4e5,
|
|
3267
3411
|
supportsNativeTools: true,
|
|
3412
|
+
includedTools: ["apply_patch"],
|
|
3413
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3268
3414
|
supportsImages: true,
|
|
3269
3415
|
supportsPromptCache: true,
|
|
3270
3416
|
inputPrice: 1.25,
|
|
@@ -3276,6 +3422,8 @@ var openAiNativeModels = {
|
|
|
3276
3422
|
maxTokens: 32768,
|
|
3277
3423
|
contextWindow: 1047576,
|
|
3278
3424
|
supportsNativeTools: true,
|
|
3425
|
+
includedTools: ["apply_patch"],
|
|
3426
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3279
3427
|
supportsImages: true,
|
|
3280
3428
|
supportsPromptCache: true,
|
|
3281
3429
|
inputPrice: 2,
|
|
@@ -3290,6 +3438,8 @@ var openAiNativeModels = {
|
|
|
3290
3438
|
maxTokens: 32768,
|
|
3291
3439
|
contextWindow: 1047576,
|
|
3292
3440
|
supportsNativeTools: true,
|
|
3441
|
+
includedTools: ["apply_patch"],
|
|
3442
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3293
3443
|
supportsImages: true,
|
|
3294
3444
|
supportsPromptCache: true,
|
|
3295
3445
|
inputPrice: 0.4,
|
|
@@ -3304,6 +3454,8 @@ var openAiNativeModels = {
|
|
|
3304
3454
|
maxTokens: 32768,
|
|
3305
3455
|
contextWindow: 1047576,
|
|
3306
3456
|
supportsNativeTools: true,
|
|
3457
|
+
includedTools: ["apply_patch"],
|
|
3458
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3307
3459
|
supportsImages: true,
|
|
3308
3460
|
supportsPromptCache: true,
|
|
3309
3461
|
inputPrice: 0.1,
|
|
@@ -3511,6 +3663,8 @@ var openAiNativeModels = {
|
|
|
3511
3663
|
maxTokens: 128e3,
|
|
3512
3664
|
contextWindow: 4e5,
|
|
3513
3665
|
supportsNativeTools: true,
|
|
3666
|
+
includedTools: ["apply_patch"],
|
|
3667
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3514
3668
|
supportsImages: true,
|
|
3515
3669
|
supportsPromptCache: true,
|
|
3516
3670
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -3530,6 +3684,8 @@ var openAiNativeModels = {
|
|
|
3530
3684
|
maxTokens: 128e3,
|
|
3531
3685
|
contextWindow: 4e5,
|
|
3532
3686
|
supportsNativeTools: true,
|
|
3687
|
+
includedTools: ["apply_patch"],
|
|
3688
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3533
3689
|
supportsImages: true,
|
|
3534
3690
|
supportsPromptCache: true,
|
|
3535
3691
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -3549,6 +3705,8 @@ var openAiNativeModels = {
|
|
|
3549
3705
|
maxTokens: 128e3,
|
|
3550
3706
|
contextWindow: 4e5,
|
|
3551
3707
|
supportsNativeTools: true,
|
|
3708
|
+
includedTools: ["apply_patch"],
|
|
3709
|
+
excludedTools: ["apply_diff", "write_to_file"],
|
|
3552
3710
|
supportsImages: true,
|
|
3553
3711
|
supportsPromptCache: true,
|
|
3554
3712
|
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
@@ -3711,7 +3869,18 @@ var RooModelSchema = import_zod7.z.object({
|
|
|
3711
3869
|
type: import_zod7.z.literal("language"),
|
|
3712
3870
|
tags: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
3713
3871
|
pricing: RooPricingSchema,
|
|
3714
|
-
deprecated: import_zod7.z.boolean().optional()
|
|
3872
|
+
deprecated: import_zod7.z.boolean().optional(),
|
|
3873
|
+
default_temperature: import_zod7.z.number().optional(),
|
|
3874
|
+
// Dynamic settings that map directly to ModelInfo properties
|
|
3875
|
+
// Allows the API to configure model-specific defaults like includedTools, excludedTools, reasoningEffort, etc.
|
|
3876
|
+
// These are always direct values (e.g., includedTools: ['search_replace']) for backward compatibility with old clients.
|
|
3877
|
+
settings: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.unknown()).optional(),
|
|
3878
|
+
// Versioned settings keyed by version number (e.g., '3.36.4').
|
|
3879
|
+
// Each version key maps to a settings object that is used when plugin version >= that version.
|
|
3880
|
+
// New clients find the highest version key <= current version and use those settings.
|
|
3881
|
+
// Old clients ignore this field and use plain values from `settings`.
|
|
3882
|
+
// Example: { '3.36.4': { includedTools: ['search_replace'] }, '3.35.0': { ... } }
|
|
3883
|
+
versionedSettings: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.record(import_zod7.z.string(), import_zod7.z.unknown())).optional()
|
|
3715
3884
|
});
|
|
3716
3885
|
var RooModelsResponseSchema = import_zod7.z.object({
|
|
3717
3886
|
object: import_zod7.z.literal("list"),
|
|
@@ -4477,15 +4646,17 @@ var xaiDefaultModelId = "grok-code-fast-1";
|
|
|
4477
4646
|
var xaiModels = {
|
|
4478
4647
|
"grok-code-fast-1": {
|
|
4479
4648
|
maxTokens: 16384,
|
|
4480
|
-
contextWindow:
|
|
4481
|
-
supportsImages:
|
|
4649
|
+
contextWindow: 256e3,
|
|
4650
|
+
supportsImages: true,
|
|
4482
4651
|
supportsPromptCache: true,
|
|
4483
4652
|
supportsNativeTools: true,
|
|
4484
4653
|
inputPrice: 0.2,
|
|
4485
4654
|
outputPrice: 1.5,
|
|
4486
4655
|
cacheWritesPrice: 0.02,
|
|
4487
4656
|
cacheReadsPrice: 0.02,
|
|
4488
|
-
description: "xAI's Grok Code Fast model with 256K context window"
|
|
4657
|
+
description: "xAI's Grok Code Fast model with 256K context window",
|
|
4658
|
+
includedTools: ["search_replace"],
|
|
4659
|
+
excludedTools: ["apply_diff"]
|
|
4489
4660
|
},
|
|
4490
4661
|
"grok-4-1-fast-reasoning": {
|
|
4491
4662
|
maxTokens: 65536,
|
|
@@ -4497,7 +4668,9 @@ var xaiModels = {
|
|
|
4497
4668
|
outputPrice: 0.5,
|
|
4498
4669
|
cacheWritesPrice: 0.05,
|
|
4499
4670
|
cacheReadsPrice: 0.05,
|
|
4500
|
-
description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning"
|
|
4671
|
+
description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning",
|
|
4672
|
+
includedTools: ["search_replace"],
|
|
4673
|
+
excludedTools: ["apply_diff"]
|
|
4501
4674
|
},
|
|
4502
4675
|
"grok-4-1-fast-non-reasoning": {
|
|
4503
4676
|
maxTokens: 65536,
|
|
@@ -4509,7 +4682,9 @@ var xaiModels = {
|
|
|
4509
4682
|
outputPrice: 0.5,
|
|
4510
4683
|
cacheWritesPrice: 0.05,
|
|
4511
4684
|
cacheReadsPrice: 0.05,
|
|
4512
|
-
description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling"
|
|
4685
|
+
description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling",
|
|
4686
|
+
includedTools: ["search_replace"],
|
|
4687
|
+
excludedTools: ["apply_diff"]
|
|
4513
4688
|
},
|
|
4514
4689
|
"grok-4-fast-reasoning": {
|
|
4515
4690
|
maxTokens: 65536,
|
|
@@ -4521,7 +4696,9 @@ var xaiModels = {
|
|
|
4521
4696
|
outputPrice: 0.5,
|
|
4522
4697
|
cacheWritesPrice: 0.05,
|
|
4523
4698
|
cacheReadsPrice: 0.05,
|
|
4524
|
-
description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning"
|
|
4699
|
+
description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning",
|
|
4700
|
+
includedTools: ["search_replace"],
|
|
4701
|
+
excludedTools: ["apply_diff"]
|
|
4525
4702
|
},
|
|
4526
4703
|
"grok-4-fast-non-reasoning": {
|
|
4527
4704
|
maxTokens: 65536,
|
|
@@ -4533,9 +4710,11 @@ var xaiModels = {
|
|
|
4533
4710
|
outputPrice: 0.5,
|
|
4534
4711
|
cacheWritesPrice: 0.05,
|
|
4535
4712
|
cacheReadsPrice: 0.05,
|
|
4536
|
-
description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling"
|
|
4713
|
+
description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling",
|
|
4714
|
+
includedTools: ["search_replace"],
|
|
4715
|
+
excludedTools: ["apply_diff"]
|
|
4537
4716
|
},
|
|
4538
|
-
"grok-4": {
|
|
4717
|
+
"grok-4-0709": {
|
|
4539
4718
|
maxTokens: 8192,
|
|
4540
4719
|
contextWindow: 256e3,
|
|
4541
4720
|
supportsImages: true,
|
|
@@ -4545,36 +4724,14 @@ var xaiModels = {
|
|
|
4545
4724
|
outputPrice: 15,
|
|
4546
4725
|
cacheWritesPrice: 0.75,
|
|
4547
4726
|
cacheReadsPrice: 0.75,
|
|
4548
|
-
description: "xAI's Grok-4 model with 256K context window"
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
maxTokens: 8192,
|
|
4552
|
-
contextWindow: 131072,
|
|
4553
|
-
supportsImages: false,
|
|
4554
|
-
supportsPromptCache: true,
|
|
4555
|
-
supportsNativeTools: true,
|
|
4556
|
-
inputPrice: 3,
|
|
4557
|
-
outputPrice: 15,
|
|
4558
|
-
cacheWritesPrice: 0.75,
|
|
4559
|
-
cacheReadsPrice: 0.75,
|
|
4560
|
-
description: "xAI's Grok-3 model with 128K context window"
|
|
4561
|
-
},
|
|
4562
|
-
"grok-3-fast": {
|
|
4563
|
-
maxTokens: 8192,
|
|
4564
|
-
contextWindow: 131072,
|
|
4565
|
-
supportsImages: false,
|
|
4566
|
-
supportsPromptCache: true,
|
|
4567
|
-
supportsNativeTools: true,
|
|
4568
|
-
inputPrice: 5,
|
|
4569
|
-
outputPrice: 25,
|
|
4570
|
-
cacheWritesPrice: 1.25,
|
|
4571
|
-
cacheReadsPrice: 1.25,
|
|
4572
|
-
description: "xAI's Grok-3 fast model with 128K context window"
|
|
4727
|
+
description: "xAI's Grok-4 model with 256K context window",
|
|
4728
|
+
includedTools: ["search_replace"],
|
|
4729
|
+
excludedTools: ["apply_diff"]
|
|
4573
4730
|
},
|
|
4574
4731
|
"grok-3-mini": {
|
|
4575
4732
|
maxTokens: 8192,
|
|
4576
4733
|
contextWindow: 131072,
|
|
4577
|
-
supportsImages:
|
|
4734
|
+
supportsImages: true,
|
|
4578
4735
|
supportsPromptCache: true,
|
|
4579
4736
|
supportsNativeTools: true,
|
|
4580
4737
|
inputPrice: 0.3,
|
|
@@ -4582,40 +4739,24 @@ var xaiModels = {
|
|
|
4582
4739
|
cacheWritesPrice: 0.07,
|
|
4583
4740
|
cacheReadsPrice: 0.07,
|
|
4584
4741
|
description: "xAI's Grok-3 mini model with 128K context window",
|
|
4585
|
-
supportsReasoningEffort:
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
contextWindow: 131072,
|
|
4590
|
-
supportsImages: false,
|
|
4591
|
-
supportsPromptCache: true,
|
|
4592
|
-
supportsNativeTools: true,
|
|
4593
|
-
inputPrice: 0.6,
|
|
4594
|
-
outputPrice: 4,
|
|
4595
|
-
cacheWritesPrice: 0.15,
|
|
4596
|
-
cacheReadsPrice: 0.15,
|
|
4597
|
-
description: "xAI's Grok-3 mini fast model with 128K context window",
|
|
4598
|
-
supportsReasoningEffort: true
|
|
4742
|
+
supportsReasoningEffort: ["low", "high"],
|
|
4743
|
+
reasoningEffort: "low",
|
|
4744
|
+
includedTools: ["search_replace"],
|
|
4745
|
+
excludedTools: ["apply_diff"]
|
|
4599
4746
|
},
|
|
4600
|
-
"grok-
|
|
4747
|
+
"grok-3": {
|
|
4601
4748
|
maxTokens: 8192,
|
|
4602
4749
|
contextWindow: 131072,
|
|
4603
|
-
supportsImages: false,
|
|
4604
|
-
supportsPromptCache: false,
|
|
4605
|
-
supportsNativeTools: true,
|
|
4606
|
-
inputPrice: 2,
|
|
4607
|
-
outputPrice: 10,
|
|
4608
|
-
description: "xAI's Grok-2 model (version 1212) with 128K context window"
|
|
4609
|
-
},
|
|
4610
|
-
"grok-2-vision-1212": {
|
|
4611
|
-
maxTokens: 8192,
|
|
4612
|
-
contextWindow: 32768,
|
|
4613
4750
|
supportsImages: true,
|
|
4614
|
-
supportsPromptCache:
|
|
4751
|
+
supportsPromptCache: true,
|
|
4615
4752
|
supportsNativeTools: true,
|
|
4616
|
-
inputPrice:
|
|
4617
|
-
outputPrice:
|
|
4618
|
-
|
|
4753
|
+
inputPrice: 3,
|
|
4754
|
+
outputPrice: 15,
|
|
4755
|
+
cacheWritesPrice: 0.75,
|
|
4756
|
+
cacheReadsPrice: 0.75,
|
|
4757
|
+
description: "xAI's Grok-3 model with 128K context window",
|
|
4758
|
+
includedTools: ["search_replace"],
|
|
4759
|
+
excludedTools: ["apply_diff"]
|
|
4619
4760
|
}
|
|
4620
4761
|
};
|
|
4621
4762
|
|
|
@@ -4722,7 +4863,6 @@ var internationalZAiModels = {
|
|
|
4722
4863
|
supportsImages: false,
|
|
4723
4864
|
supportsPromptCache: true,
|
|
4724
4865
|
supportsNativeTools: true,
|
|
4725
|
-
supportsReasoningBinary: true,
|
|
4726
4866
|
inputPrice: 0.6,
|
|
4727
4867
|
outputPrice: 2.2,
|
|
4728
4868
|
cacheWritesPrice: 0,
|
|
@@ -4795,7 +4935,6 @@ var internationalZAiModels = {
|
|
|
4795
4935
|
supportsImages: false,
|
|
4796
4936
|
supportsPromptCache: true,
|
|
4797
4937
|
supportsNativeTools: true,
|
|
4798
|
-
supportsReasoningBinary: true,
|
|
4799
4938
|
inputPrice: 0.6,
|
|
4800
4939
|
outputPrice: 2.2,
|
|
4801
4940
|
cacheWritesPrice: 0,
|
|
@@ -4823,7 +4962,6 @@ var mainlandZAiModels = {
|
|
|
4823
4962
|
supportsImages: false,
|
|
4824
4963
|
supportsPromptCache: true,
|
|
4825
4964
|
supportsNativeTools: true,
|
|
4826
|
-
supportsReasoningBinary: true,
|
|
4827
4965
|
inputPrice: 0.29,
|
|
4828
4966
|
outputPrice: 1.14,
|
|
4829
4967
|
cacheWritesPrice: 0,
|
|
@@ -4896,7 +5034,6 @@ var mainlandZAiModels = {
|
|
|
4896
5034
|
supportsImages: false,
|
|
4897
5035
|
supportsPromptCache: true,
|
|
4898
5036
|
supportsNativeTools: true,
|
|
4899
|
-
supportsReasoningBinary: true,
|
|
4900
5037
|
inputPrice: 0.29,
|
|
4901
5038
|
outputPrice: 1.14,
|
|
4902
5039
|
cacheWritesPrice: 0,
|
|
@@ -4907,14 +5044,24 @@ var mainlandZAiModels = {
|
|
|
4907
5044
|
var ZAI_DEFAULT_TEMPERATURE = 0.6;
|
|
4908
5045
|
var zaiApiLineConfigs = {
|
|
4909
5046
|
international_coding: {
|
|
4910
|
-
name: "International",
|
|
5047
|
+
name: "International Coding",
|
|
4911
5048
|
baseUrl: "https://api.z.ai/api/coding/paas/v4",
|
|
4912
5049
|
isChina: false
|
|
4913
5050
|
},
|
|
4914
5051
|
china_coding: {
|
|
4915
|
-
name: "China",
|
|
5052
|
+
name: "China Coding",
|
|
4916
5053
|
baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
|
|
4917
5054
|
isChina: true
|
|
5055
|
+
},
|
|
5056
|
+
international_api: {
|
|
5057
|
+
name: "International API",
|
|
5058
|
+
baseUrl: "https://api.z.ai/api/paas/v4",
|
|
5059
|
+
isChina: false
|
|
5060
|
+
},
|
|
5061
|
+
china_api: {
|
|
5062
|
+
name: "China API",
|
|
5063
|
+
baseUrl: "https://open.bigmodel.cn/api/paas/v4",
|
|
5064
|
+
isChina: true
|
|
4918
5065
|
}
|
|
4919
5066
|
};
|
|
4920
5067
|
|
|
@@ -4972,8 +5119,6 @@ function getProviderDefaultModelId(provider, options = { isChina: false }) {
|
|
|
4972
5119
|
return openRouterDefaultModelId;
|
|
4973
5120
|
case "requesty":
|
|
4974
5121
|
return requestyDefaultModelId;
|
|
4975
|
-
case "glama":
|
|
4976
|
-
return glamaDefaultModelId;
|
|
4977
5122
|
case "unbound":
|
|
4978
5123
|
return unboundDefaultModelId;
|
|
4979
5124
|
case "litellm":
|
|
@@ -5060,7 +5205,6 @@ var dynamicProviders = [
|
|
|
5060
5205
|
"io-intelligence",
|
|
5061
5206
|
"requesty",
|
|
5062
5207
|
"unbound",
|
|
5063
|
-
"glama",
|
|
5064
5208
|
"roo",
|
|
5065
5209
|
"chutes"
|
|
5066
5210
|
];
|
|
@@ -5142,10 +5286,6 @@ var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
|
5142
5286
|
claudeCodePath: import_zod8.z.string().optional(),
|
|
5143
5287
|
claudeCodeMaxOutputTokens: import_zod8.z.number().int().min(1).max(2e5).optional()
|
|
5144
5288
|
});
|
|
5145
|
-
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
5146
|
-
glamaModelId: import_zod8.z.string().optional(),
|
|
5147
|
-
glamaApiKey: import_zod8.z.string().optional()
|
|
5148
|
-
});
|
|
5149
5289
|
var openRouterSchema = baseProviderSettingsSchema.extend({
|
|
5150
5290
|
openRouterApiKey: import_zod8.z.string().optional(),
|
|
5151
5291
|
openRouterModelId: import_zod8.z.string().optional(),
|
|
@@ -5296,7 +5436,7 @@ var cerebrasSchema = apiModelIdProviderModelSchema.extend({
|
|
|
5296
5436
|
var sambaNovaSchema = apiModelIdProviderModelSchema.extend({
|
|
5297
5437
|
sambaNovaApiKey: import_zod8.z.string().optional()
|
|
5298
5438
|
});
|
|
5299
|
-
var zaiApiLineSchema = import_zod8.z.enum(["international_coding", "china_coding"]);
|
|
5439
|
+
var zaiApiLineSchema = import_zod8.z.enum(["international_coding", "china_coding", "international_api", "china_api"]);
|
|
5300
5440
|
var zaiSchema = apiModelIdProviderModelSchema.extend({
|
|
5301
5441
|
zaiApiKey: import_zod8.z.string().optional(),
|
|
5302
5442
|
zaiApiLine: zaiApiLineSchema.optional()
|
|
@@ -5330,7 +5470,6 @@ var defaultSchema = import_zod8.z.object({
|
|
|
5330
5470
|
var providerSettingsSchemaDiscriminated = import_zod8.z.discriminatedUnion("apiProvider", [
|
|
5331
5471
|
anthropicSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("anthropic") })),
|
|
5332
5472
|
claudeCodeSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("claude-code") })),
|
|
5333
|
-
glamaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("glama") })),
|
|
5334
5473
|
openRouterSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openrouter") })),
|
|
5335
5474
|
bedrockSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("bedrock") })),
|
|
5336
5475
|
vertexSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("vertex") })),
|
|
@@ -5372,7 +5511,6 @@ var providerSettingsSchema = import_zod8.z.object({
|
|
|
5372
5511
|
apiProvider: providerNamesSchema.optional(),
|
|
5373
5512
|
...anthropicSchema.shape,
|
|
5374
5513
|
...claudeCodeSchema.shape,
|
|
5375
|
-
...glamaSchema.shape,
|
|
5376
5514
|
...openRouterSchema.shape,
|
|
5377
5515
|
...bedrockSchema.shape,
|
|
5378
5516
|
...vertexSchema.shape,
|
|
@@ -5417,7 +5555,6 @@ var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscrimina
|
|
|
5417
5555
|
var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
|
|
5418
5556
|
var modelIdKeys = [
|
|
5419
5557
|
"apiModelId",
|
|
5420
|
-
"glamaModelId",
|
|
5421
5558
|
"openRouterModelId",
|
|
5422
5559
|
"openAiModelId",
|
|
5423
5560
|
"ollamaModelId",
|
|
@@ -5439,7 +5576,6 @@ var isTypicalProvider = (key) => isProviderName(key) && !isInternalProvider(key)
|
|
|
5439
5576
|
var modelIdKeysByProvider = {
|
|
5440
5577
|
anthropic: "apiModelId",
|
|
5441
5578
|
"claude-code": "apiModelId",
|
|
5442
|
-
glama: "glamaModelId",
|
|
5443
5579
|
openrouter: "openRouterModelId",
|
|
5444
5580
|
bedrock: "apiModelId",
|
|
5445
5581
|
vertex: "apiModelId",
|
|
@@ -5570,7 +5706,6 @@ var MODELS_BY_PROVIDER = {
|
|
|
5570
5706
|
zai: { id: "zai", label: "Z.ai", models: Object.keys(internationalZAiModels) },
|
|
5571
5707
|
baseten: { id: "baseten", label: "Baseten", models: Object.keys(basetenModels) },
|
|
5572
5708
|
// Dynamic providers; models pulled from remote APIs.
|
|
5573
|
-
glama: { id: "glama", label: "Glama", models: [] },
|
|
5574
5709
|
huggingface: { id: "huggingface", label: "Hugging Face", models: [] },
|
|
5575
5710
|
litellm: { id: "litellm", label: "LiteLLM", models: [] },
|
|
5576
5711
|
openrouter: { id: "openrouter", label: "OpenRouter", models: [] },
|
|
@@ -5802,6 +5937,67 @@ var rooCodeTelemetryEventSchema = import_zod11.z.discriminatedUnion("type", [
|
|
|
5802
5937
|
})
|
|
5803
5938
|
})
|
|
5804
5939
|
]);
|
|
5940
|
+
var EXPECTED_API_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
5941
|
+
402,
|
|
5942
|
+
// Payment required - billing issues
|
|
5943
|
+
429
|
|
5944
|
+
// Rate limit - expected when hitting API limits
|
|
5945
|
+
]);
|
|
5946
|
+
var EXPECTED_ERROR_MESSAGE_PATTERNS = [
|
|
5947
|
+
/^429\b/,
|
|
5948
|
+
// Message starts with "429"
|
|
5949
|
+
/rate limit/i
|
|
5950
|
+
// Contains "rate limit" (case insensitive)
|
|
5951
|
+
];
|
|
5952
|
+
function isOpenAISdkError(error) {
|
|
5953
|
+
return typeof error === "object" && error !== null && "status" in error && typeof error.status === "number";
|
|
5954
|
+
}
|
|
5955
|
+
function getErrorStatusCode(error) {
|
|
5956
|
+
if (isOpenAISdkError(error)) {
|
|
5957
|
+
return error.status;
|
|
5958
|
+
}
|
|
5959
|
+
return void 0;
|
|
5960
|
+
}
|
|
5961
|
+
function getErrorMessage(error) {
|
|
5962
|
+
if (isOpenAISdkError(error)) {
|
|
5963
|
+
return error.error?.metadata?.raw || error.error?.message || error.message;
|
|
5964
|
+
}
|
|
5965
|
+
return void 0;
|
|
5966
|
+
}
|
|
5967
|
+
function shouldReportApiErrorToTelemetry(errorCode, errorMessage) {
|
|
5968
|
+
if (errorCode !== void 0 && EXPECTED_API_ERROR_CODES.has(errorCode)) {
|
|
5969
|
+
return false;
|
|
5970
|
+
}
|
|
5971
|
+
if (errorMessage) {
|
|
5972
|
+
for (const pattern of EXPECTED_ERROR_MESSAGE_PATTERNS) {
|
|
5973
|
+
if (pattern.test(errorMessage)) {
|
|
5974
|
+
return false;
|
|
5975
|
+
}
|
|
5976
|
+
}
|
|
5977
|
+
}
|
|
5978
|
+
return true;
|
|
5979
|
+
}
|
|
5980
|
+
var ApiProviderError = class extends Error {
|
|
5981
|
+
constructor(message, provider, modelId, operation, errorCode) {
|
|
5982
|
+
super(message);
|
|
5983
|
+
this.provider = provider;
|
|
5984
|
+
this.modelId = modelId;
|
|
5985
|
+
this.operation = operation;
|
|
5986
|
+
this.errorCode = errorCode;
|
|
5987
|
+
this.name = "ApiProviderError";
|
|
5988
|
+
}
|
|
5989
|
+
};
|
|
5990
|
+
function isApiProviderError(error) {
|
|
5991
|
+
return error instanceof Error && error.name === "ApiProviderError" && "provider" in error && "modelId" in error && "operation" in error;
|
|
5992
|
+
}
|
|
5993
|
+
function extractApiProviderErrorProperties(error) {
|
|
5994
|
+
return {
|
|
5995
|
+
provider: error.provider,
|
|
5996
|
+
modelId: error.modelId,
|
|
5997
|
+
operation: error.operation,
|
|
5998
|
+
...error.errorCode !== void 0 && { errorCode: error.errorCode }
|
|
5999
|
+
};
|
|
6000
|
+
}
|
|
5805
6001
|
|
|
5806
6002
|
// src/mode.ts
|
|
5807
6003
|
var import_zod12 = require("zod");
|
|
@@ -5880,7 +6076,7 @@ var DEFAULT_MODES = [
|
|
|
5880
6076
|
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.",
|
|
5881
6077
|
description: "Plan and design before implementation",
|
|
5882
6078
|
groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"],
|
|
5883
|
-
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
|
|
6079
|
+
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"
|
|
5884
6080
|
},
|
|
5885
6081
|
{
|
|
5886
6082
|
slug: "code",
|
|
@@ -6089,6 +6285,13 @@ var globalSettingsSchema = import_zod14.z.object({
|
|
|
6089
6285
|
includeTaskHistoryInEnhance: import_zod14.z.boolean().optional(),
|
|
6090
6286
|
historyPreviewCollapsed: import_zod14.z.boolean().optional(),
|
|
6091
6287
|
reasoningBlockCollapsed: import_zod14.z.boolean().optional(),
|
|
6288
|
+
/**
|
|
6289
|
+
* Controls the keyboard behavior for sending messages in the chat input.
|
|
6290
|
+
* - "send": Enter sends message, Shift+Enter creates newline (default)
|
|
6291
|
+
* - "newline": Enter creates newline, Shift+Enter/Ctrl+Enter sends message
|
|
6292
|
+
* @default "send"
|
|
6293
|
+
*/
|
|
6294
|
+
enterBehavior: import_zod14.z.enum(["send", "newline"]).optional(),
|
|
6092
6295
|
profileThresholds: import_zod14.z.record(import_zod14.z.string(), import_zod14.z.number()).optional(),
|
|
6093
6296
|
hasOpenedModeSelector: import_zod14.z.boolean().optional(),
|
|
6094
6297
|
lastModeExportPath: import_zod14.z.string().optional(),
|
|
@@ -6098,7 +6301,6 @@ var GLOBAL_SETTINGS_KEYS = globalSettingsSchema.keyof().options;
|
|
|
6098
6301
|
var rooCodeSettingsSchema = providerSettingsSchema.merge(globalSettingsSchema);
|
|
6099
6302
|
var SECRET_STATE_KEYS = [
|
|
6100
6303
|
"apiKey",
|
|
6101
|
-
"glamaApiKey",
|
|
6102
6304
|
"openRouterApiKey",
|
|
6103
6305
|
"awsAccessKey",
|
|
6104
6306
|
"awsApiKey",
|
|
@@ -6296,11 +6498,13 @@ var organizationDefaultSettingsSchema = globalSettingsSchema.pick({
|
|
|
6296
6498
|
terminalShellIntegrationTimeout: import_zod16.z.number().int().nonnegative().optional()
|
|
6297
6499
|
})
|
|
6298
6500
|
);
|
|
6501
|
+
var workspaceTaskVisibilitySchema = import_zod16.z.enum(["all", "list-only", "full-lockdown"]);
|
|
6299
6502
|
var organizationCloudSettingsSchema = import_zod16.z.object({
|
|
6300
6503
|
recordTaskMessages: import_zod16.z.boolean().optional(),
|
|
6301
6504
|
enableTaskSharing: import_zod16.z.boolean().optional(),
|
|
6302
6505
|
taskShareExpirationDays: import_zod16.z.number().int().positive().optional(),
|
|
6303
|
-
allowMembersViewAllTasks: import_zod16.z.boolean().optional()
|
|
6506
|
+
allowMembersViewAllTasks: import_zod16.z.boolean().optional(),
|
|
6507
|
+
workspaceTaskVisibility: workspaceTaskVisibilitySchema.optional()
|
|
6304
6508
|
});
|
|
6305
6509
|
var organizationFeaturesSchema = import_zod16.z.object({
|
|
6306
6510
|
roomoteControlEnabled: import_zod16.z.boolean().optional()
|
|
@@ -6664,6 +6868,16 @@ var usageStatsSchema = import_zod16.z.object({
|
|
|
6664
6868
|
// Period in days (e.g., 30)
|
|
6665
6869
|
});
|
|
6666
6870
|
|
|
6871
|
+
// src/context-management.ts
|
|
6872
|
+
var CONTEXT_MANAGEMENT_EVENTS = [
|
|
6873
|
+
"condense_context",
|
|
6874
|
+
"condense_context_error",
|
|
6875
|
+
"sliding_window_truncation"
|
|
6876
|
+
];
|
|
6877
|
+
function isContextManagementEvent(value) {
|
|
6878
|
+
return typeof value === "string" && CONTEXT_MANAGEMENT_EVENTS.includes(value);
|
|
6879
|
+
}
|
|
6880
|
+
|
|
6667
6881
|
// src/cookie-consent.ts
|
|
6668
6882
|
var CONSENT_COOKIE_NAME = "roo-code-cookie-consent";
|
|
6669
6883
|
var COOKIE_CONSENT_EVENTS = {
|
|
@@ -6856,6 +7070,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
|
|
|
6856
7070
|
ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
6857
7071
|
ANTHROPIC_STYLE_PROVIDERS,
|
|
6858
7072
|
AWS_INFERENCE_PROFILE_MAPPING,
|
|
7073
|
+
ApiProviderError,
|
|
6859
7074
|
BEDROCK_1M_CONTEXT_MODEL_IDS,
|
|
6860
7075
|
BEDROCK_DEFAULT_CONTEXT,
|
|
6861
7076
|
BEDROCK_DEFAULT_TEMPERATURE,
|
|
@@ -6865,6 +7080,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
|
|
|
6865
7080
|
CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
|
|
6866
7081
|
CODEBASE_INDEX_DEFAULTS,
|
|
6867
7082
|
CONSENT_COOKIE_NAME,
|
|
7083
|
+
CONTEXT_MANAGEMENT_EVENTS,
|
|
6868
7084
|
COOKIE_CONSENT_EVENTS,
|
|
6869
7085
|
ConnectionState,
|
|
6870
7086
|
DEEP_SEEK_DEFAULT_TEMPERATURE,
|
|
@@ -6877,10 +7093,10 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
|
|
|
6877
7093
|
DOUBAO_API_CHAT_PATH,
|
|
6878
7094
|
EVALS_SETTINGS,
|
|
6879
7095
|
EVALS_TIMEOUT,
|
|
7096
|
+
EXPECTED_API_ERROR_CODES,
|
|
6880
7097
|
ExtensionBridgeCommandName,
|
|
6881
7098
|
ExtensionBridgeEventName,
|
|
6882
7099
|
ExtensionSocketEvents,
|
|
6883
|
-
GLAMA_DEFAULT_TEMPERATURE,
|
|
6884
7100
|
GLOBAL_SECRET_KEYS,
|
|
6885
7101
|
GLOBAL_SETTINGS_KEYS,
|
|
6886
7102
|
GLOBAL_STATE_KEYS,
|
|
@@ -6964,6 +7180,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
|
|
|
6964
7180
|
commandExecutionStatusSchema,
|
|
6965
7181
|
commandIds,
|
|
6966
7182
|
contextCondenseSchema,
|
|
7183
|
+
contextTruncationSchema,
|
|
6967
7184
|
convertModelNameForVertex,
|
|
6968
7185
|
customModePromptsSchema,
|
|
6969
7186
|
customModesSettingsSchema,
|
|
@@ -6985,6 +7202,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
|
|
|
6985
7202
|
extensionBridgeCommandSchema,
|
|
6986
7203
|
extensionBridgeEventSchema,
|
|
6987
7204
|
extensionInstanceSchema,
|
|
7205
|
+
extractApiProviderErrorProperties,
|
|
6988
7206
|
fauxProviders,
|
|
6989
7207
|
featherlessDefaultModelId,
|
|
6990
7208
|
featherlessModels,
|
|
@@ -6996,12 +7214,12 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
|
|
|
6996
7214
|
getApiProtocol,
|
|
6997
7215
|
getClaudeCodeModelId,
|
|
6998
7216
|
getEffectiveProtocol,
|
|
7217
|
+
getErrorMessage,
|
|
7218
|
+
getErrorStatusCode,
|
|
6999
7219
|
getImageGenerationProvider,
|
|
7000
7220
|
getModelId,
|
|
7001
7221
|
getProviderDefaultModelId,
|
|
7002
7222
|
gitPropertiesSchema,
|
|
7003
|
-
glamaDefaultModelId,
|
|
7004
|
-
glamaDefaultModelInfo,
|
|
7005
7223
|
globalSettingsSchema,
|
|
7006
7224
|
groqDefaultModelId,
|
|
7007
7225
|
groqModels,
|
|
@@ -7018,6 +7236,8 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
|
|
|
7018
7236
|
ioIntelligenceDefaultModelId,
|
|
7019
7237
|
ioIntelligenceModels,
|
|
7020
7238
|
ipcMessageSchema,
|
|
7239
|
+
isApiProviderError,
|
|
7240
|
+
isContextManagementEvent,
|
|
7021
7241
|
isCustomProvider,
|
|
7022
7242
|
isDynamicProvider,
|
|
7023
7243
|
isFauxProvider,
|
|
@@ -7106,6 +7326,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
|
|
|
7106
7326
|
serviceTierSchema,
|
|
7107
7327
|
serviceTiers,
|
|
7108
7328
|
shareResponseSchema,
|
|
7329
|
+
shouldReportApiErrorToTelemetry,
|
|
7109
7330
|
shouldUseSingleFileRead,
|
|
7110
7331
|
staticAppPropertiesSchema,
|
|
7111
7332
|
suggestionItemSchema,
|