@roo-code/types 1.89.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 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,8 +472,8 @@ 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",
@@ -568,7 +592,7 @@ var rooCodeEventsSchema = import_zod3.z.object({
568
592
  ["taskAskResponded" /* TaskAskResponded */]: import_zod3.z.tuple([import_zod3.z.string()]),
569
593
  ["taskUserMessage" /* TaskUserMessage */]: import_zod3.z.tuple([import_zod3.z.string()]),
570
594
  ["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]),
595
+ ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: import_zod3.z.tuple([import_zod3.z.string(), tokenUsageSchema, toolUsageSchema]),
572
596
  ["modeChanged" /* ModeChanged */]: import_zod3.z.tuple([import_zod3.z.string()]),
573
597
  ["providerProfileChanged" /* ProviderProfileChanged */]: import_zod3.z.tuple([import_zod3.z.object({ name: import_zod3.z.string(), provider: import_zod3.z.string() })])
574
598
  });
@@ -722,9 +746,9 @@ var import_zod5 = require("zod");
722
746
  var reasoningEfforts = ["low", "medium", "high"];
723
747
  var reasoningEffortsSchema = import_zod5.z.enum(reasoningEfforts);
724
748
  var reasoningEffortWithMinimalSchema = import_zod5.z.union([reasoningEffortsSchema, import_zod5.z.literal("minimal")]);
725
- var reasoningEffortsExtended = ["none", "minimal", "low", "medium", "high"];
749
+ var reasoningEffortsExtended = ["none", "minimal", "low", "medium", "high", "xhigh"];
726
750
  var reasoningEffortExtendedSchema = import_zod5.z.enum(reasoningEffortsExtended);
727
- var reasoningEffortSettingValues = ["disable", "none", "minimal", "low", "medium", "high"];
751
+ var reasoningEffortSettingValues = ["disable", "none", "minimal", "low", "medium", "high", "xhigh"];
728
752
  var reasoningEffortSettingSchema = import_zod5.z.enum(reasoningEffortSettingValues);
729
753
  var verbosityLevels = ["low", "medium", "high"];
730
754
  var verbosityLevelsSchema = import_zod5.z.enum(verbosityLevels);
@@ -752,7 +776,7 @@ var modelInfoSchema = import_zod5.z.object({
752
776
  supportsTemperature: import_zod5.z.boolean().optional(),
753
777
  defaultTemperature: import_zod5.z.number().optional(),
754
778
  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(),
779
+ 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
780
  requiredReasoningEffort: import_zod5.z.boolean().optional(),
757
781
  preserveReasoning: import_zod5.z.boolean().optional(),
758
782
  supportedParameters: import_zod5.z.array(modelParametersSchema).optional(),
@@ -768,6 +792,8 @@ var modelInfoSchema = import_zod5.z.object({
768
792
  cachableFields: import_zod5.z.array(import_zod5.z.string()).optional(),
769
793
  // Flag to indicate if the model is deprecated and should not be used
770
794
  deprecated: import_zod5.z.boolean().optional(),
795
+ // Flag to indicate if the model should hide vendor/company identity in responses
796
+ isStealthModel: import_zod5.z.boolean().optional(),
771
797
  // Flag to indicate if the model is free (no cost)
772
798
  isFree: import_zod5.z.boolean().optional(),
773
799
  // Flag to indicate if the model supports native tool calling (OpenAI-style function calling)
@@ -834,7 +860,9 @@ var codebaseIndexConfigSchema = import_zod6.z.object({
834
860
  codebaseIndexOpenAiCompatibleModelDimension: import_zod6.z.number().optional(),
835
861
  // Bedrock specific fields
836
862
  codebaseIndexBedrockRegion: import_zod6.z.string().optional(),
837
- codebaseIndexBedrockProfile: import_zod6.z.string().optional()
863
+ codebaseIndexBedrockProfile: import_zod6.z.string().optional(),
864
+ // OpenRouter specific fields
865
+ codebaseIndexOpenRouterSpecificProvider: import_zod6.z.string().optional()
838
866
  });
839
867
  var codebaseIndexModelsSchema = import_zod6.z.object({
840
868
  openai: import_zod6.z.record(import_zod6.z.string(), import_zod6.z.object({ dimension: import_zod6.z.number() })).optional(),
@@ -1079,7 +1107,7 @@ var ANTHROPIC_DEFAULT_MAX_TOKENS = 8192;
1079
1107
  // src/providers/baseten.ts
1080
1108
  var basetenModels = {
1081
1109
  "moonshotai/Kimi-K2-Thinking": {
1082
- maxTokens: 163800,
1110
+ maxTokens: 16384,
1083
1111
  contextWindow: 262e3,
1084
1112
  supportsImages: false,
1085
1113
  supportsPromptCache: false,
@@ -1091,7 +1119,7 @@ var basetenModels = {
1091
1119
  description: "Kimi K2 Thinking - A model with enhanced reasoning capabilities from Kimi K2"
1092
1120
  },
1093
1121
  "zai-org/GLM-4.6": {
1094
- maxTokens: 2e5,
1122
+ maxTokens: 16384,
1095
1123
  contextWindow: 2e5,
1096
1124
  supportsImages: false,
1097
1125
  supportsPromptCache: false,
@@ -1103,7 +1131,7 @@ var basetenModels = {
1103
1131
  description: "Frontier open model with advanced agentic, reasoning and coding capabilities"
1104
1132
  },
1105
1133
  "deepseek-ai/DeepSeek-R1": {
1106
- maxTokens: 131072,
1134
+ maxTokens: 16384,
1107
1135
  contextWindow: 163840,
1108
1136
  supportsImages: false,
1109
1137
  supportsPromptCache: false,
@@ -1114,7 +1142,7 @@ var basetenModels = {
1114
1142
  description: "DeepSeek's first-generation reasoning model"
1115
1143
  },
1116
1144
  "deepseek-ai/DeepSeek-R1-0528": {
1117
- maxTokens: 131072,
1145
+ maxTokens: 16384,
1118
1146
  contextWindow: 163840,
1119
1147
  supportsImages: false,
1120
1148
  supportsPromptCache: false,
@@ -1125,7 +1153,7 @@ var basetenModels = {
1125
1153
  description: "The latest revision of DeepSeek's first-generation reasoning model"
1126
1154
  },
1127
1155
  "deepseek-ai/DeepSeek-V3-0324": {
1128
- maxTokens: 131072,
1156
+ maxTokens: 16384,
1129
1157
  contextWindow: 163840,
1130
1158
  supportsImages: false,
1131
1159
  supportsPromptCache: false,
@@ -1136,7 +1164,7 @@ var basetenModels = {
1136
1164
  description: "Fast general-purpose LLM with enhanced reasoning capabilities"
1137
1165
  },
1138
1166
  "deepseek-ai/DeepSeek-V3.1": {
1139
- maxTokens: 131072,
1167
+ maxTokens: 16384,
1140
1168
  contextWindow: 163840,
1141
1169
  supportsImages: false,
1142
1170
  supportsPromptCache: false,
@@ -1146,8 +1174,20 @@ var basetenModels = {
1146
1174
  cacheReadsPrice: 0,
1147
1175
  description: "Extremely capable general-purpose LLM with hybrid reasoning capabilities and advanced tool calling"
1148
1176
  },
1177
+ "deepseek-ai/DeepSeek-V3.2": {
1178
+ maxTokens: 16384,
1179
+ contextWindow: 163840,
1180
+ supportsImages: false,
1181
+ supportsPromptCache: false,
1182
+ supportsNativeTools: true,
1183
+ inputPrice: 0.3,
1184
+ outputPrice: 0.45,
1185
+ cacheWritesPrice: 0,
1186
+ cacheReadsPrice: 0,
1187
+ description: "DeepSeek's hybrid reasoning model with efficient long context scaling with GPT-5 level performance"
1188
+ },
1149
1189
  "Qwen/Qwen3-235B-A22B-Instruct-2507": {
1150
- maxTokens: 262144,
1190
+ maxTokens: 16384,
1151
1191
  contextWindow: 262144,
1152
1192
  supportsImages: false,
1153
1193
  supportsPromptCache: false,
@@ -1158,7 +1198,7 @@ var basetenModels = {
1158
1198
  description: "Mixture-of-experts LLM with math and reasoning capabilities"
1159
1199
  },
1160
1200
  "Qwen/Qwen3-Coder-480B-A35B-Instruct": {
1161
- maxTokens: 262144,
1201
+ maxTokens: 16384,
1162
1202
  contextWindow: 262144,
1163
1203
  supportsImages: false,
1164
1204
  supportsPromptCache: false,
@@ -1169,7 +1209,7 @@ var basetenModels = {
1169
1209
  description: "Mixture-of-experts LLM with advanced coding and reasoning capabilities"
1170
1210
  },
1171
1211
  "openai/gpt-oss-120b": {
1172
- maxTokens: 128072,
1212
+ maxTokens: 16384,
1173
1213
  contextWindow: 128072,
1174
1214
  supportsImages: false,
1175
1215
  supportsPromptCache: false,
@@ -1181,7 +1221,7 @@ var basetenModels = {
1181
1221
  description: "Extremely capable general-purpose LLM with strong, controllable reasoning capabilities"
1182
1222
  },
1183
1223
  "moonshotai/Kimi-K2-Instruct-0905": {
1184
- maxTokens: 168e3,
1224
+ maxTokens: 16384,
1185
1225
  contextWindow: 262e3,
1186
1226
  supportsImages: false,
1187
1227
  supportsPromptCache: false,
@@ -1634,6 +1674,52 @@ var bedrockModels = {
1634
1674
  supportsPromptCache: false,
1635
1675
  inputPrice: 0.02,
1636
1676
  description: "Amazon Titan Text Embeddings V2"
1677
+ },
1678
+ "moonshot.kimi-k2-thinking": {
1679
+ maxTokens: 32e3,
1680
+ contextWindow: 262144,
1681
+ supportsImages: false,
1682
+ supportsPromptCache: false,
1683
+ supportsNativeTools: true,
1684
+ defaultToolProtocol: "native",
1685
+ preserveReasoning: true,
1686
+ inputPrice: 0.6,
1687
+ outputPrice: 2.5,
1688
+ description: "Kimi K2 Thinking (1T parameter MoE model with 32B active parameters)"
1689
+ },
1690
+ "minimax.minimax-m2": {
1691
+ maxTokens: 16384,
1692
+ contextWindow: 196608,
1693
+ supportsImages: false,
1694
+ supportsPromptCache: false,
1695
+ supportsNativeTools: true,
1696
+ defaultToolProtocol: "native",
1697
+ preserveReasoning: true,
1698
+ inputPrice: 0.3,
1699
+ outputPrice: 1.2,
1700
+ description: "MiniMax M2 (230B parameter MoE model with 10B active parameters)"
1701
+ },
1702
+ "qwen.qwen3-next-80b-a3b": {
1703
+ maxTokens: 8192,
1704
+ contextWindow: 262144,
1705
+ supportsImages: false,
1706
+ supportsPromptCache: false,
1707
+ supportsNativeTools: true,
1708
+ defaultToolProtocol: "native",
1709
+ inputPrice: 0.15,
1710
+ outputPrice: 1.2,
1711
+ description: "Qwen3 Next 80B (MoE model with 3B active parameters)"
1712
+ },
1713
+ "qwen.qwen3-coder-480b-a35b-v1:0": {
1714
+ maxTokens: 8192,
1715
+ contextWindow: 262144,
1716
+ supportsImages: false,
1717
+ supportsPromptCache: false,
1718
+ supportsNativeTools: true,
1719
+ defaultToolProtocol: "native",
1720
+ inputPrice: 0.45,
1721
+ outputPrice: 1.8,
1722
+ description: "Qwen3 Coder 480B (MoE model with 35B active parameters)"
1637
1723
  }
1638
1724
  };
1639
1725
  var BEDROCK_DEFAULT_TEMPERATURE = 0.3;
@@ -1699,8 +1785,8 @@ var BEDROCK_GLOBAL_INFERENCE_MODEL_IDS = [
1699
1785
  var cerebrasDefaultModelId = "gpt-oss-120b";
1700
1786
  var cerebrasModels = {
1701
1787
  "zai-glm-4.6": {
1702
- maxTokens: 16384,
1703
- // consistent with their other models
1788
+ maxTokens: 8192,
1789
+ // Conservative default to avoid premature rate limiting (Cerebras reserves quota upfront)
1704
1790
  contextWindow: 131072,
1705
1791
  supportsImages: false,
1706
1792
  supportsPromptCache: false,
@@ -1710,7 +1796,8 @@ var cerebrasModels = {
1710
1796
  description: "Highly intelligent general purpose model with up to 1,000 tokens/s"
1711
1797
  },
1712
1798
  "qwen-3-235b-a22b-instruct-2507": {
1713
- maxTokens: 64e3,
1799
+ maxTokens: 8192,
1800
+ // Conservative default to avoid premature rate limiting
1714
1801
  contextWindow: 64e3,
1715
1802
  supportsImages: false,
1716
1803
  supportsPromptCache: false,
@@ -1720,7 +1807,8 @@ var cerebrasModels = {
1720
1807
  description: "Intelligent model with ~1400 tokens/s"
1721
1808
  },
1722
1809
  "llama-3.3-70b": {
1723
- maxTokens: 64e3,
1810
+ maxTokens: 8192,
1811
+ // Conservative default to avoid premature rate limiting
1724
1812
  contextWindow: 64e3,
1725
1813
  supportsImages: false,
1726
1814
  supportsPromptCache: false,
@@ -1730,7 +1818,8 @@ var cerebrasModels = {
1730
1818
  description: "Powerful model with ~2600 tokens/s"
1731
1819
  },
1732
1820
  "qwen-3-32b": {
1733
- maxTokens: 64e3,
1821
+ maxTokens: 8192,
1822
+ // Conservative default to avoid premature rate limiting
1734
1823
  contextWindow: 64e3,
1735
1824
  supportsImages: false,
1736
1825
  supportsPromptCache: false,
@@ -1740,7 +1829,8 @@ var cerebrasModels = {
1740
1829
  description: "SOTA coding performance with ~2500 tokens/s"
1741
1830
  },
1742
1831
  "gpt-oss-120b": {
1743
- maxTokens: 8e3,
1832
+ maxTokens: 8192,
1833
+ // Conservative default to avoid premature rate limiting
1744
1834
  contextWindow: 64e3,
1745
1835
  supportsImages: false,
1746
1836
  supportsPromptCache: false,
@@ -2265,35 +2355,37 @@ var deepSeekModels = {
2265
2355
  supportsImages: false,
2266
2356
  supportsPromptCache: true,
2267
2357
  supportsNativeTools: true,
2268
- inputPrice: 0.56,
2269
- // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025
2270
- outputPrice: 1.68,
2271
- // $1.68 per million tokens - Updated Sept 5, 2025
2272
- cacheWritesPrice: 0.56,
2273
- // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025
2274
- cacheReadsPrice: 0.07,
2275
- // $0.07 per million tokens (cache hit) - Updated Sept 5, 2025
2276
- description: `DeepSeek-V3 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.`
2358
+ defaultToolProtocol: "native",
2359
+ inputPrice: 0.28,
2360
+ // $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
2361
+ outputPrice: 0.42,
2362
+ // $0.42 per million tokens - Updated Dec 9, 2025
2363
+ cacheWritesPrice: 0.28,
2364
+ // $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
2365
+ cacheReadsPrice: 0.028,
2366
+ // $0.028 per million tokens (cache hit) - Updated Dec 9, 2025
2367
+ 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
2368
  },
2278
2369
  "deepseek-reasoner": {
2279
- maxTokens: 65536,
2280
- // 64K max output for reasoning mode
2370
+ maxTokens: 8192,
2371
+ // 8K max output
2281
2372
  contextWindow: 128e3,
2282
2373
  supportsImages: false,
2283
2374
  supportsPromptCache: true,
2284
2375
  supportsNativeTools: true,
2285
- inputPrice: 0.56,
2286
- // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025
2287
- outputPrice: 1.68,
2288
- // $1.68 per million tokens - Updated Sept 5, 2025
2289
- cacheWritesPrice: 0.56,
2290
- // $0.56 per million tokens (cache miss) - Updated Sept 5, 2025
2291
- cacheReadsPrice: 0.07,
2292
- // $0.07 per million tokens (cache hit) - Updated Sept 5, 2025
2293
- description: `DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks. Supports Chain of Thought reasoning with up to 64K output tokens.`
2376
+ defaultToolProtocol: "native",
2377
+ inputPrice: 0.28,
2378
+ // $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
2379
+ outputPrice: 0.42,
2380
+ // $0.42 per million tokens - Updated Dec 9, 2025
2381
+ cacheWritesPrice: 0.28,
2382
+ // $0.28 per million tokens (cache miss) - Updated Dec 9, 2025
2383
+ cacheReadsPrice: 0.028,
2384
+ // $0.028 per million tokens (cache hit) - Updated Dec 9, 2025
2385
+ 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
2386
  }
2295
2387
  };
2296
- var DEEP_SEEK_DEFAULT_TEMPERATURE = 0.6;
2388
+ var DEEP_SEEK_DEFAULT_TEMPERATURE = 0;
2297
2389
 
2298
2390
  // src/providers/doubao.ts
2299
2391
  var doubaoDefaultModelId = "doubao-seed-1-6-250615";
@@ -2748,21 +2840,6 @@ var geminiModels = {
2748
2840
  }
2749
2841
  };
2750
2842
 
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
2843
  // src/providers/groq.ts
2767
2844
  var groqDefaultModelId = "moonshotai/kimi-k2-instruct-0905";
2768
2845
  var groqModels = {
@@ -2943,6 +3020,7 @@ var litellmDefaultModelInfo = {
2943
3020
  contextWindow: 2e5,
2944
3021
  supportsImages: true,
2945
3022
  supportsPromptCache: true,
3023
+ supportsNativeTools: true,
2946
3024
  inputPrice: 3,
2947
3025
  outputPrice: 15,
2948
3026
  cacheWritesPrice: 3.75,
@@ -3141,10 +3219,30 @@ var ollamaDefaultModelInfo = {
3141
3219
  // src/providers/openai.ts
3142
3220
  var openAiNativeDefaultModelId = "gpt-5.1";
3143
3221
  var openAiNativeModels = {
3222
+ "gpt-5.1-codex-max": {
3223
+ maxTokens: 128e3,
3224
+ contextWindow: 4e5,
3225
+ supportsNativeTools: true,
3226
+ includedTools: ["apply_patch"],
3227
+ excludedTools: ["apply_diff", "write_to_file"],
3228
+ supportsImages: true,
3229
+ supportsPromptCache: true,
3230
+ promptCacheRetention: "24h",
3231
+ supportsReasoningEffort: ["low", "medium", "high", "xhigh"],
3232
+ reasoningEffort: "medium",
3233
+ inputPrice: 1.25,
3234
+ outputPrice: 10,
3235
+ cacheReadsPrice: 0.125,
3236
+ supportsTemperature: false,
3237
+ tiers: [{ name: "priority", contextWindow: 4e5, inputPrice: 2.5, outputPrice: 20, cacheReadsPrice: 0.25 }],
3238
+ description: "GPT-5.1 Codex Max: Our most intelligent coding model optimized for long-horizon, agentic coding tasks"
3239
+ },
3144
3240
  "gpt-5.1": {
3145
3241
  maxTokens: 128e3,
3146
3242
  contextWindow: 4e5,
3147
3243
  supportsNativeTools: true,
3244
+ includedTools: ["apply_patch"],
3245
+ excludedTools: ["apply_diff", "write_to_file"],
3148
3246
  supportsImages: true,
3149
3247
  supportsPromptCache: true,
3150
3248
  promptCacheRetention: "24h",
@@ -3165,6 +3263,8 @@ var openAiNativeModels = {
3165
3263
  maxTokens: 128e3,
3166
3264
  contextWindow: 4e5,
3167
3265
  supportsNativeTools: true,
3266
+ includedTools: ["apply_patch"],
3267
+ excludedTools: ["apply_diff", "write_to_file"],
3168
3268
  supportsImages: true,
3169
3269
  supportsPromptCache: true,
3170
3270
  promptCacheRetention: "24h",
@@ -3181,6 +3281,8 @@ var openAiNativeModels = {
3181
3281
  maxTokens: 128e3,
3182
3282
  contextWindow: 4e5,
3183
3283
  supportsNativeTools: true,
3284
+ includedTools: ["apply_patch"],
3285
+ excludedTools: ["apply_diff", "write_to_file"],
3184
3286
  supportsImages: true,
3185
3287
  supportsPromptCache: true,
3186
3288
  promptCacheRetention: "24h",
@@ -3196,6 +3298,8 @@ var openAiNativeModels = {
3196
3298
  maxTokens: 128e3,
3197
3299
  contextWindow: 4e5,
3198
3300
  supportsNativeTools: true,
3301
+ includedTools: ["apply_patch"],
3302
+ excludedTools: ["apply_diff", "write_to_file"],
3199
3303
  supportsImages: true,
3200
3304
  supportsPromptCache: true,
3201
3305
  supportsReasoningEffort: ["minimal", "low", "medium", "high"],
@@ -3215,6 +3319,8 @@ var openAiNativeModels = {
3215
3319
  maxTokens: 128e3,
3216
3320
  contextWindow: 4e5,
3217
3321
  supportsNativeTools: true,
3322
+ includedTools: ["apply_patch"],
3323
+ excludedTools: ["apply_diff", "write_to_file"],
3218
3324
  supportsImages: true,
3219
3325
  supportsPromptCache: true,
3220
3326
  supportsReasoningEffort: ["minimal", "low", "medium", "high"],
@@ -3234,6 +3340,8 @@ var openAiNativeModels = {
3234
3340
  maxTokens: 128e3,
3235
3341
  contextWindow: 4e5,
3236
3342
  supportsNativeTools: true,
3343
+ includedTools: ["apply_patch"],
3344
+ excludedTools: ["apply_diff", "write_to_file"],
3237
3345
  supportsImages: true,
3238
3346
  supportsPromptCache: true,
3239
3347
  supportsReasoningEffort: ["low", "medium", "high"],
@@ -3249,6 +3357,8 @@ var openAiNativeModels = {
3249
3357
  maxTokens: 128e3,
3250
3358
  contextWindow: 4e5,
3251
3359
  supportsNativeTools: true,
3360
+ includedTools: ["apply_patch"],
3361
+ excludedTools: ["apply_diff", "write_to_file"],
3252
3362
  supportsImages: true,
3253
3363
  supportsPromptCache: true,
3254
3364
  supportsReasoningEffort: ["minimal", "low", "medium", "high"],
@@ -3265,6 +3375,8 @@ var openAiNativeModels = {
3265
3375
  maxTokens: 128e3,
3266
3376
  contextWindow: 4e5,
3267
3377
  supportsNativeTools: true,
3378
+ includedTools: ["apply_patch"],
3379
+ excludedTools: ["apply_diff", "write_to_file"],
3268
3380
  supportsImages: true,
3269
3381
  supportsPromptCache: true,
3270
3382
  inputPrice: 1.25,
@@ -3276,6 +3388,8 @@ var openAiNativeModels = {
3276
3388
  maxTokens: 32768,
3277
3389
  contextWindow: 1047576,
3278
3390
  supportsNativeTools: true,
3391
+ includedTools: ["apply_patch"],
3392
+ excludedTools: ["apply_diff", "write_to_file"],
3279
3393
  supportsImages: true,
3280
3394
  supportsPromptCache: true,
3281
3395
  inputPrice: 2,
@@ -3290,6 +3404,8 @@ var openAiNativeModels = {
3290
3404
  maxTokens: 32768,
3291
3405
  contextWindow: 1047576,
3292
3406
  supportsNativeTools: true,
3407
+ includedTools: ["apply_patch"],
3408
+ excludedTools: ["apply_diff", "write_to_file"],
3293
3409
  supportsImages: true,
3294
3410
  supportsPromptCache: true,
3295
3411
  inputPrice: 0.4,
@@ -3304,6 +3420,8 @@ var openAiNativeModels = {
3304
3420
  maxTokens: 32768,
3305
3421
  contextWindow: 1047576,
3306
3422
  supportsNativeTools: true,
3423
+ includedTools: ["apply_patch"],
3424
+ excludedTools: ["apply_diff", "write_to_file"],
3307
3425
  supportsImages: true,
3308
3426
  supportsPromptCache: true,
3309
3427
  inputPrice: 0.1,
@@ -3511,6 +3629,8 @@ var openAiNativeModels = {
3511
3629
  maxTokens: 128e3,
3512
3630
  contextWindow: 4e5,
3513
3631
  supportsNativeTools: true,
3632
+ includedTools: ["apply_patch"],
3633
+ excludedTools: ["apply_diff", "write_to_file"],
3514
3634
  supportsImages: true,
3515
3635
  supportsPromptCache: true,
3516
3636
  supportsReasoningEffort: ["minimal", "low", "medium", "high"],
@@ -3530,6 +3650,8 @@ var openAiNativeModels = {
3530
3650
  maxTokens: 128e3,
3531
3651
  contextWindow: 4e5,
3532
3652
  supportsNativeTools: true,
3653
+ includedTools: ["apply_patch"],
3654
+ excludedTools: ["apply_diff", "write_to_file"],
3533
3655
  supportsImages: true,
3534
3656
  supportsPromptCache: true,
3535
3657
  supportsReasoningEffort: ["minimal", "low", "medium", "high"],
@@ -3549,6 +3671,8 @@ var openAiNativeModels = {
3549
3671
  maxTokens: 128e3,
3550
3672
  contextWindow: 4e5,
3551
3673
  supportsNativeTools: true,
3674
+ includedTools: ["apply_patch"],
3675
+ excludedTools: ["apply_diff", "write_to_file"],
3552
3676
  supportsImages: true,
3553
3677
  supportsPromptCache: true,
3554
3678
  supportsReasoningEffort: ["minimal", "low", "medium", "high"],
@@ -3711,7 +3835,18 @@ var RooModelSchema = import_zod7.z.object({
3711
3835
  type: import_zod7.z.literal("language"),
3712
3836
  tags: import_zod7.z.array(import_zod7.z.string()).optional(),
3713
3837
  pricing: RooPricingSchema,
3714
- deprecated: import_zod7.z.boolean().optional()
3838
+ deprecated: import_zod7.z.boolean().optional(),
3839
+ default_temperature: import_zod7.z.number().optional(),
3840
+ // Dynamic settings that map directly to ModelInfo properties
3841
+ // Allows the API to configure model-specific defaults like includedTools, excludedTools, reasoningEffort, etc.
3842
+ // These are always direct values (e.g., includedTools: ['search_replace']) for backward compatibility with old clients.
3843
+ settings: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.unknown()).optional(),
3844
+ // Versioned settings keyed by version number (e.g., '3.36.4').
3845
+ // Each version key maps to a settings object that is used when plugin version >= that version.
3846
+ // New clients find the highest version key <= current version and use those settings.
3847
+ // Old clients ignore this field and use plain values from `settings`.
3848
+ // Example: { '3.36.4': { includedTools: ['search_replace'] }, '3.35.0': { ... } }
3849
+ versionedSettings: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.record(import_zod7.z.string(), import_zod7.z.unknown())).optional()
3715
3850
  });
3716
3851
  var RooModelsResponseSchema = import_zod7.z.object({
3717
3852
  object: import_zod7.z.literal("list"),
@@ -4477,15 +4612,17 @@ var xaiDefaultModelId = "grok-code-fast-1";
4477
4612
  var xaiModels = {
4478
4613
  "grok-code-fast-1": {
4479
4614
  maxTokens: 16384,
4480
- contextWindow: 262144,
4481
- supportsImages: false,
4615
+ contextWindow: 256e3,
4616
+ supportsImages: true,
4482
4617
  supportsPromptCache: true,
4483
4618
  supportsNativeTools: true,
4484
4619
  inputPrice: 0.2,
4485
4620
  outputPrice: 1.5,
4486
4621
  cacheWritesPrice: 0.02,
4487
4622
  cacheReadsPrice: 0.02,
4488
- description: "xAI's Grok Code Fast model with 256K context window"
4623
+ description: "xAI's Grok Code Fast model with 256K context window",
4624
+ includedTools: ["search_replace"],
4625
+ excludedTools: ["apply_diff"]
4489
4626
  },
4490
4627
  "grok-4-1-fast-reasoning": {
4491
4628
  maxTokens: 65536,
@@ -4497,7 +4634,9 @@ var xaiModels = {
4497
4634
  outputPrice: 0.5,
4498
4635
  cacheWritesPrice: 0.05,
4499
4636
  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"
4637
+ description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning",
4638
+ includedTools: ["search_replace"],
4639
+ excludedTools: ["apply_diff"]
4501
4640
  },
4502
4641
  "grok-4-1-fast-non-reasoning": {
4503
4642
  maxTokens: 65536,
@@ -4509,7 +4648,9 @@ var xaiModels = {
4509
4648
  outputPrice: 0.5,
4510
4649
  cacheWritesPrice: 0.05,
4511
4650
  cacheReadsPrice: 0.05,
4512
- description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling"
4651
+ description: "xAI's Grok 4.1 Fast model with 2M context window, optimized for high-performance agentic tool calling",
4652
+ includedTools: ["search_replace"],
4653
+ excludedTools: ["apply_diff"]
4513
4654
  },
4514
4655
  "grok-4-fast-reasoning": {
4515
4656
  maxTokens: 65536,
@@ -4521,7 +4662,9 @@ var xaiModels = {
4521
4662
  outputPrice: 0.5,
4522
4663
  cacheWritesPrice: 0.05,
4523
4664
  cacheReadsPrice: 0.05,
4524
- description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning"
4665
+ description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling with reasoning",
4666
+ includedTools: ["search_replace"],
4667
+ excludedTools: ["apply_diff"]
4525
4668
  },
4526
4669
  "grok-4-fast-non-reasoning": {
4527
4670
  maxTokens: 65536,
@@ -4533,9 +4676,11 @@ var xaiModels = {
4533
4676
  outputPrice: 0.5,
4534
4677
  cacheWritesPrice: 0.05,
4535
4678
  cacheReadsPrice: 0.05,
4536
- description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling"
4679
+ description: "xAI's Grok 4 Fast model with 2M context window, optimized for high-performance agentic tool calling",
4680
+ includedTools: ["search_replace"],
4681
+ excludedTools: ["apply_diff"]
4537
4682
  },
4538
- "grok-4": {
4683
+ "grok-4-0709": {
4539
4684
  maxTokens: 8192,
4540
4685
  contextWindow: 256e3,
4541
4686
  supportsImages: true,
@@ -4545,36 +4690,14 @@ var xaiModels = {
4545
4690
  outputPrice: 15,
4546
4691
  cacheWritesPrice: 0.75,
4547
4692
  cacheReadsPrice: 0.75,
4548
- description: "xAI's Grok-4 model with 256K context window"
4549
- },
4550
- "grok-3": {
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"
4693
+ description: "xAI's Grok-4 model with 256K context window",
4694
+ includedTools: ["search_replace"],
4695
+ excludedTools: ["apply_diff"]
4573
4696
  },
4574
4697
  "grok-3-mini": {
4575
4698
  maxTokens: 8192,
4576
4699
  contextWindow: 131072,
4577
- supportsImages: false,
4700
+ supportsImages: true,
4578
4701
  supportsPromptCache: true,
4579
4702
  supportsNativeTools: true,
4580
4703
  inputPrice: 0.3,
@@ -4582,40 +4705,24 @@ var xaiModels = {
4582
4705
  cacheWritesPrice: 0.07,
4583
4706
  cacheReadsPrice: 0.07,
4584
4707
  description: "xAI's Grok-3 mini model with 128K context window",
4585
- supportsReasoningEffort: true
4586
- },
4587
- "grok-3-mini-fast": {
4588
- maxTokens: 8192,
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
4708
+ supportsReasoningEffort: ["low", "high"],
4709
+ reasoningEffort: "low",
4710
+ includedTools: ["search_replace"],
4711
+ excludedTools: ["apply_diff"]
4599
4712
  },
4600
- "grok-2-1212": {
4713
+ "grok-3": {
4601
4714
  maxTokens: 8192,
4602
4715
  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
4716
  supportsImages: true,
4614
- supportsPromptCache: false,
4717
+ supportsPromptCache: true,
4615
4718
  supportsNativeTools: true,
4616
- inputPrice: 2,
4617
- outputPrice: 10,
4618
- description: "xAI's Grok-2 Vision model (version 1212) with image support and 32K context window"
4719
+ inputPrice: 3,
4720
+ outputPrice: 15,
4721
+ cacheWritesPrice: 0.75,
4722
+ cacheReadsPrice: 0.75,
4723
+ description: "xAI's Grok-3 model with 128K context window",
4724
+ includedTools: ["search_replace"],
4725
+ excludedTools: ["apply_diff"]
4619
4726
  }
4620
4727
  };
4621
4728
 
@@ -4722,7 +4829,6 @@ var internationalZAiModels = {
4722
4829
  supportsImages: false,
4723
4830
  supportsPromptCache: true,
4724
4831
  supportsNativeTools: true,
4725
- supportsReasoningBinary: true,
4726
4832
  inputPrice: 0.6,
4727
4833
  outputPrice: 2.2,
4728
4834
  cacheWritesPrice: 0,
@@ -4795,7 +4901,6 @@ var internationalZAiModels = {
4795
4901
  supportsImages: false,
4796
4902
  supportsPromptCache: true,
4797
4903
  supportsNativeTools: true,
4798
- supportsReasoningBinary: true,
4799
4904
  inputPrice: 0.6,
4800
4905
  outputPrice: 2.2,
4801
4906
  cacheWritesPrice: 0,
@@ -4823,7 +4928,6 @@ var mainlandZAiModels = {
4823
4928
  supportsImages: false,
4824
4929
  supportsPromptCache: true,
4825
4930
  supportsNativeTools: true,
4826
- supportsReasoningBinary: true,
4827
4931
  inputPrice: 0.29,
4828
4932
  outputPrice: 1.14,
4829
4933
  cacheWritesPrice: 0,
@@ -4896,7 +5000,6 @@ var mainlandZAiModels = {
4896
5000
  supportsImages: false,
4897
5001
  supportsPromptCache: true,
4898
5002
  supportsNativeTools: true,
4899
- supportsReasoningBinary: true,
4900
5003
  inputPrice: 0.29,
4901
5004
  outputPrice: 1.14,
4902
5005
  cacheWritesPrice: 0,
@@ -4972,8 +5075,6 @@ function getProviderDefaultModelId(provider, options = { isChina: false }) {
4972
5075
  return openRouterDefaultModelId;
4973
5076
  case "requesty":
4974
5077
  return requestyDefaultModelId;
4975
- case "glama":
4976
- return glamaDefaultModelId;
4977
5078
  case "unbound":
4978
5079
  return unboundDefaultModelId;
4979
5080
  case "litellm":
@@ -5060,7 +5161,6 @@ var dynamicProviders = [
5060
5161
  "io-intelligence",
5061
5162
  "requesty",
5062
5163
  "unbound",
5063
- "glama",
5064
5164
  "roo",
5065
5165
  "chutes"
5066
5166
  ];
@@ -5142,10 +5242,6 @@ var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
5142
5242
  claudeCodePath: import_zod8.z.string().optional(),
5143
5243
  claudeCodeMaxOutputTokens: import_zod8.z.number().int().min(1).max(2e5).optional()
5144
5244
  });
5145
- var glamaSchema = baseProviderSettingsSchema.extend({
5146
- glamaModelId: import_zod8.z.string().optional(),
5147
- glamaApiKey: import_zod8.z.string().optional()
5148
- });
5149
5245
  var openRouterSchema = baseProviderSettingsSchema.extend({
5150
5246
  openRouterApiKey: import_zod8.z.string().optional(),
5151
5247
  openRouterModelId: import_zod8.z.string().optional(),
@@ -5330,7 +5426,6 @@ var defaultSchema = import_zod8.z.object({
5330
5426
  var providerSettingsSchemaDiscriminated = import_zod8.z.discriminatedUnion("apiProvider", [
5331
5427
  anthropicSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("anthropic") })),
5332
5428
  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
5429
  openRouterSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openrouter") })),
5335
5430
  bedrockSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("bedrock") })),
5336
5431
  vertexSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("vertex") })),
@@ -5372,7 +5467,6 @@ var providerSettingsSchema = import_zod8.z.object({
5372
5467
  apiProvider: providerNamesSchema.optional(),
5373
5468
  ...anthropicSchema.shape,
5374
5469
  ...claudeCodeSchema.shape,
5375
- ...glamaSchema.shape,
5376
5470
  ...openRouterSchema.shape,
5377
5471
  ...bedrockSchema.shape,
5378
5472
  ...vertexSchema.shape,
@@ -5417,7 +5511,6 @@ var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscrimina
5417
5511
  var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
5418
5512
  var modelIdKeys = [
5419
5513
  "apiModelId",
5420
- "glamaModelId",
5421
5514
  "openRouterModelId",
5422
5515
  "openAiModelId",
5423
5516
  "ollamaModelId",
@@ -5439,7 +5532,6 @@ var isTypicalProvider = (key) => isProviderName(key) && !isInternalProvider(key)
5439
5532
  var modelIdKeysByProvider = {
5440
5533
  anthropic: "apiModelId",
5441
5534
  "claude-code": "apiModelId",
5442
- glama: "glamaModelId",
5443
5535
  openrouter: "openRouterModelId",
5444
5536
  bedrock: "apiModelId",
5445
5537
  vertex: "apiModelId",
@@ -5570,7 +5662,6 @@ var MODELS_BY_PROVIDER = {
5570
5662
  zai: { id: "zai", label: "Z.ai", models: Object.keys(internationalZAiModels) },
5571
5663
  baseten: { id: "baseten", label: "Baseten", models: Object.keys(basetenModels) },
5572
5664
  // Dynamic providers; models pulled from remote APIs.
5573
- glama: { id: "glama", label: "Glama", models: [] },
5574
5665
  huggingface: { id: "huggingface", label: "Hugging Face", models: [] },
5575
5666
  litellm: { id: "litellm", label: "LiteLLM", models: [] },
5576
5667
  openrouter: { id: "openrouter", label: "OpenRouter", models: [] },
@@ -5802,6 +5893,67 @@ var rooCodeTelemetryEventSchema = import_zod11.z.discriminatedUnion("type", [
5802
5893
  })
5803
5894
  })
5804
5895
  ]);
5896
+ var EXPECTED_API_ERROR_CODES = /* @__PURE__ */ new Set([
5897
+ 402,
5898
+ // Payment required - billing issues
5899
+ 429
5900
+ // Rate limit - expected when hitting API limits
5901
+ ]);
5902
+ var EXPECTED_ERROR_MESSAGE_PATTERNS = [
5903
+ /^429\b/,
5904
+ // Message starts with "429"
5905
+ /rate limit/i
5906
+ // Contains "rate limit" (case insensitive)
5907
+ ];
5908
+ function isOpenAISdkError(error) {
5909
+ return typeof error === "object" && error !== null && "status" in error && typeof error.status === "number";
5910
+ }
5911
+ function getErrorStatusCode(error) {
5912
+ if (isOpenAISdkError(error)) {
5913
+ return error.status;
5914
+ }
5915
+ return void 0;
5916
+ }
5917
+ function getErrorMessage(error) {
5918
+ if (isOpenAISdkError(error)) {
5919
+ return error.error?.metadata?.raw || error.error?.message || error.message;
5920
+ }
5921
+ return void 0;
5922
+ }
5923
+ function shouldReportApiErrorToTelemetry(errorCode, errorMessage) {
5924
+ if (errorCode !== void 0 && EXPECTED_API_ERROR_CODES.has(errorCode)) {
5925
+ return false;
5926
+ }
5927
+ if (errorMessage) {
5928
+ for (const pattern of EXPECTED_ERROR_MESSAGE_PATTERNS) {
5929
+ if (pattern.test(errorMessage)) {
5930
+ return false;
5931
+ }
5932
+ }
5933
+ }
5934
+ return true;
5935
+ }
5936
+ var ApiProviderError = class extends Error {
5937
+ constructor(message, provider, modelId, operation, errorCode) {
5938
+ super(message);
5939
+ this.provider = provider;
5940
+ this.modelId = modelId;
5941
+ this.operation = operation;
5942
+ this.errorCode = errorCode;
5943
+ this.name = "ApiProviderError";
5944
+ }
5945
+ };
5946
+ function isApiProviderError(error) {
5947
+ return error instanceof Error && error.name === "ApiProviderError" && "provider" in error && "modelId" in error && "operation" in error;
5948
+ }
5949
+ function extractApiProviderErrorProperties(error) {
5950
+ return {
5951
+ provider: error.provider,
5952
+ modelId: error.modelId,
5953
+ operation: error.operation,
5954
+ ...error.errorCode !== void 0 && { errorCode: error.errorCode }
5955
+ };
5956
+ }
5805
5957
 
5806
5958
  // src/mode.ts
5807
5959
  var import_zod12 = require("zod");
@@ -5880,7 +6032,7 @@ var DEFAULT_MODES = [
5880
6032
  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
6033
  description: "Plan and design before implementation",
5882
6034
  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.**"
6035
+ 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
6036
  },
5885
6037
  {
5886
6038
  slug: "code",
@@ -6098,7 +6250,6 @@ var GLOBAL_SETTINGS_KEYS = globalSettingsSchema.keyof().options;
6098
6250
  var rooCodeSettingsSchema = providerSettingsSchema.merge(globalSettingsSchema);
6099
6251
  var SECRET_STATE_KEYS = [
6100
6252
  "apiKey",
6101
- "glamaApiKey",
6102
6253
  "openRouterApiKey",
6103
6254
  "awsAccessKey",
6104
6255
  "awsApiKey",
@@ -6664,6 +6815,16 @@ var usageStatsSchema = import_zod16.z.object({
6664
6815
  // Period in days (e.g., 30)
6665
6816
  });
6666
6817
 
6818
+ // src/context-management.ts
6819
+ var CONTEXT_MANAGEMENT_EVENTS = [
6820
+ "condense_context",
6821
+ "condense_context_error",
6822
+ "sliding_window_truncation"
6823
+ ];
6824
+ function isContextManagementEvent(value) {
6825
+ return typeof value === "string" && CONTEXT_MANAGEMENT_EVENTS.includes(value);
6826
+ }
6827
+
6667
6828
  // src/cookie-consent.ts
6668
6829
  var CONSENT_COOKIE_NAME = "roo-code-cookie-consent";
6669
6830
  var COOKIE_CONSENT_EVENTS = {
@@ -6856,6 +7017,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
6856
7017
  ANTHROPIC_DEFAULT_MAX_TOKENS,
6857
7018
  ANTHROPIC_STYLE_PROVIDERS,
6858
7019
  AWS_INFERENCE_PROFILE_MAPPING,
7020
+ ApiProviderError,
6859
7021
  BEDROCK_1M_CONTEXT_MODEL_IDS,
6860
7022
  BEDROCK_DEFAULT_CONTEXT,
6861
7023
  BEDROCK_DEFAULT_TEMPERATURE,
@@ -6865,6 +7027,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
6865
7027
  CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
6866
7028
  CODEBASE_INDEX_DEFAULTS,
6867
7029
  CONSENT_COOKIE_NAME,
7030
+ CONTEXT_MANAGEMENT_EVENTS,
6868
7031
  COOKIE_CONSENT_EVENTS,
6869
7032
  ConnectionState,
6870
7033
  DEEP_SEEK_DEFAULT_TEMPERATURE,
@@ -6877,10 +7040,10 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
6877
7040
  DOUBAO_API_CHAT_PATH,
6878
7041
  EVALS_SETTINGS,
6879
7042
  EVALS_TIMEOUT,
7043
+ EXPECTED_API_ERROR_CODES,
6880
7044
  ExtensionBridgeCommandName,
6881
7045
  ExtensionBridgeEventName,
6882
7046
  ExtensionSocketEvents,
6883
- GLAMA_DEFAULT_TEMPERATURE,
6884
7047
  GLOBAL_SECRET_KEYS,
6885
7048
  GLOBAL_SETTINGS_KEYS,
6886
7049
  GLOBAL_STATE_KEYS,
@@ -6964,6 +7127,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
6964
7127
  commandExecutionStatusSchema,
6965
7128
  commandIds,
6966
7129
  contextCondenseSchema,
7130
+ contextTruncationSchema,
6967
7131
  convertModelNameForVertex,
6968
7132
  customModePromptsSchema,
6969
7133
  customModesSettingsSchema,
@@ -6985,6 +7149,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
6985
7149
  extensionBridgeCommandSchema,
6986
7150
  extensionBridgeEventSchema,
6987
7151
  extensionInstanceSchema,
7152
+ extractApiProviderErrorProperties,
6988
7153
  fauxProviders,
6989
7154
  featherlessDefaultModelId,
6990
7155
  featherlessModels,
@@ -6996,12 +7161,12 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
6996
7161
  getApiProtocol,
6997
7162
  getClaudeCodeModelId,
6998
7163
  getEffectiveProtocol,
7164
+ getErrorMessage,
7165
+ getErrorStatusCode,
6999
7166
  getImageGenerationProvider,
7000
7167
  getModelId,
7001
7168
  getProviderDefaultModelId,
7002
7169
  gitPropertiesSchema,
7003
- glamaDefaultModelId,
7004
- glamaDefaultModelInfo,
7005
7170
  globalSettingsSchema,
7006
7171
  groqDefaultModelId,
7007
7172
  groqModels,
@@ -7018,6 +7183,8 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
7018
7183
  ioIntelligenceDefaultModelId,
7019
7184
  ioIntelligenceModels,
7020
7185
  ipcMessageSchema,
7186
+ isApiProviderError,
7187
+ isContextManagementEvent,
7021
7188
  isCustomProvider,
7022
7189
  isDynamicProvider,
7023
7190
  isFauxProvider,
@@ -7106,6 +7273,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
7106
7273
  serviceTierSchema,
7107
7274
  serviceTiers,
7108
7275
  shareResponseSchema,
7276
+ shouldReportApiErrorToTelemetry,
7109
7277
  shouldUseSingleFileRead,
7110
7278
  staticAppPropertiesSchema,
7111
7279
  suggestionItemSchema,