@roo-code/types 1.61.0 → 1.63.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
@@ -13,7 +13,7 @@ var CODEBASE_INDEX_DEFAULTS = {
13
13
  var codebaseIndexConfigSchema = z.object({
14
14
  codebaseIndexEnabled: z.boolean().optional(),
15
15
  codebaseIndexQdrantUrl: z.string().optional(),
16
- codebaseIndexEmbedderProvider: z.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral"]).optional(),
16
+ codebaseIndexEmbedderProvider: z.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral", "vercel-ai-gateway"]).optional(),
17
17
  codebaseIndexEmbedderBaseUrl: z.string().optional(),
18
18
  codebaseIndexEmbedderModelId: z.string().optional(),
19
19
  codebaseIndexEmbedderModelDimension: z.number().optional(),
@@ -28,7 +28,8 @@ var codebaseIndexModelsSchema = z.object({
28
28
  ollama: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
29
29
  "openai-compatible": z.record(z.string(), z.object({ dimension: z.number() })).optional(),
30
30
  gemini: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
31
- mistral: z.record(z.string(), z.object({ dimension: z.number() })).optional()
31
+ mistral: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
32
+ "vercel-ai-gateway": z.record(z.string(), z.object({ dimension: z.number() })).optional()
32
33
  });
33
34
  var codebaseIndexProviderSchema = z.object({
34
35
  codeIndexOpenAiKey: z.string().optional(),
@@ -37,7 +38,8 @@ var codebaseIndexProviderSchema = z.object({
37
38
  codebaseIndexOpenAiCompatibleApiKey: z.string().optional(),
38
39
  codebaseIndexOpenAiCompatibleModelDimension: z.number().optional(),
39
40
  codebaseIndexGeminiApiKey: z.string().optional(),
40
- codebaseIndexMistralApiKey: z.string().optional()
41
+ codebaseIndexMistralApiKey: z.string().optional(),
42
+ codebaseIndexVercelAiGatewayApiKey: z.string().optional()
41
43
  });
42
44
 
43
45
  // src/events.ts
@@ -176,7 +178,8 @@ var toolNames = [
176
178
  "new_task",
177
179
  "fetch_instructions",
178
180
  "codebase_search",
179
- "update_todo_list"
181
+ "update_todo_list",
182
+ "generate_image"
180
183
  ];
181
184
  var toolNamesSchema = z3.enum(toolNames);
182
185
  var toolUsageSchema = z3.record(
@@ -355,12 +358,18 @@ var taskEventSchema = z4.discriminatedUnion("eventName", [
355
358
 
356
359
  // src/experiment.ts
357
360
  import { z as z5 } from "zod";
358
- var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption"];
361
+ var experimentIds = [
362
+ "powerSteering",
363
+ "multiFileApplyDiff",
364
+ "preventFocusDisruption",
365
+ "imageGeneration"
366
+ ];
359
367
  var experimentIdsSchema = z5.enum(experimentIds);
360
368
  var experimentsSchema = z5.object({
361
369
  powerSteering: z5.boolean().optional(),
362
370
  multiFileApplyDiff: z5.boolean().optional(),
363
- preventFocusDisruption: z5.boolean().optional()
371
+ preventFocusDisruption: z5.boolean().optional(),
372
+ imageGeneration: z5.boolean().optional()
364
373
  });
365
374
 
366
375
  // src/followup.ts
@@ -400,6 +409,8 @@ var modelInfoSchema = z7.object({
400
409
  // Capability flag to indicate whether the model supports an output verbosity parameter
401
410
  supportsVerbosity: z7.boolean().optional(),
402
411
  supportsReasoningBudget: z7.boolean().optional(),
412
+ // Capability flag to indicate whether the model supports temperature parameter
413
+ supportsTemperature: z7.boolean().optional(),
403
414
  requiredReasoningBudget: z7.boolean().optional(),
404
415
  supportsReasoningEffort: z7.boolean().optional(),
405
416
  supportedParameters: z7.array(modelParametersSchema).optional(),
@@ -2311,7 +2322,8 @@ var openAiNativeModels = {
2311
2322
  cacheReadsPrice: 0.13,
2312
2323
  description: "GPT-5: The best model for coding and agentic tasks across domains",
2313
2324
  // supportsVerbosity is a new capability; ensure ModelInfo includes it
2314
- supportsVerbosity: true
2325
+ supportsVerbosity: true,
2326
+ supportsTemperature: false
2315
2327
  },
2316
2328
  "gpt-5-mini-2025-08-07": {
2317
2329
  maxTokens: 128e3,
@@ -2324,7 +2336,8 @@ var openAiNativeModels = {
2324
2336
  outputPrice: 2,
2325
2337
  cacheReadsPrice: 0.03,
2326
2338
  description: "GPT-5 Mini: A faster, more cost-efficient version of GPT-5 for well-defined tasks",
2327
- supportsVerbosity: true
2339
+ supportsVerbosity: true,
2340
+ supportsTemperature: false
2328
2341
  },
2329
2342
  "gpt-5-nano-2025-08-07": {
2330
2343
  maxTokens: 128e3,
@@ -2337,7 +2350,8 @@ var openAiNativeModels = {
2337
2350
  outputPrice: 0.4,
2338
2351
  cacheReadsPrice: 0.01,
2339
2352
  description: "GPT-5 Nano: Fastest, most cost-efficient version of GPT-5",
2340
- supportsVerbosity: true
2353
+ supportsVerbosity: true,
2354
+ supportsTemperature: false
2341
2355
  },
2342
2356
  "gpt-4.1": {
2343
2357
  maxTokens: 32768,
@@ -2346,7 +2360,8 @@ var openAiNativeModels = {
2346
2360
  supportsPromptCache: true,
2347
2361
  inputPrice: 2,
2348
2362
  outputPrice: 8,
2349
- cacheReadsPrice: 0.5
2363
+ cacheReadsPrice: 0.5,
2364
+ supportsTemperature: true
2350
2365
  },
2351
2366
  "gpt-4.1-mini": {
2352
2367
  maxTokens: 32768,
@@ -2355,7 +2370,8 @@ var openAiNativeModels = {
2355
2370
  supportsPromptCache: true,
2356
2371
  inputPrice: 0.4,
2357
2372
  outputPrice: 1.6,
2358
- cacheReadsPrice: 0.1
2373
+ cacheReadsPrice: 0.1,
2374
+ supportsTemperature: true
2359
2375
  },
2360
2376
  "gpt-4.1-nano": {
2361
2377
  maxTokens: 32768,
@@ -2364,7 +2380,8 @@ var openAiNativeModels = {
2364
2380
  supportsPromptCache: true,
2365
2381
  inputPrice: 0.1,
2366
2382
  outputPrice: 0.4,
2367
- cacheReadsPrice: 0.025
2383
+ cacheReadsPrice: 0.025,
2384
+ supportsTemperature: true
2368
2385
  },
2369
2386
  o3: {
2370
2387
  maxTokens: 1e5,
@@ -2375,7 +2392,8 @@ var openAiNativeModels = {
2375
2392
  outputPrice: 8,
2376
2393
  cacheReadsPrice: 0.5,
2377
2394
  supportsReasoningEffort: true,
2378
- reasoningEffort: "medium"
2395
+ reasoningEffort: "medium",
2396
+ supportsTemperature: false
2379
2397
  },
2380
2398
  "o3-high": {
2381
2399
  maxTokens: 1e5,
@@ -2385,7 +2403,8 @@ var openAiNativeModels = {
2385
2403
  inputPrice: 2,
2386
2404
  outputPrice: 8,
2387
2405
  cacheReadsPrice: 0.5,
2388
- reasoningEffort: "high"
2406
+ reasoningEffort: "high",
2407
+ supportsTemperature: false
2389
2408
  },
2390
2409
  "o3-low": {
2391
2410
  maxTokens: 1e5,
@@ -2395,7 +2414,8 @@ var openAiNativeModels = {
2395
2414
  inputPrice: 2,
2396
2415
  outputPrice: 8,
2397
2416
  cacheReadsPrice: 0.5,
2398
- reasoningEffort: "low"
2417
+ reasoningEffort: "low",
2418
+ supportsTemperature: false
2399
2419
  },
2400
2420
  "o4-mini": {
2401
2421
  maxTokens: 1e5,
@@ -2406,7 +2426,8 @@ var openAiNativeModels = {
2406
2426
  outputPrice: 4.4,
2407
2427
  cacheReadsPrice: 0.275,
2408
2428
  supportsReasoningEffort: true,
2409
- reasoningEffort: "medium"
2429
+ reasoningEffort: "medium",
2430
+ supportsTemperature: false
2410
2431
  },
2411
2432
  "o4-mini-high": {
2412
2433
  maxTokens: 1e5,
@@ -2416,7 +2437,8 @@ var openAiNativeModels = {
2416
2437
  inputPrice: 1.1,
2417
2438
  outputPrice: 4.4,
2418
2439
  cacheReadsPrice: 0.275,
2419
- reasoningEffort: "high"
2440
+ reasoningEffort: "high",
2441
+ supportsTemperature: false
2420
2442
  },
2421
2443
  "o4-mini-low": {
2422
2444
  maxTokens: 1e5,
@@ -2426,7 +2448,8 @@ var openAiNativeModels = {
2426
2448
  inputPrice: 1.1,
2427
2449
  outputPrice: 4.4,
2428
2450
  cacheReadsPrice: 0.275,
2429
- reasoningEffort: "low"
2451
+ reasoningEffort: "low",
2452
+ supportsTemperature: false
2430
2453
  },
2431
2454
  "o3-mini": {
2432
2455
  maxTokens: 1e5,
@@ -2437,7 +2460,8 @@ var openAiNativeModels = {
2437
2460
  outputPrice: 4.4,
2438
2461
  cacheReadsPrice: 0.55,
2439
2462
  supportsReasoningEffort: true,
2440
- reasoningEffort: "medium"
2463
+ reasoningEffort: "medium",
2464
+ supportsTemperature: false
2441
2465
  },
2442
2466
  "o3-mini-high": {
2443
2467
  maxTokens: 1e5,
@@ -2447,7 +2471,8 @@ var openAiNativeModels = {
2447
2471
  inputPrice: 1.1,
2448
2472
  outputPrice: 4.4,
2449
2473
  cacheReadsPrice: 0.55,
2450
- reasoningEffort: "high"
2474
+ reasoningEffort: "high",
2475
+ supportsTemperature: false
2451
2476
  },
2452
2477
  "o3-mini-low": {
2453
2478
  maxTokens: 1e5,
@@ -2457,7 +2482,8 @@ var openAiNativeModels = {
2457
2482
  inputPrice: 1.1,
2458
2483
  outputPrice: 4.4,
2459
2484
  cacheReadsPrice: 0.55,
2460
- reasoningEffort: "low"
2485
+ reasoningEffort: "low",
2486
+ supportsTemperature: false
2461
2487
  },
2462
2488
  o1: {
2463
2489
  maxTokens: 1e5,
@@ -2466,7 +2492,8 @@ var openAiNativeModels = {
2466
2492
  supportsPromptCache: true,
2467
2493
  inputPrice: 15,
2468
2494
  outputPrice: 60,
2469
- cacheReadsPrice: 7.5
2495
+ cacheReadsPrice: 7.5,
2496
+ supportsTemperature: false
2470
2497
  },
2471
2498
  "o1-preview": {
2472
2499
  maxTokens: 32768,
@@ -2475,7 +2502,8 @@ var openAiNativeModels = {
2475
2502
  supportsPromptCache: true,
2476
2503
  inputPrice: 15,
2477
2504
  outputPrice: 60,
2478
- cacheReadsPrice: 7.5
2505
+ cacheReadsPrice: 7.5,
2506
+ supportsTemperature: false
2479
2507
  },
2480
2508
  "o1-mini": {
2481
2509
  maxTokens: 65536,
@@ -2484,7 +2512,8 @@ var openAiNativeModels = {
2484
2512
  supportsPromptCache: true,
2485
2513
  inputPrice: 1.1,
2486
2514
  outputPrice: 4.4,
2487
- cacheReadsPrice: 0.55
2515
+ cacheReadsPrice: 0.55,
2516
+ supportsTemperature: false
2488
2517
  },
2489
2518
  "gpt-4o": {
2490
2519
  maxTokens: 16384,
@@ -2493,7 +2522,8 @@ var openAiNativeModels = {
2493
2522
  supportsPromptCache: true,
2494
2523
  inputPrice: 2.5,
2495
2524
  outputPrice: 10,
2496
- cacheReadsPrice: 1.25
2525
+ cacheReadsPrice: 1.25,
2526
+ supportsTemperature: true
2497
2527
  },
2498
2528
  "gpt-4o-mini": {
2499
2529
  maxTokens: 16384,
@@ -2502,7 +2532,8 @@ var openAiNativeModels = {
2502
2532
  supportsPromptCache: true,
2503
2533
  inputPrice: 0.15,
2504
2534
  outputPrice: 0.6,
2505
- cacheReadsPrice: 0.075
2535
+ cacheReadsPrice: 0.075,
2536
+ supportsTemperature: true
2506
2537
  },
2507
2538
  "codex-mini-latest": {
2508
2539
  maxTokens: 16384,
@@ -2512,6 +2543,7 @@ var openAiNativeModels = {
2512
2543
  inputPrice: 1.5,
2513
2544
  outputPrice: 6,
2514
2545
  cacheReadsPrice: 0,
2546
+ supportsTemperature: false,
2515
2547
  description: "Codex Mini: Cloud-based software engineering agent powered by codex-1, a version of o3 optimized for coding tasks. Trained with reinforcement learning to generate human-style code, adhere to instructions, and iteratively run tests."
2516
2548
  }
2517
2549
  };
@@ -3585,7 +3617,8 @@ var providerNamesSchema = z8.enum(providerNames);
3585
3617
  var providerSettingsEntrySchema = z8.object({
3586
3618
  id: z8.string(),
3587
3619
  name: z8.string(),
3588
- apiProvider: providerNamesSchema.optional()
3620
+ apiProvider: providerNamesSchema.optional(),
3621
+ modelId: z8.string().optional()
3589
3622
  });
3590
3623
  var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
3591
3624
  var baseProviderSettingsSchema = z8.object({
@@ -3627,7 +3660,12 @@ var openRouterSchema = baseProviderSettingsSchema.extend({
3627
3660
  openRouterModelId: z8.string().optional(),
3628
3661
  openRouterBaseUrl: z8.string().optional(),
3629
3662
  openRouterSpecificProvider: z8.string().optional(),
3630
- openRouterUseMiddleOutTransform: z8.boolean().optional()
3663
+ openRouterUseMiddleOutTransform: z8.boolean().optional(),
3664
+ // Image generation settings (experimental)
3665
+ openRouterImageGenerationSettings: z8.object({
3666
+ openRouterApiKey: z8.string().optional(),
3667
+ selectedModel: z8.string().optional()
3668
+ }).optional()
3631
3669
  });
3632
3670
  var bedrockSchema = apiModelIdProviderModelSchema.extend({
3633
3671
  awsAccessKey: z8.string().optional(),
@@ -3892,6 +3930,9 @@ var getApiProtocol = (provider, modelId) => {
3892
3930
  if (provider && provider === "vertex" && modelId && modelId.toLowerCase().includes("claude")) {
3893
3931
  return "anthropic";
3894
3932
  }
3933
+ if (provider && provider === "vercel-ai-gateway" && modelId && modelId.toLowerCase().startsWith("anthropic/")) {
3934
+ return "anthropic";
3935
+ }
3895
3936
  return "openai";
3896
3937
  };
3897
3938
  var MODELS_BY_PROVIDER = {
@@ -4460,6 +4501,7 @@ var SECRET_STATE_KEYS = [
4460
4501
  "codebaseIndexOpenAiCompatibleApiKey",
4461
4502
  "codebaseIndexGeminiApiKey",
4462
4503
  "codebaseIndexMistralApiKey",
4504
+ "codebaseIndexVercelAiGatewayApiKey",
4463
4505
  "huggingFaceApiKey",
4464
4506
  "sambaNovaApiKey",
4465
4507
  "zaiApiKey",