@roo-code/types 1.59.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.js CHANGED
@@ -355,13 +355,12 @@ var taskEventSchema = z4.discriminatedUnion("eventName", [
355
355
 
356
356
  // src/experiment.ts
357
357
  import { z as z5 } from "zod";
358
- var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption", "assistantMessageParser"];
358
+ var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption"];
359
359
  var experimentIdsSchema = z5.enum(experimentIds);
360
360
  var experimentsSchema = z5.object({
361
361
  powerSteering: z5.boolean().optional(),
362
362
  multiFileApplyDiff: z5.boolean().optional(),
363
- preventFocusDisruption: z5.boolean().optional(),
364
- assistantMessageParser: z5.boolean().optional()
363
+ preventFocusDisruption: z5.boolean().optional()
365
364
  });
366
365
 
367
366
  // src/followup.ts
@@ -1106,6 +1105,15 @@ var chutesModels = {
1106
1105
  outputPrice: 0,
1107
1106
  description: "DeepSeek V3 model."
1108
1107
  },
1108
+ "deepseek-ai/DeepSeek-V3.1": {
1109
+ maxTokens: 32768,
1110
+ contextWindow: 163840,
1111
+ supportsImages: false,
1112
+ supportsPromptCache: false,
1113
+ inputPrice: 0,
1114
+ outputPrice: 0,
1115
+ description: "DeepSeek V3.1 model."
1116
+ },
1109
1117
  "unsloth/Llama-3.3-70B-Instruct": {
1110
1118
  maxTokens: 32768,
1111
1119
  // From Groq
@@ -1398,7 +1406,8 @@ var deepSeekDefaultModelId = "deepseek-chat";
1398
1406
  var deepSeekModels = {
1399
1407
  "deepseek-chat": {
1400
1408
  maxTokens: 8192,
1401
- contextWindow: 64e3,
1409
+ // 8K max output
1410
+ contextWindow: 128e3,
1402
1411
  supportsImages: false,
1403
1412
  supportsPromptCache: true,
1404
1413
  inputPrice: 0.27,
@@ -1412,8 +1421,9 @@ var deepSeekModels = {
1412
1421
  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.`
1413
1422
  },
1414
1423
  "deepseek-reasoner": {
1415
- maxTokens: 8192,
1416
- contextWindow: 64e3,
1424
+ maxTokens: 65536,
1425
+ // 64K max output for reasoning mode
1426
+ contextWindow: 128e3,
1417
1427
  supportsImages: false,
1418
1428
  supportsPromptCache: true,
1419
1429
  inputPrice: 0.55,
@@ -1424,7 +1434,7 @@ var deepSeekModels = {
1424
1434
  // $0.55 per million tokens (cache miss)
1425
1435
  cacheReadsPrice: 0.14,
1426
1436
  // $0.14 per million tokens (cache hit)
1427
- description: `DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks. Supports Chain of Thought reasoning with up to 32K tokens.`
1437
+ 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.`
1428
1438
  }
1429
1439
  };
1430
1440
  var DEEP_SEEK_DEFAULT_TEMPERATURE = 0.6;
@@ -1580,6 +1590,15 @@ var fireworksModels = {
1580
1590
  outputPrice: 0.9,
1581
1591
  description: "A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us."
1582
1592
  },
1593
+ "accounts/fireworks/models/deepseek-v3p1": {
1594
+ maxTokens: 16384,
1595
+ contextWindow: 163840,
1596
+ supportsImages: false,
1597
+ supportsPromptCache: false,
1598
+ inputPrice: 0.56,
1599
+ outputPrice: 1.68,
1600
+ description: "DeepSeek v3.1 is an improved version of the v3 model with enhanced performance, better reasoning capabilities, and improved code generation. This Mixture-of-Experts (MoE) model maintains the same 671B total parameters with 37B activated per token."
1601
+ },
1583
1602
  "accounts/fireworks/models/glm-4p5": {
1584
1603
  maxTokens: 16384,
1585
1604
  contextWindow: 128e3,
@@ -2013,9 +2032,11 @@ var groqModels = {
2013
2032
  maxTokens: 16384,
2014
2033
  contextWindow: 131072,
2015
2034
  supportsImages: false,
2016
- supportsPromptCache: false,
2035
+ supportsPromptCache: true,
2017
2036
  inputPrice: 1,
2018
2037
  outputPrice: 3,
2038
+ cacheReadsPrice: 0.5,
2039
+ // 50% discount for cached input tokens
2019
2040
  description: "Moonshot AI Kimi K2 Instruct 1T model, 128K context."
2020
2041
  },
2021
2042
  "openai/gpt-oss-120b": {
@@ -2584,6 +2605,33 @@ var OPEN_ROUTER_REASONING_BUDGET_MODELS = /* @__PURE__ */ new Set([
2584
2605
  "google/gemini-2.5-flash-preview-05-20:thinking"
2585
2606
  ]);
2586
2607
 
2608
+ // src/providers/qwen-code.ts
2609
+ var qwenCodeDefaultModelId = "qwen3-coder-plus";
2610
+ var qwenCodeModels = {
2611
+ "qwen3-coder-plus": {
2612
+ maxTokens: 65536,
2613
+ contextWindow: 1e6,
2614
+ supportsImages: false,
2615
+ supportsPromptCache: false,
2616
+ inputPrice: 0,
2617
+ outputPrice: 0,
2618
+ cacheWritesPrice: 0,
2619
+ cacheReadsPrice: 0,
2620
+ description: "Qwen3 Coder Plus - High-performance coding model with 1M context window for large codebases"
2621
+ },
2622
+ "qwen3-coder-flash": {
2623
+ maxTokens: 65536,
2624
+ contextWindow: 1e6,
2625
+ supportsImages: false,
2626
+ supportsPromptCache: false,
2627
+ inputPrice: 0,
2628
+ outputPrice: 0,
2629
+ cacheWritesPrice: 0,
2630
+ cacheReadsPrice: 0,
2631
+ description: "Qwen3 Coder Flash - Fast coding model with 1M context window optimized for speed"
2632
+ }
2633
+ };
2634
+
2587
2635
  // src/providers/requesty.ts
2588
2636
  var requestyDefaultModelId = "coding/claude-4-sonnet";
2589
2637
  var requestyDefaultModelInfo = {
@@ -2600,16 +2648,16 @@ var requestyDefaultModelInfo = {
2600
2648
  };
2601
2649
 
2602
2650
  // src/providers/roo.ts
2603
- var rooDefaultModelId = "roo/sonic";
2651
+ var rooDefaultModelId = "xai/grok-code-fast-1";
2604
2652
  var rooModels = {
2605
- "roo/sonic": {
2653
+ "xai/grok-code-fast-1": {
2606
2654
  maxTokens: 16384,
2607
2655
  contextWindow: 262144,
2608
2656
  supportsImages: false,
2609
2657
  supportsPromptCache: true,
2610
2658
  inputPrice: 0,
2611
2659
  outputPrice: 0,
2612
- 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.)"
2660
+ 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.)"
2613
2661
  }
2614
2662
  };
2615
2663
 
@@ -3217,8 +3265,19 @@ var vscodeLlmModels = {
3217
3265
  };
3218
3266
 
3219
3267
  // src/providers/xai.ts
3220
- var xaiDefaultModelId = "grok-4";
3268
+ var xaiDefaultModelId = "grok-code-fast-1";
3221
3269
  var xaiModels = {
3270
+ "grok-code-fast-1": {
3271
+ maxTokens: 16384,
3272
+ contextWindow: 262144,
3273
+ supportsImages: false,
3274
+ supportsPromptCache: true,
3275
+ inputPrice: 0.2,
3276
+ outputPrice: 1.5,
3277
+ cacheWritesPrice: 0.02,
3278
+ cacheReadsPrice: 0.02,
3279
+ description: "xAI's Grok Code Fast model with 256K context window"
3280
+ },
3222
3281
  "grok-4": {
3223
3282
  maxTokens: 8192,
3224
3283
  contextWindow: 256e3,
@@ -3296,6 +3355,101 @@ var xaiModels = {
3296
3355
  }
3297
3356
  };
3298
3357
 
3358
+ // src/providers/vercel-ai-gateway.ts
3359
+ var vercelAiGatewayDefaultModelId = "anthropic/claude-sonnet-4";
3360
+ var VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS = /* @__PURE__ */ new Set([
3361
+ "anthropic/claude-3-haiku",
3362
+ "anthropic/claude-3-opus",
3363
+ "anthropic/claude-3.5-haiku",
3364
+ "anthropic/claude-3.5-sonnet",
3365
+ "anthropic/claude-3.7-sonnet",
3366
+ "anthropic/claude-opus-4",
3367
+ "anthropic/claude-opus-4.1",
3368
+ "anthropic/claude-sonnet-4",
3369
+ "openai/gpt-4.1",
3370
+ "openai/gpt-4.1-mini",
3371
+ "openai/gpt-4.1-nano",
3372
+ "openai/gpt-4o",
3373
+ "openai/gpt-4o-mini",
3374
+ "openai/gpt-5",
3375
+ "openai/gpt-5-mini",
3376
+ "openai/gpt-5-nano",
3377
+ "openai/o1",
3378
+ "openai/o3",
3379
+ "openai/o3-mini",
3380
+ "openai/o4-mini"
3381
+ ]);
3382
+ var VERCEL_AI_GATEWAY_VISION_ONLY_MODELS = /* @__PURE__ */ new Set([
3383
+ "alibaba/qwen-3-14b",
3384
+ "alibaba/qwen-3-235b",
3385
+ "alibaba/qwen-3-30b",
3386
+ "alibaba/qwen-3-32b",
3387
+ "alibaba/qwen3-coder",
3388
+ "amazon/nova-pro",
3389
+ "anthropic/claude-3.5-haiku",
3390
+ "google/gemini-1.5-flash-8b",
3391
+ "google/gemini-2.0-flash-thinking",
3392
+ "google/gemma-3-27b",
3393
+ "mistral/devstral-small",
3394
+ "xai/grok-vision-beta"
3395
+ ]);
3396
+ var VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS = /* @__PURE__ */ new Set([
3397
+ "amazon/nova-lite",
3398
+ "anthropic/claude-3-haiku",
3399
+ "anthropic/claude-3-opus",
3400
+ "anthropic/claude-3-sonnet",
3401
+ "anthropic/claude-3.5-sonnet",
3402
+ "anthropic/claude-3.7-sonnet",
3403
+ "anthropic/claude-opus-4",
3404
+ "anthropic/claude-opus-4.1",
3405
+ "anthropic/claude-sonnet-4",
3406
+ "google/gemini-1.5-flash",
3407
+ "google/gemini-1.5-pro",
3408
+ "google/gemini-2.0-flash",
3409
+ "google/gemini-2.0-flash-lite",
3410
+ "google/gemini-2.0-pro",
3411
+ "google/gemini-2.5-flash",
3412
+ "google/gemini-2.5-flash-lite",
3413
+ "google/gemini-2.5-pro",
3414
+ "google/gemini-exp",
3415
+ "meta/llama-3.2-11b",
3416
+ "meta/llama-3.2-90b",
3417
+ "meta/llama-3.3",
3418
+ "meta/llama-4-maverick",
3419
+ "meta/llama-4-scout",
3420
+ "mistral/pixtral-12b",
3421
+ "mistral/pixtral-large",
3422
+ "moonshotai/kimi-k2",
3423
+ "openai/gpt-4-turbo",
3424
+ "openai/gpt-4.1",
3425
+ "openai/gpt-4.1-mini",
3426
+ "openai/gpt-4.1-nano",
3427
+ "openai/gpt-4.5-preview",
3428
+ "openai/gpt-4o",
3429
+ "openai/gpt-4o-mini",
3430
+ "openai/gpt-oss-120b",
3431
+ "openai/gpt-oss-20b",
3432
+ "openai/o3",
3433
+ "openai/o3-pro",
3434
+ "openai/o4-mini",
3435
+ "vercel/v0-1.0-md",
3436
+ "xai/grok-2-vision",
3437
+ "zai/glm-4.5v"
3438
+ ]);
3439
+ var vercelAiGatewayDefaultModelInfo = {
3440
+ maxTokens: 64e3,
3441
+ contextWindow: 2e5,
3442
+ supportsImages: true,
3443
+ supportsComputerUse: true,
3444
+ supportsPromptCache: true,
3445
+ inputPrice: 3,
3446
+ outputPrice: 15,
3447
+ cacheWritesPrice: 3.75,
3448
+ cacheReadsPrice: 0.3,
3449
+ 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."
3450
+ };
3451
+ var VERCEL_AI_GATEWAY_DEFAULT_TEMPERATURE = 0.7;
3452
+
3299
3453
  // src/providers/zai.ts
3300
3454
  var internationalZAiDefaultModelId = "glm-4.5";
3301
3455
  var internationalZAiModels = {
@@ -3408,6 +3562,7 @@ var providerNames = [
3408
3562
  "moonshot",
3409
3563
  "deepseek",
3410
3564
  "doubao",
3565
+ "qwen-code",
3411
3566
  "unbound",
3412
3567
  "requesty",
3413
3568
  "human-relay",
@@ -3423,7 +3578,8 @@ var providerNames = [
3423
3578
  "fireworks",
3424
3579
  "featherless",
3425
3580
  "io-intelligence",
3426
- "roo"
3581
+ "roo",
3582
+ "vercel-ai-gateway"
3427
3583
  ];
3428
3584
  var providerNamesSchema = z8.enum(providerNames);
3429
3585
  var providerSettingsEntrySchema = z8.object({
@@ -3495,7 +3651,9 @@ var vertexSchema = apiModelIdProviderModelSchema.extend({
3495
3651
  vertexKeyFile: z8.string().optional(),
3496
3652
  vertexJsonCredentials: z8.string().optional(),
3497
3653
  vertexProjectId: z8.string().optional(),
3498
- vertexRegion: z8.string().optional()
3654
+ vertexRegion: z8.string().optional(),
3655
+ enableUrlContext: z8.boolean().optional(),
3656
+ enableGrounding: z8.boolean().optional()
3499
3657
  });
3500
3658
  var openAiSchema = baseProviderSettingsSchema.extend({
3501
3659
  openAiBaseUrl: z8.string().optional(),
@@ -3612,9 +3770,16 @@ var ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
3612
3770
  ioIntelligenceModelId: z8.string().optional(),
3613
3771
  ioIntelligenceApiKey: z8.string().optional()
3614
3772
  });
3773
+ var qwenCodeSchema = apiModelIdProviderModelSchema.extend({
3774
+ qwenCodeOauthPath: z8.string().optional()
3775
+ });
3615
3776
  var rooSchema = apiModelIdProviderModelSchema.extend({
3616
3777
  // No additional fields needed - uses cloud authentication
3617
3778
  });
3779
+ var vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
3780
+ vercelAiGatewayApiKey: z8.string().optional(),
3781
+ vercelAiGatewayModelId: z8.string().optional()
3782
+ });
3618
3783
  var defaultSchema = z8.object({
3619
3784
  apiProvider: z8.undefined()
3620
3785
  });
@@ -3651,7 +3816,9 @@ var providerSettingsSchemaDiscriminated = z8.discriminatedUnion("apiProvider", [
3651
3816
  fireworksSchema.merge(z8.object({ apiProvider: z8.literal("fireworks") })),
3652
3817
  featherlessSchema.merge(z8.object({ apiProvider: z8.literal("featherless") })),
3653
3818
  ioIntelligenceSchema.merge(z8.object({ apiProvider: z8.literal("io-intelligence") })),
3819
+ qwenCodeSchema.merge(z8.object({ apiProvider: z8.literal("qwen-code") })),
3654
3820
  rooSchema.merge(z8.object({ apiProvider: z8.literal("roo") })),
3821
+ vercelAiGatewaySchema.merge(z8.object({ apiProvider: z8.literal("vercel-ai-gateway") })),
3655
3822
  defaultSchema
3656
3823
  ]);
3657
3824
  var providerSettingsSchema = z8.object({
@@ -3688,7 +3855,9 @@ var providerSettingsSchema = z8.object({
3688
3855
  ...fireworksSchema.shape,
3689
3856
  ...featherlessSchema.shape,
3690
3857
  ...ioIntelligenceSchema.shape,
3858
+ ...qwenCodeSchema.shape,
3691
3859
  ...rooSchema.shape,
3860
+ ...vercelAiGatewaySchema.shape,
3692
3861
  ...codebaseIndexProviderSchema.shape
3693
3862
  });
3694
3863
  var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z8.string().optional() });
@@ -3708,7 +3877,8 @@ var MODEL_ID_KEYS = [
3708
3877
  "requestyModelId",
3709
3878
  "litellmModelId",
3710
3879
  "huggingFaceModelId",
3711
- "ioIntelligenceModelId"
3880
+ "ioIntelligenceModelId",
3881
+ "vercelAiGatewayModelId"
3712
3882
  ];
3713
3883
  var getModelId = (settings) => {
3714
3884
  const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
@@ -3788,6 +3958,7 @@ var MODELS_BY_PROVIDER = {
3788
3958
  label: "OpenAI",
3789
3959
  models: Object.keys(openAiNativeModels)
3790
3960
  },
3961
+ "qwen-code": { id: "qwen-code", label: "Qwen Code", models: Object.keys(qwenCodeModels) },
3791
3962
  roo: { id: "roo", label: "Roo", models: Object.keys(rooModels) },
3792
3963
  sambanova: {
3793
3964
  id: "sambanova",
@@ -3812,7 +3983,8 @@ var MODELS_BY_PROVIDER = {
3812
3983
  litellm: { id: "litellm", label: "LiteLLM", models: [] },
3813
3984
  openrouter: { id: "openrouter", label: "OpenRouter", models: [] },
3814
3985
  requesty: { id: "requesty", label: "Requesty", models: [] },
3815
- unbound: { id: "unbound", label: "Unbound", models: [] }
3986
+ unbound: { id: "unbound", label: "Unbound", models: [] },
3987
+ "vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] }
3816
3988
  };
3817
3989
  var dynamicProviders = [
3818
3990
  "glama",
@@ -3820,7 +3992,8 @@ var dynamicProviders = [
3820
3992
  "litellm",
3821
3993
  "openrouter",
3822
3994
  "requesty",
3823
- "unbound"
3995
+ "unbound",
3996
+ "vercel-ai-gateway"
3824
3997
  ];
3825
3998
  var isDynamicProvider = (key) => dynamicProviders.includes(key);
3826
3999
 
@@ -4292,7 +4465,8 @@ var SECRET_STATE_KEYS = [
4292
4465
  "zaiApiKey",
4293
4466
  "fireworksApiKey",
4294
4467
  "featherlessApiKey",
4295
- "ioIntelligenceApiKey"
4468
+ "ioIntelligenceApiKey",
4469
+ "vercelAiGatewayApiKey"
4296
4470
  ];
4297
4471
  var isSecretStateKey = (key) => SECRET_STATE_KEYS.includes(key);
4298
4472
  var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].filter(
@@ -4513,18 +4687,8 @@ var mcpExecutionStatusSchema = z16.discriminatedUnion("status", [
4513
4687
  ]);
4514
4688
 
4515
4689
  // src/single-file-read-models.ts
4516
- var SINGLE_FILE_READ_MODELS = /* @__PURE__ */ new Set(["roo/sonic"]);
4517
4690
  function shouldUseSingleFileRead(modelId) {
4518
- if (SINGLE_FILE_READ_MODELS.has(modelId)) {
4519
- return true;
4520
- }
4521
- const patterns = Array.from(SINGLE_FILE_READ_MODELS);
4522
- for (const pattern of patterns) {
4523
- if (pattern.endsWith("*") && modelId.startsWith(pattern.slice(0, -1))) {
4524
- return true;
4525
- }
4526
- }
4527
- return false;
4691
+ return modelId.includes("grok-code-fast-1");
4528
4692
  }
4529
4693
 
4530
4694
  // src/task.ts
@@ -4630,10 +4794,13 @@ export {
4630
4794
  PROVIDER_SETTINGS_KEYS,
4631
4795
  RooCodeEventName,
4632
4796
  SECRET_STATE_KEYS,
4633
- SINGLE_FILE_READ_MODELS,
4634
4797
  TaskCommandName,
4635
4798
  TaskStatus,
4636
4799
  TelemetryEventName,
4800
+ VERCEL_AI_GATEWAY_DEFAULT_TEMPERATURE,
4801
+ VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS,
4802
+ VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS,
4803
+ VERCEL_AI_GATEWAY_VISION_ONLY_MODELS,
4637
4804
  VERTEX_REGIONS,
4638
4805
  ZAI_DEFAULT_TEMPERATURE,
4639
4806
  ackSchema,
@@ -4751,6 +4918,8 @@ export {
4751
4918
  providerSettingsSchema,
4752
4919
  providerSettingsSchemaDiscriminated,
4753
4920
  providerSettingsWithIdSchema,
4921
+ qwenCodeDefaultModelId,
4922
+ qwenCodeModels,
4754
4923
  reasoningEffortWithMinimalSchema,
4755
4924
  reasoningEfforts,
4756
4925
  reasoningEffortsSchema,
@@ -4788,6 +4957,8 @@ export {
4788
4957
  unboundDefaultModelInfo,
4789
4958
  verbosityLevels,
4790
4959
  verbosityLevelsSchema,
4960
+ vercelAiGatewayDefaultModelId,
4961
+ vercelAiGatewayDefaultModelInfo,
4791
4962
  vertexDefaultModelId,
4792
4963
  vertexModels,
4793
4964
  vscodeLlmDefaultModelId,