@roo-code/types 1.78.0 → 1.79.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
@@ -67,7 +67,6 @@ __export(index_exports, {
67
67
  LMSTUDIO_DEFAULT_TEMPERATURE: () => LMSTUDIO_DEFAULT_TEMPERATURE,
68
68
  MISTRAL_DEFAULT_TEMPERATURE: () => MISTRAL_DEFAULT_TEMPERATURE,
69
69
  MODELS_BY_PROVIDER: () => MODELS_BY_PROVIDER,
70
- MODEL_ID_KEYS: () => MODEL_ID_KEYS,
71
70
  MOONSHOT_DEFAULT_TEMPERATURE: () => MOONSHOT_DEFAULT_TEMPERATURE,
72
71
  OPENAI_AZURE_AI_INFERENCE_PATH: () => OPENAI_AZURE_AI_INFERENCE_PATH,
73
72
  OPENAI_NATIVE_DEFAULT_TEMPERATURE: () => OPENAI_NATIVE_DEFAULT_TEMPERATURE,
@@ -123,6 +122,7 @@ __export(index_exports, {
123
122
  convertModelNameForVertex: () => convertModelNameForVertex,
124
123
  customModePromptsSchema: () => customModePromptsSchema,
125
124
  customModesSettingsSchema: () => customModesSettingsSchema,
125
+ customProviders: () => customProviders,
126
126
  customSupportPromptsSchema: () => customSupportPromptsSchema,
127
127
  deepInfraDefaultModelId: () => deepInfraDefaultModelId,
128
128
  deepInfraDefaultModelInfo: () => deepInfraDefaultModelInfo,
@@ -140,6 +140,7 @@ __export(index_exports, {
140
140
  extensionBridgeCommandSchema: () => extensionBridgeCommandSchema,
141
141
  extensionBridgeEventSchema: () => extensionBridgeEventSchema,
142
142
  extensionInstanceSchema: () => extensionInstanceSchema,
143
+ fauxProviders: () => fauxProviders,
143
144
  featherlessDefaultModelId: () => featherlessDefaultModelId,
144
145
  featherlessModels: () => featherlessModels,
145
146
  fireworksDefaultModelId: () => fireworksDefaultModelId,
@@ -162,26 +163,34 @@ __export(index_exports, {
162
163
  idleAsks: () => idleAsks,
163
164
  installMarketplaceItemOptionsSchema: () => installMarketplaceItemOptionsSchema,
164
165
  interactiveAsks: () => interactiveAsks,
166
+ internalProviders: () => internalProviders,
165
167
  internationalZAiDefaultModelId: () => internationalZAiDefaultModelId,
166
168
  internationalZAiModels: () => internationalZAiModels,
167
169
  ioIntelligenceDefaultBaseUrl: () => ioIntelligenceDefaultBaseUrl,
168
170
  ioIntelligenceDefaultModelId: () => ioIntelligenceDefaultModelId,
169
171
  ioIntelligenceModels: () => ioIntelligenceModels,
170
172
  ipcMessageSchema: () => ipcMessageSchema,
173
+ isCustomProvider: () => isCustomProvider,
171
174
  isDynamicProvider: () => isDynamicProvider,
175
+ isFauxProvider: () => isFauxProvider,
172
176
  isGlobalStateKey: () => isGlobalStateKey,
173
177
  isIdleAsk: () => isIdleAsk,
174
178
  isInteractiveAsk: () => isInteractiveAsk,
179
+ isInternalProvider: () => isInternalProvider,
175
180
  isLanguage: () => isLanguage,
181
+ isLocalProvider: () => isLocalProvider,
176
182
  isModelParameter: () => isModelParameter,
183
+ isProviderName: () => isProviderName,
177
184
  isResumableAsk: () => isResumableAsk,
178
185
  isSecretStateKey: () => isSecretStateKey,
186
+ isTypicalProvider: () => isTypicalProvider,
179
187
  lMStudioDefaultModelId: () => lMStudioDefaultModelId,
180
188
  lMStudioDefaultModelInfo: () => lMStudioDefaultModelInfo,
181
189
  languages: () => languages,
182
190
  languagesSchema: () => languagesSchema,
183
191
  litellmDefaultModelId: () => litellmDefaultModelId,
184
192
  litellmDefaultModelInfo: () => litellmDefaultModelInfo,
193
+ localProviders: () => localProviders,
185
194
  mainlandZAiDefaultModelId: () => mainlandZAiDefaultModelId,
186
195
  mainlandZAiModels: () => mainlandZAiModels,
187
196
  marketplaceItemSchema: () => marketplaceItemSchema,
@@ -194,6 +203,8 @@ __export(index_exports, {
194
203
  mistralModels: () => mistralModels,
195
204
  modeConfigSchema: () => modeConfigSchema,
196
205
  modeMarketplaceItemSchema: () => modeMarketplaceItemSchema,
206
+ modelIdKeys: () => modelIdKeys,
207
+ modelIdKeysByProvider: () => modelIdKeysByProvider,
197
208
  modelInfoSchema: () => modelInfoSchema,
198
209
  modelParameters: () => modelParameters,
199
210
  modelParametersSchema: () => modelParametersSchema,
@@ -4062,52 +4073,63 @@ var deepInfraDefaultModelInfo = {
4062
4073
  };
4063
4074
 
4064
4075
  // src/provider-settings.ts
4076
+ var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
4077
+ var dynamicProviders = [
4078
+ "openrouter",
4079
+ "vercel-ai-gateway",
4080
+ "huggingface",
4081
+ "litellm",
4082
+ "deepinfra",
4083
+ "io-intelligence",
4084
+ "requesty",
4085
+ "unbound",
4086
+ "glama"
4087
+ ];
4088
+ var isDynamicProvider = (key) => dynamicProviders.includes(key);
4089
+ var localProviders = ["ollama", "lmstudio"];
4090
+ var isLocalProvider = (key) => localProviders.includes(key);
4091
+ var internalProviders = ["vscode-lm"];
4092
+ var isInternalProvider = (key) => internalProviders.includes(key);
4093
+ var customProviders = ["openai"];
4094
+ var isCustomProvider = (key) => customProviders.includes(key);
4095
+ var fauxProviders = ["fake-ai", "human-relay"];
4096
+ var isFauxProvider = (key) => fauxProviders.includes(key);
4065
4097
  var providerNames = [
4098
+ ...dynamicProviders,
4099
+ ...localProviders,
4100
+ ...internalProviders,
4101
+ ...customProviders,
4102
+ ...fauxProviders,
4066
4103
  "anthropic",
4067
- "claude-code",
4068
- "glama",
4069
- "openrouter",
4070
4104
  "bedrock",
4071
- "vertex",
4072
- "openai",
4073
- "ollama",
4074
- "vscode-lm",
4075
- "lmstudio",
4105
+ "cerebras",
4106
+ "chutes",
4107
+ "claude-code",
4108
+ "doubao",
4109
+ "deepseek",
4110
+ "featherless",
4111
+ "fireworks",
4076
4112
  "gemini",
4077
4113
  "gemini-cli",
4078
- "openai-native",
4114
+ "groq",
4079
4115
  "mistral",
4080
4116
  "moonshot",
4081
- "deepseek",
4082
- "deepinfra",
4083
- "doubao",
4117
+ "openai-native",
4084
4118
  "qwen-code",
4085
- "unbound",
4086
- "requesty",
4087
- "human-relay",
4088
- "fake-ai",
4089
- "xai",
4090
- "groq",
4091
- "chutes",
4092
- "litellm",
4093
- "huggingface",
4094
- "cerebras",
4095
- "sambanova",
4096
- "zai",
4097
- "fireworks",
4098
- "featherless",
4099
- "io-intelligence",
4100
4119
  "roo",
4101
- "vercel-ai-gateway"
4120
+ "sambanova",
4121
+ "vertex",
4122
+ "xai",
4123
+ "zai"
4102
4124
  ];
4103
4125
  var providerNamesSchema = import_zod7.z.enum(providerNames);
4126
+ var isProviderName = (key) => typeof key === "string" && providerNames.includes(key);
4104
4127
  var providerSettingsEntrySchema = import_zod7.z.object({
4105
4128
  id: import_zod7.z.string(),
4106
4129
  name: import_zod7.z.string(),
4107
4130
  apiProvider: providerNamesSchema.optional(),
4108
4131
  modelId: import_zod7.z.string().optional()
4109
4132
  });
4110
- var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
4111
4133
  var baseProviderSettingsSchema = import_zod7.z.object({
4112
4134
  includeMaxTokens: import_zod7.z.boolean().optional(),
4113
4135
  diffEnabled: import_zod7.z.boolean().optional(),
@@ -4132,7 +4154,7 @@ var anthropicSchema = apiModelIdProviderModelSchema.extend({
4132
4154
  anthropicBaseUrl: import_zod7.z.string().optional(),
4133
4155
  anthropicUseAuthToken: import_zod7.z.boolean().optional(),
4134
4156
  anthropicBeta1MContext: import_zod7.z.boolean().optional()
4135
- // Enable 'context-1m-2025-08-07' beta for 1M context window
4157
+ // Enable 'context-1m-2025-08-07' beta for 1M context window.
4136
4158
  });
4137
4159
  var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
4138
4160
  claudeCodePath: import_zod7.z.string().optional(),
@@ -4165,7 +4187,7 @@ var bedrockSchema = apiModelIdProviderModelSchema.extend({
4165
4187
  awsBedrockEndpointEnabled: import_zod7.z.boolean().optional(),
4166
4188
  awsBedrockEndpoint: import_zod7.z.string().optional(),
4167
4189
  awsBedrock1MContext: import_zod7.z.boolean().optional()
4168
- // Enable 'context-1m-2025-08-07' beta for 1M context window
4190
+ // Enable 'context-1m-2025-08-07' beta for 1M context window.
4169
4191
  });
4170
4192
  var vertexSchema = apiModelIdProviderModelSchema.extend({
4171
4193
  vertexKeyFile: import_zod7.z.string().optional(),
@@ -4304,7 +4326,7 @@ var qwenCodeSchema = apiModelIdProviderModelSchema.extend({
4304
4326
  qwenCodeOauthPath: import_zod7.z.string().optional()
4305
4327
  });
4306
4328
  var rooSchema = apiModelIdProviderModelSchema.extend({
4307
- // No additional fields needed - uses cloud authentication
4329
+ // No additional fields needed - uses cloud authentication.
4308
4330
  });
4309
4331
  var vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
4310
4332
  vercelAiGatewayApiKey: import_zod7.z.string().optional(),
@@ -4397,7 +4419,7 @@ var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscrimina
4397
4419
  import_zod7.z.object({ id: import_zod7.z.string().optional() })
4398
4420
  );
4399
4421
  var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
4400
- var MODEL_ID_KEYS = [
4422
+ var modelIdKeys = [
4401
4423
  "apiModelId",
4402
4424
  "glamaModelId",
4403
4425
  "openRouterModelId",
@@ -4414,9 +4436,44 @@ var MODEL_ID_KEYS = [
4414
4436
  "deepInfraModelId"
4415
4437
  ];
4416
4438
  var getModelId = (settings) => {
4417
- const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
4439
+ const modelIdKey = modelIdKeys.find((key) => settings[key]);
4418
4440
  return modelIdKey ? settings[modelIdKey] : void 0;
4419
4441
  };
4442
+ var isTypicalProvider = (key) => isProviderName(key) && !isInternalProvider(key) && !isCustomProvider(key) && !isFauxProvider(key);
4443
+ var modelIdKeysByProvider = {
4444
+ anthropic: "apiModelId",
4445
+ "claude-code": "apiModelId",
4446
+ glama: "glamaModelId",
4447
+ openrouter: "openRouterModelId",
4448
+ bedrock: "apiModelId",
4449
+ vertex: "apiModelId",
4450
+ "openai-native": "openAiModelId",
4451
+ ollama: "ollamaModelId",
4452
+ lmstudio: "lmStudioModelId",
4453
+ gemini: "apiModelId",
4454
+ "gemini-cli": "apiModelId",
4455
+ mistral: "apiModelId",
4456
+ moonshot: "apiModelId",
4457
+ deepseek: "apiModelId",
4458
+ deepinfra: "deepInfraModelId",
4459
+ doubao: "apiModelId",
4460
+ "qwen-code": "apiModelId",
4461
+ unbound: "unboundModelId",
4462
+ requesty: "requestyModelId",
4463
+ xai: "apiModelId",
4464
+ groq: "apiModelId",
4465
+ chutes: "apiModelId",
4466
+ litellm: "litellmModelId",
4467
+ huggingface: "huggingFaceModelId",
4468
+ cerebras: "apiModelId",
4469
+ sambanova: "apiModelId",
4470
+ zai: "apiModelId",
4471
+ fireworks: "apiModelId",
4472
+ featherless: "apiModelId",
4473
+ "io-intelligence": "ioIntelligenceModelId",
4474
+ roo: "apiModelId",
4475
+ "vercel-ai-gateway": "vercelAiGatewayModelId"
4476
+ };
4420
4477
  var ANTHROPIC_STYLE_PROVIDERS = ["anthropic", "claude-code", "bedrock"];
4421
4478
  var getApiProtocol = (provider, modelId) => {
4422
4479
  if (provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider)) {
@@ -4523,17 +4580,6 @@ var MODELS_BY_PROVIDER = {
4523
4580
  deepinfra: { id: "deepinfra", label: "DeepInfra", models: [] },
4524
4581
  "vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] }
4525
4582
  };
4526
- var dynamicProviders = [
4527
- "glama",
4528
- "huggingface",
4529
- "litellm",
4530
- "openrouter",
4531
- "requesty",
4532
- "unbound",
4533
- "deepinfra",
4534
- "vercel-ai-gateway"
4535
- ];
4536
- var isDynamicProvider = (key) => dynamicProviders.includes(key);
4537
4583
 
4538
4584
  // src/history.ts
4539
4585
  var import_zod8 = require("zod");
@@ -5723,7 +5769,6 @@ var commandExecutionStatusSchema = import_zod20.z.discriminatedUnion("status", [
5723
5769
  LMSTUDIO_DEFAULT_TEMPERATURE,
5724
5770
  MISTRAL_DEFAULT_TEMPERATURE,
5725
5771
  MODELS_BY_PROVIDER,
5726
- MODEL_ID_KEYS,
5727
5772
  MOONSHOT_DEFAULT_TEMPERATURE,
5728
5773
  OPENAI_AZURE_AI_INFERENCE_PATH,
5729
5774
  OPENAI_NATIVE_DEFAULT_TEMPERATURE,
@@ -5779,6 +5824,7 @@ var commandExecutionStatusSchema = import_zod20.z.discriminatedUnion("status", [
5779
5824
  convertModelNameForVertex,
5780
5825
  customModePromptsSchema,
5781
5826
  customModesSettingsSchema,
5827
+ customProviders,
5782
5828
  customSupportPromptsSchema,
5783
5829
  deepInfraDefaultModelId,
5784
5830
  deepInfraDefaultModelInfo,
@@ -5796,6 +5842,7 @@ var commandExecutionStatusSchema = import_zod20.z.discriminatedUnion("status", [
5796
5842
  extensionBridgeCommandSchema,
5797
5843
  extensionBridgeEventSchema,
5798
5844
  extensionInstanceSchema,
5845
+ fauxProviders,
5799
5846
  featherlessDefaultModelId,
5800
5847
  featherlessModels,
5801
5848
  fireworksDefaultModelId,
@@ -5818,26 +5865,34 @@ var commandExecutionStatusSchema = import_zod20.z.discriminatedUnion("status", [
5818
5865
  idleAsks,
5819
5866
  installMarketplaceItemOptionsSchema,
5820
5867
  interactiveAsks,
5868
+ internalProviders,
5821
5869
  internationalZAiDefaultModelId,
5822
5870
  internationalZAiModels,
5823
5871
  ioIntelligenceDefaultBaseUrl,
5824
5872
  ioIntelligenceDefaultModelId,
5825
5873
  ioIntelligenceModels,
5826
5874
  ipcMessageSchema,
5875
+ isCustomProvider,
5827
5876
  isDynamicProvider,
5877
+ isFauxProvider,
5828
5878
  isGlobalStateKey,
5829
5879
  isIdleAsk,
5830
5880
  isInteractiveAsk,
5881
+ isInternalProvider,
5831
5882
  isLanguage,
5883
+ isLocalProvider,
5832
5884
  isModelParameter,
5885
+ isProviderName,
5833
5886
  isResumableAsk,
5834
5887
  isSecretStateKey,
5888
+ isTypicalProvider,
5835
5889
  lMStudioDefaultModelId,
5836
5890
  lMStudioDefaultModelInfo,
5837
5891
  languages,
5838
5892
  languagesSchema,
5839
5893
  litellmDefaultModelId,
5840
5894
  litellmDefaultModelInfo,
5895
+ localProviders,
5841
5896
  mainlandZAiDefaultModelId,
5842
5897
  mainlandZAiModels,
5843
5898
  marketplaceItemSchema,
@@ -5850,6 +5905,8 @@ var commandExecutionStatusSchema = import_zod20.z.discriminatedUnion("status", [
5850
5905
  mistralModels,
5851
5906
  modeConfigSchema,
5852
5907
  modeMarketplaceItemSchema,
5908
+ modelIdKeys,
5909
+ modelIdKeysByProvider,
5853
5910
  modelInfoSchema,
5854
5911
  modelParameters,
5855
5912
  modelParametersSchema,