@roo-code/types 1.60.0 → 1.61.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
@@ -70,10 +70,13 @@ __export(index_exports, {
70
70
  PROVIDER_SETTINGS_KEYS: () => PROVIDER_SETTINGS_KEYS,
71
71
  RooCodeEventName: () => RooCodeEventName,
72
72
  SECRET_STATE_KEYS: () => SECRET_STATE_KEYS,
73
- SINGLE_FILE_READ_MODELS: () => SINGLE_FILE_READ_MODELS,
74
73
  TaskCommandName: () => TaskCommandName,
75
74
  TaskStatus: () => TaskStatus,
76
75
  TelemetryEventName: () => TelemetryEventName,
76
+ VERCEL_AI_GATEWAY_DEFAULT_TEMPERATURE: () => VERCEL_AI_GATEWAY_DEFAULT_TEMPERATURE,
77
+ VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS: () => VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS,
78
+ VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS: () => VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS,
79
+ VERCEL_AI_GATEWAY_VISION_ONLY_MODELS: () => VERCEL_AI_GATEWAY_VISION_ONLY_MODELS,
77
80
  VERTEX_REGIONS: () => VERTEX_REGIONS,
78
81
  ZAI_DEFAULT_TEMPERATURE: () => ZAI_DEFAULT_TEMPERATURE,
79
82
  ackSchema: () => ackSchema,
@@ -230,6 +233,8 @@ __export(index_exports, {
230
233
  unboundDefaultModelInfo: () => unboundDefaultModelInfo,
231
234
  verbosityLevels: () => verbosityLevels,
232
235
  verbosityLevelsSchema: () => verbosityLevelsSchema,
236
+ vercelAiGatewayDefaultModelId: () => vercelAiGatewayDefaultModelId,
237
+ vercelAiGatewayDefaultModelInfo: () => vercelAiGatewayDefaultModelInfo,
233
238
  vertexDefaultModelId: () => vertexDefaultModelId,
234
239
  vertexModels: () => vertexModels,
235
240
  vscodeLlmDefaultModelId: () => vscodeLlmDefaultModelId,
@@ -2889,16 +2894,16 @@ var requestyDefaultModelInfo = {
2889
2894
  };
2890
2895
 
2891
2896
  // src/providers/roo.ts
2892
- var rooDefaultModelId = "roo/sonic";
2897
+ var rooDefaultModelId = "xai/grok-code-fast-1";
2893
2898
  var rooModels = {
2894
- "roo/sonic": {
2899
+ "xai/grok-code-fast-1": {
2895
2900
  maxTokens: 16384,
2896
2901
  contextWindow: 262144,
2897
2902
  supportsImages: false,
2898
2903
  supportsPromptCache: true,
2899
2904
  inputPrice: 0,
2900
2905
  outputPrice: 0,
2901
- description: "A stealth reasoning model that is blazing fast and excels at agentic coding, accessible for free through Roo Code Cloud for a limited time. (Note: prompts and completions are logged by the model creator and used to improve the model.)"
2906
+ description: "A reasoning model that is blazing fast and excels at agentic coding, accessible for free through Roo Code Cloud for a limited time. (Note: the free prompts and completions are logged by xAI and used to improve the model.)"
2902
2907
  }
2903
2908
  };
2904
2909
 
@@ -3506,8 +3511,19 @@ var vscodeLlmModels = {
3506
3511
  };
3507
3512
 
3508
3513
  // src/providers/xai.ts
3509
- var xaiDefaultModelId = "grok-4";
3514
+ var xaiDefaultModelId = "grok-code-fast-1";
3510
3515
  var xaiModels = {
3516
+ "grok-code-fast-1": {
3517
+ maxTokens: 16384,
3518
+ contextWindow: 262144,
3519
+ supportsImages: false,
3520
+ supportsPromptCache: true,
3521
+ inputPrice: 0.2,
3522
+ outputPrice: 1.5,
3523
+ cacheWritesPrice: 0.02,
3524
+ cacheReadsPrice: 0.02,
3525
+ description: "xAI's Grok Code Fast model with 256K context window"
3526
+ },
3511
3527
  "grok-4": {
3512
3528
  maxTokens: 8192,
3513
3529
  contextWindow: 256e3,
@@ -3585,6 +3601,101 @@ var xaiModels = {
3585
3601
  }
3586
3602
  };
3587
3603
 
3604
+ // src/providers/vercel-ai-gateway.ts
3605
+ var vercelAiGatewayDefaultModelId = "anthropic/claude-sonnet-4";
3606
+ var VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS = /* @__PURE__ */ new Set([
3607
+ "anthropic/claude-3-haiku",
3608
+ "anthropic/claude-3-opus",
3609
+ "anthropic/claude-3.5-haiku",
3610
+ "anthropic/claude-3.5-sonnet",
3611
+ "anthropic/claude-3.7-sonnet",
3612
+ "anthropic/claude-opus-4",
3613
+ "anthropic/claude-opus-4.1",
3614
+ "anthropic/claude-sonnet-4",
3615
+ "openai/gpt-4.1",
3616
+ "openai/gpt-4.1-mini",
3617
+ "openai/gpt-4.1-nano",
3618
+ "openai/gpt-4o",
3619
+ "openai/gpt-4o-mini",
3620
+ "openai/gpt-5",
3621
+ "openai/gpt-5-mini",
3622
+ "openai/gpt-5-nano",
3623
+ "openai/o1",
3624
+ "openai/o3",
3625
+ "openai/o3-mini",
3626
+ "openai/o4-mini"
3627
+ ]);
3628
+ var VERCEL_AI_GATEWAY_VISION_ONLY_MODELS = /* @__PURE__ */ new Set([
3629
+ "alibaba/qwen-3-14b",
3630
+ "alibaba/qwen-3-235b",
3631
+ "alibaba/qwen-3-30b",
3632
+ "alibaba/qwen-3-32b",
3633
+ "alibaba/qwen3-coder",
3634
+ "amazon/nova-pro",
3635
+ "anthropic/claude-3.5-haiku",
3636
+ "google/gemini-1.5-flash-8b",
3637
+ "google/gemini-2.0-flash-thinking",
3638
+ "google/gemma-3-27b",
3639
+ "mistral/devstral-small",
3640
+ "xai/grok-vision-beta"
3641
+ ]);
3642
+ var VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS = /* @__PURE__ */ new Set([
3643
+ "amazon/nova-lite",
3644
+ "anthropic/claude-3-haiku",
3645
+ "anthropic/claude-3-opus",
3646
+ "anthropic/claude-3-sonnet",
3647
+ "anthropic/claude-3.5-sonnet",
3648
+ "anthropic/claude-3.7-sonnet",
3649
+ "anthropic/claude-opus-4",
3650
+ "anthropic/claude-opus-4.1",
3651
+ "anthropic/claude-sonnet-4",
3652
+ "google/gemini-1.5-flash",
3653
+ "google/gemini-1.5-pro",
3654
+ "google/gemini-2.0-flash",
3655
+ "google/gemini-2.0-flash-lite",
3656
+ "google/gemini-2.0-pro",
3657
+ "google/gemini-2.5-flash",
3658
+ "google/gemini-2.5-flash-lite",
3659
+ "google/gemini-2.5-pro",
3660
+ "google/gemini-exp",
3661
+ "meta/llama-3.2-11b",
3662
+ "meta/llama-3.2-90b",
3663
+ "meta/llama-3.3",
3664
+ "meta/llama-4-maverick",
3665
+ "meta/llama-4-scout",
3666
+ "mistral/pixtral-12b",
3667
+ "mistral/pixtral-large",
3668
+ "moonshotai/kimi-k2",
3669
+ "openai/gpt-4-turbo",
3670
+ "openai/gpt-4.1",
3671
+ "openai/gpt-4.1-mini",
3672
+ "openai/gpt-4.1-nano",
3673
+ "openai/gpt-4.5-preview",
3674
+ "openai/gpt-4o",
3675
+ "openai/gpt-4o-mini",
3676
+ "openai/gpt-oss-120b",
3677
+ "openai/gpt-oss-20b",
3678
+ "openai/o3",
3679
+ "openai/o3-pro",
3680
+ "openai/o4-mini",
3681
+ "vercel/v0-1.0-md",
3682
+ "xai/grok-2-vision",
3683
+ "zai/glm-4.5v"
3684
+ ]);
3685
+ var vercelAiGatewayDefaultModelInfo = {
3686
+ maxTokens: 64e3,
3687
+ contextWindow: 2e5,
3688
+ supportsImages: true,
3689
+ supportsComputerUse: true,
3690
+ supportsPromptCache: true,
3691
+ inputPrice: 3,
3692
+ outputPrice: 15,
3693
+ cacheWritesPrice: 3.75,
3694
+ cacheReadsPrice: 0.3,
3695
+ description: "Claude Sonnet 4 significantly improves on Sonnet 3.7's industry-leading capabilities, excelling in coding with a state-of-the-art 72.7% on SWE-bench. The model balances performance and efficiency for internal and external use cases, with enhanced steerability for greater control over implementations. While not matching Opus 4 in most domains, it delivers an optimal mix of capability and practicality."
3696
+ };
3697
+ var VERCEL_AI_GATEWAY_DEFAULT_TEMPERATURE = 0.7;
3698
+
3588
3699
  // src/providers/zai.ts
3589
3700
  var internationalZAiDefaultModelId = "glm-4.5";
3590
3701
  var internationalZAiModels = {
@@ -3713,7 +3824,8 @@ var providerNames = [
3713
3824
  "fireworks",
3714
3825
  "featherless",
3715
3826
  "io-intelligence",
3716
- "roo"
3827
+ "roo",
3828
+ "vercel-ai-gateway"
3717
3829
  ];
3718
3830
  var providerNamesSchema = import_zod8.z.enum(providerNames);
3719
3831
  var providerSettingsEntrySchema = import_zod8.z.object({
@@ -3910,6 +4022,10 @@ var qwenCodeSchema = apiModelIdProviderModelSchema.extend({
3910
4022
  var rooSchema = apiModelIdProviderModelSchema.extend({
3911
4023
  // No additional fields needed - uses cloud authentication
3912
4024
  });
4025
+ var vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
4026
+ vercelAiGatewayApiKey: import_zod8.z.string().optional(),
4027
+ vercelAiGatewayModelId: import_zod8.z.string().optional()
4028
+ });
3913
4029
  var defaultSchema = import_zod8.z.object({
3914
4030
  apiProvider: import_zod8.z.undefined()
3915
4031
  });
@@ -3948,6 +4064,7 @@ var providerSettingsSchemaDiscriminated = import_zod8.z.discriminatedUnion("apiP
3948
4064
  ioIntelligenceSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("io-intelligence") })),
3949
4065
  qwenCodeSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("qwen-code") })),
3950
4066
  rooSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("roo") })),
4067
+ vercelAiGatewaySchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("vercel-ai-gateway") })),
3951
4068
  defaultSchema
3952
4069
  ]);
3953
4070
  var providerSettingsSchema = import_zod8.z.object({
@@ -3986,6 +4103,7 @@ var providerSettingsSchema = import_zod8.z.object({
3986
4103
  ...ioIntelligenceSchema.shape,
3987
4104
  ...qwenCodeSchema.shape,
3988
4105
  ...rooSchema.shape,
4106
+ ...vercelAiGatewaySchema.shape,
3989
4107
  ...codebaseIndexProviderSchema.shape
3990
4108
  });
3991
4109
  var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: import_zod8.z.string().optional() });
@@ -4005,7 +4123,8 @@ var MODEL_ID_KEYS = [
4005
4123
  "requestyModelId",
4006
4124
  "litellmModelId",
4007
4125
  "huggingFaceModelId",
4008
- "ioIntelligenceModelId"
4126
+ "ioIntelligenceModelId",
4127
+ "vercelAiGatewayModelId"
4009
4128
  ];
4010
4129
  var getModelId = (settings) => {
4011
4130
  const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
@@ -4110,7 +4229,8 @@ var MODELS_BY_PROVIDER = {
4110
4229
  litellm: { id: "litellm", label: "LiteLLM", models: [] },
4111
4230
  openrouter: { id: "openrouter", label: "OpenRouter", models: [] },
4112
4231
  requesty: { id: "requesty", label: "Requesty", models: [] },
4113
- unbound: { id: "unbound", label: "Unbound", models: [] }
4232
+ unbound: { id: "unbound", label: "Unbound", models: [] },
4233
+ "vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] }
4114
4234
  };
4115
4235
  var dynamicProviders = [
4116
4236
  "glama",
@@ -4118,7 +4238,8 @@ var dynamicProviders = [
4118
4238
  "litellm",
4119
4239
  "openrouter",
4120
4240
  "requesty",
4121
- "unbound"
4241
+ "unbound",
4242
+ "vercel-ai-gateway"
4122
4243
  ];
4123
4244
  var isDynamicProvider = (key) => dynamicProviders.includes(key);
4124
4245
 
@@ -4590,7 +4711,8 @@ var SECRET_STATE_KEYS = [
4590
4711
  "zaiApiKey",
4591
4712
  "fireworksApiKey",
4592
4713
  "featherlessApiKey",
4593
- "ioIntelligenceApiKey"
4714
+ "ioIntelligenceApiKey",
4715
+ "vercelAiGatewayApiKey"
4594
4716
  ];
4595
4717
  var isSecretStateKey = (key) => SECRET_STATE_KEYS.includes(key);
4596
4718
  var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].filter(
@@ -4811,18 +4933,8 @@ var mcpExecutionStatusSchema = import_zod16.z.discriminatedUnion("status", [
4811
4933
  ]);
4812
4934
 
4813
4935
  // src/single-file-read-models.ts
4814
- var SINGLE_FILE_READ_MODELS = /* @__PURE__ */ new Set(["roo/sonic"]);
4815
4936
  function shouldUseSingleFileRead(modelId) {
4816
- if (SINGLE_FILE_READ_MODELS.has(modelId)) {
4817
- return true;
4818
- }
4819
- const patterns = Array.from(SINGLE_FILE_READ_MODELS);
4820
- for (const pattern of patterns) {
4821
- if (pattern.endsWith("*") && modelId.startsWith(pattern.slice(0, -1))) {
4822
- return true;
4823
- }
4824
- }
4825
- return false;
4937
+ return modelId.includes("grok-code-fast-1");
4826
4938
  }
4827
4939
 
4828
4940
  // src/task.ts
@@ -4929,10 +5041,13 @@ var commandExecutionStatusSchema = import_zod19.z.discriminatedUnion("status", [
4929
5041
  PROVIDER_SETTINGS_KEYS,
4930
5042
  RooCodeEventName,
4931
5043
  SECRET_STATE_KEYS,
4932
- SINGLE_FILE_READ_MODELS,
4933
5044
  TaskCommandName,
4934
5045
  TaskStatus,
4935
5046
  TelemetryEventName,
5047
+ VERCEL_AI_GATEWAY_DEFAULT_TEMPERATURE,
5048
+ VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS,
5049
+ VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS,
5050
+ VERCEL_AI_GATEWAY_VISION_ONLY_MODELS,
4936
5051
  VERTEX_REGIONS,
4937
5052
  ZAI_DEFAULT_TEMPERATURE,
4938
5053
  ackSchema,
@@ -5089,6 +5204,8 @@ var commandExecutionStatusSchema = import_zod19.z.discriminatedUnion("status", [
5089
5204
  unboundDefaultModelInfo,
5090
5205
  verbosityLevels,
5091
5206
  verbosityLevelsSchema,
5207
+ vercelAiGatewayDefaultModelId,
5208
+ vercelAiGatewayDefaultModelInfo,
5092
5209
  vertexDefaultModelId,
5093
5210
  vertexModels,
5094
5211
  vscodeLlmDefaultModelId,