@roo-code/types 1.83.0 → 1.86.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 +1464 -999
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3187 -4972
- package/dist/index.d.ts +3187 -4972
- package/dist/index.js +1442 -996
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/cloud.ts
|
|
2
|
-
import { z as
|
|
2
|
+
import { z as z16 } from "zod";
|
|
3
3
|
|
|
4
4
|
// src/events.ts
|
|
5
5
|
import { z as z3 } from "zod";
|
|
@@ -45,6 +45,10 @@ var interactiveAsks = [
|
|
|
45
45
|
function isInteractiveAsk(ask) {
|
|
46
46
|
return interactiveAsks.includes(ask);
|
|
47
47
|
}
|
|
48
|
+
var nonBlockingAsks = ["command_output"];
|
|
49
|
+
function isNonBlockingAsk(ask) {
|
|
50
|
+
return nonBlockingAsks.includes(ask);
|
|
51
|
+
}
|
|
48
52
|
var clineSays = [
|
|
49
53
|
"error",
|
|
50
54
|
"api_req_started",
|
|
@@ -99,14 +103,7 @@ var clineMessageSchema = z.object({
|
|
|
99
103
|
contextCondense: contextCondenseSchema.optional(),
|
|
100
104
|
isProtected: z.boolean().optional(),
|
|
101
105
|
apiProtocol: z.union([z.literal("openai"), z.literal("anthropic")]).optional(),
|
|
102
|
-
isAnswered: z.boolean().optional()
|
|
103
|
-
metadata: z.object({
|
|
104
|
-
gpt5: z.object({
|
|
105
|
-
previous_response_id: z.string().optional(),
|
|
106
|
-
instructions: z.string().optional(),
|
|
107
|
-
reasoning_summary: z.string().optional()
|
|
108
|
-
}).optional()
|
|
109
|
-
}).optional()
|
|
106
|
+
isAnswered: z.boolean().optional()
|
|
110
107
|
});
|
|
111
108
|
var tokenUsageSchema = z.object({
|
|
112
109
|
totalTokensIn: z.number(),
|
|
@@ -133,7 +130,6 @@ var toolNames = [
|
|
|
133
130
|
"write_to_file",
|
|
134
131
|
"apply_diff",
|
|
135
132
|
"insert_content",
|
|
136
|
-
"search_and_replace",
|
|
137
133
|
"search_files",
|
|
138
134
|
"list_files",
|
|
139
135
|
"list_code_definition_names",
|
|
@@ -158,6 +154,16 @@ var toolUsageSchema = z2.record(
|
|
|
158
154
|
failures: z2.number()
|
|
159
155
|
})
|
|
160
156
|
);
|
|
157
|
+
var TOOL_PROTOCOL = {
|
|
158
|
+
XML: "xml",
|
|
159
|
+
NATIVE: "native"
|
|
160
|
+
};
|
|
161
|
+
function isNativeProtocol(protocol) {
|
|
162
|
+
return protocol === TOOL_PROTOCOL.NATIVE;
|
|
163
|
+
}
|
|
164
|
+
function getEffectiveProtocol(toolProtocol) {
|
|
165
|
+
return toolProtocol || TOOL_PROTOCOL.XML;
|
|
166
|
+
}
|
|
161
167
|
|
|
162
168
|
// src/events.ts
|
|
163
169
|
var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
|
|
@@ -347,16 +353,20 @@ var taskMetadataSchema = z4.object({
|
|
|
347
353
|
});
|
|
348
354
|
|
|
349
355
|
// src/global-settings.ts
|
|
350
|
-
import { z as
|
|
356
|
+
import { z as z14 } from "zod";
|
|
351
357
|
|
|
352
358
|
// src/provider-settings.ts
|
|
353
|
-
import { z as
|
|
359
|
+
import { z as z8 } from "zod";
|
|
354
360
|
|
|
355
361
|
// src/model.ts
|
|
356
362
|
import { z as z5 } from "zod";
|
|
357
363
|
var reasoningEfforts = ["low", "medium", "high"];
|
|
358
364
|
var reasoningEffortsSchema = z5.enum(reasoningEfforts);
|
|
359
365
|
var reasoningEffortWithMinimalSchema = z5.union([reasoningEffortsSchema, z5.literal("minimal")]);
|
|
366
|
+
var reasoningEffortsExtended = ["none", "minimal", "low", "medium", "high"];
|
|
367
|
+
var reasoningEffortExtendedSchema = z5.enum(reasoningEffortsExtended);
|
|
368
|
+
var reasoningEffortSettingValues = ["disable", "none", "minimal", "low", "medium", "high"];
|
|
369
|
+
var reasoningEffortSettingSchema = z5.enum(reasoningEffortSettingValues);
|
|
360
370
|
var verbosityLevels = ["low", "medium", "high"];
|
|
361
371
|
var verbosityLevelsSchema = z5.enum(verbosityLevels);
|
|
362
372
|
var serviceTiers = ["default", "flex", "priority"];
|
|
@@ -369,27 +379,42 @@ var modelInfoSchema = z5.object({
|
|
|
369
379
|
maxThinkingTokens: z5.number().nullish(),
|
|
370
380
|
contextWindow: z5.number(),
|
|
371
381
|
supportsImages: z5.boolean().optional(),
|
|
372
|
-
supportsComputerUse: z5.boolean().optional(),
|
|
373
382
|
supportsPromptCache: z5.boolean(),
|
|
383
|
+
// Optional default prompt cache retention policy for providers that support it.
|
|
384
|
+
// When set to "24h", extended prompt caching will be requested; when omitted
|
|
385
|
+
// or set to "in_memory", the default in‑memory cache is used.
|
|
386
|
+
promptCacheRetention: z5.enum(["in_memory", "24h"]).optional(),
|
|
374
387
|
// Capability flag to indicate whether the model supports an output verbosity parameter
|
|
375
388
|
supportsVerbosity: z5.boolean().optional(),
|
|
376
389
|
supportsReasoningBudget: z5.boolean().optional(),
|
|
390
|
+
// Capability flag to indicate whether the model supports simple on/off binary reasoning
|
|
391
|
+
supportsReasoningBinary: z5.boolean().optional(),
|
|
377
392
|
// Capability flag to indicate whether the model supports temperature parameter
|
|
378
393
|
supportsTemperature: z5.boolean().optional(),
|
|
394
|
+
defaultTemperature: z5.number().optional(),
|
|
379
395
|
requiredReasoningBudget: z5.boolean().optional(),
|
|
380
|
-
supportsReasoningEffort: z5.boolean().optional(),
|
|
396
|
+
supportsReasoningEffort: z5.union([z5.boolean(), z5.array(z5.enum(["disable", "none", "minimal", "low", "medium", "high"]))]).optional(),
|
|
397
|
+
requiredReasoningEffort: z5.boolean().optional(),
|
|
398
|
+
preserveReasoning: z5.boolean().optional(),
|
|
381
399
|
supportedParameters: z5.array(modelParametersSchema).optional(),
|
|
382
400
|
inputPrice: z5.number().optional(),
|
|
383
401
|
outputPrice: z5.number().optional(),
|
|
384
402
|
cacheWritesPrice: z5.number().optional(),
|
|
385
403
|
cacheReadsPrice: z5.number().optional(),
|
|
386
404
|
description: z5.string().optional(),
|
|
387
|
-
|
|
405
|
+
// Default effort value for models that support reasoning effort
|
|
406
|
+
reasoningEffort: reasoningEffortExtendedSchema.optional(),
|
|
388
407
|
minTokensPerCachePoint: z5.number().optional(),
|
|
389
408
|
maxCachePoints: z5.number().optional(),
|
|
390
409
|
cachableFields: z5.array(z5.string()).optional(),
|
|
391
410
|
// Flag to indicate if the model is deprecated and should not be used
|
|
392
411
|
deprecated: z5.boolean().optional(),
|
|
412
|
+
// Flag to indicate if the model is free (no cost)
|
|
413
|
+
isFree: z5.boolean().optional(),
|
|
414
|
+
// Flag to indicate if the model supports native tool calling (OpenAI-style function calling)
|
|
415
|
+
supportsNativeTools: z5.boolean().optional(),
|
|
416
|
+
// Default tool protocol preferred by this model (if not specified, falls back to capability/provider defaults)
|
|
417
|
+
defaultToolProtocol: z5.enum(["xml", "native"]).optional(),
|
|
393
418
|
/**
|
|
394
419
|
* Service tiers with pricing information.
|
|
395
420
|
* Each tier can have a name (for OpenAI service tiers) and pricing overrides.
|
|
@@ -423,7 +448,7 @@ var CODEBASE_INDEX_DEFAULTS = {
|
|
|
423
448
|
var codebaseIndexConfigSchema = z6.object({
|
|
424
449
|
codebaseIndexEnabled: z6.boolean().optional(),
|
|
425
450
|
codebaseIndexQdrantUrl: z6.string().optional(),
|
|
426
|
-
codebaseIndexEmbedderProvider: z6.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral", "vercel-ai-gateway"]).optional(),
|
|
451
|
+
codebaseIndexEmbedderProvider: z6.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral", "vercel-ai-gateway", "openrouter"]).optional(),
|
|
427
452
|
codebaseIndexEmbedderBaseUrl: z6.string().optional(),
|
|
428
453
|
codebaseIndexEmbedderModelId: z6.string().optional(),
|
|
429
454
|
codebaseIndexEmbedderModelDimension: z6.number().optional(),
|
|
@@ -439,7 +464,8 @@ var codebaseIndexModelsSchema = z6.object({
|
|
|
439
464
|
"openai-compatible": z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
|
|
440
465
|
gemini: z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
|
|
441
466
|
mistral: z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
|
|
442
|
-
"vercel-ai-gateway": z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional()
|
|
467
|
+
"vercel-ai-gateway": z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
|
|
468
|
+
openrouter: z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional()
|
|
443
469
|
});
|
|
444
470
|
var codebaseIndexProviderSchema = z6.object({
|
|
445
471
|
codeIndexOpenAiKey: z6.string().optional(),
|
|
@@ -449,11 +475,12 @@ var codebaseIndexProviderSchema = z6.object({
|
|
|
449
475
|
codebaseIndexOpenAiCompatibleModelDimension: z6.number().optional(),
|
|
450
476
|
codebaseIndexGeminiApiKey: z6.string().optional(),
|
|
451
477
|
codebaseIndexMistralApiKey: z6.string().optional(),
|
|
452
|
-
codebaseIndexVercelAiGatewayApiKey: z6.string().optional()
|
|
478
|
+
codebaseIndexVercelAiGatewayApiKey: z6.string().optional(),
|
|
479
|
+
codebaseIndexOpenRouterApiKey: z6.string().optional()
|
|
453
480
|
});
|
|
454
481
|
|
|
455
482
|
// src/providers/anthropic.ts
|
|
456
|
-
var anthropicDefaultModelId = "claude-sonnet-4-
|
|
483
|
+
var anthropicDefaultModelId = "claude-sonnet-4-5";
|
|
457
484
|
var anthropicModels = {
|
|
458
485
|
"claude-sonnet-4-5": {
|
|
459
486
|
maxTokens: 64e3,
|
|
@@ -461,7 +488,6 @@ var anthropicModels = {
|
|
|
461
488
|
contextWindow: 2e5,
|
|
462
489
|
// Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
|
|
463
490
|
supportsImages: true,
|
|
464
|
-
supportsComputerUse: true,
|
|
465
491
|
supportsPromptCache: true,
|
|
466
492
|
inputPrice: 3,
|
|
467
493
|
// $3 per million input tokens (≤200K context)
|
|
@@ -494,7 +520,6 @@ var anthropicModels = {
|
|
|
494
520
|
contextWindow: 2e5,
|
|
495
521
|
// Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
|
|
496
522
|
supportsImages: true,
|
|
497
|
-
supportsComputerUse: true,
|
|
498
523
|
supportsPromptCache: true,
|
|
499
524
|
inputPrice: 3,
|
|
500
525
|
// $3 per million input tokens (≤200K context)
|
|
@@ -522,10 +547,10 @@ var anthropicModels = {
|
|
|
522
547
|
]
|
|
523
548
|
},
|
|
524
549
|
"claude-opus-4-1-20250805": {
|
|
525
|
-
maxTokens:
|
|
550
|
+
maxTokens: 32e3,
|
|
551
|
+
// Overridden to 8k if `enableReasoningEffort` is false.
|
|
526
552
|
contextWindow: 2e5,
|
|
527
553
|
supportsImages: true,
|
|
528
|
-
supportsComputerUse: true,
|
|
529
554
|
supportsPromptCache: true,
|
|
530
555
|
inputPrice: 15,
|
|
531
556
|
// $15 per million input tokens
|
|
@@ -542,7 +567,6 @@ var anthropicModels = {
|
|
|
542
567
|
// Overridden to 8k if `enableReasoningEffort` is false.
|
|
543
568
|
contextWindow: 2e5,
|
|
544
569
|
supportsImages: true,
|
|
545
|
-
supportsComputerUse: true,
|
|
546
570
|
supportsPromptCache: true,
|
|
547
571
|
inputPrice: 15,
|
|
548
572
|
// $15 per million input tokens
|
|
@@ -559,7 +583,6 @@ var anthropicModels = {
|
|
|
559
583
|
// Unlocked by passing `beta` flag to the model. Otherwise, it's 64k.
|
|
560
584
|
contextWindow: 2e5,
|
|
561
585
|
supportsImages: true,
|
|
562
|
-
supportsComputerUse: true,
|
|
563
586
|
supportsPromptCache: true,
|
|
564
587
|
inputPrice: 3,
|
|
565
588
|
// $3 per million input tokens
|
|
@@ -577,7 +600,6 @@ var anthropicModels = {
|
|
|
577
600
|
// Since we already have a `:thinking` virtual model we aren't setting `supportsReasoningBudget: true` here.
|
|
578
601
|
contextWindow: 2e5,
|
|
579
602
|
supportsImages: true,
|
|
580
|
-
supportsComputerUse: true,
|
|
581
603
|
supportsPromptCache: true,
|
|
582
604
|
inputPrice: 3,
|
|
583
605
|
// $3 per million input tokens
|
|
@@ -592,7 +614,6 @@ var anthropicModels = {
|
|
|
592
614
|
maxTokens: 8192,
|
|
593
615
|
contextWindow: 2e5,
|
|
594
616
|
supportsImages: true,
|
|
595
|
-
supportsComputerUse: true,
|
|
596
617
|
supportsPromptCache: true,
|
|
597
618
|
inputPrice: 3,
|
|
598
619
|
// $3 per million input tokens
|
|
@@ -632,19 +653,30 @@ var anthropicModels = {
|
|
|
632
653
|
outputPrice: 1.25,
|
|
633
654
|
cacheWritesPrice: 0.3,
|
|
634
655
|
cacheReadsPrice: 0.03
|
|
656
|
+
},
|
|
657
|
+
"claude-haiku-4-5-20251001": {
|
|
658
|
+
maxTokens: 64e3,
|
|
659
|
+
contextWindow: 2e5,
|
|
660
|
+
supportsImages: true,
|
|
661
|
+
supportsPromptCache: true,
|
|
662
|
+
inputPrice: 1,
|
|
663
|
+
outputPrice: 5,
|
|
664
|
+
cacheWritesPrice: 1.25,
|
|
665
|
+
cacheReadsPrice: 0.1,
|
|
666
|
+
supportsReasoningBudget: true,
|
|
667
|
+
description: "Claude Haiku 4.5 delivers near-frontier intelligence at lightning speeds with extended thinking, vision, and multilingual support."
|
|
635
668
|
}
|
|
636
669
|
};
|
|
637
670
|
var ANTHROPIC_DEFAULT_MAX_TOKENS = 8192;
|
|
638
671
|
|
|
639
672
|
// src/providers/bedrock.ts
|
|
640
|
-
var bedrockDefaultModelId = "anthropic.claude-sonnet-4-
|
|
673
|
+
var bedrockDefaultModelId = "anthropic.claude-sonnet-4-5-20250929-v1:0";
|
|
641
674
|
var bedrockDefaultPromptRouterModelId = "anthropic.claude-3-sonnet-20240229-v1:0";
|
|
642
675
|
var bedrockModels = {
|
|
643
676
|
"anthropic.claude-sonnet-4-5-20250929-v1:0": {
|
|
644
677
|
maxTokens: 8192,
|
|
645
678
|
contextWindow: 2e5,
|
|
646
679
|
supportsImages: true,
|
|
647
|
-
supportsComputerUse: true,
|
|
648
680
|
supportsPromptCache: true,
|
|
649
681
|
supportsReasoningBudget: true,
|
|
650
682
|
inputPrice: 3,
|
|
@@ -659,7 +691,6 @@ var bedrockModels = {
|
|
|
659
691
|
maxTokens: 5e3,
|
|
660
692
|
contextWindow: 3e5,
|
|
661
693
|
supportsImages: true,
|
|
662
|
-
supportsComputerUse: false,
|
|
663
694
|
supportsPromptCache: true,
|
|
664
695
|
inputPrice: 0.8,
|
|
665
696
|
outputPrice: 3.2,
|
|
@@ -675,7 +706,6 @@ var bedrockModels = {
|
|
|
675
706
|
maxTokens: 5e3,
|
|
676
707
|
contextWindow: 3e5,
|
|
677
708
|
supportsImages: true,
|
|
678
|
-
supportsComputerUse: false,
|
|
679
709
|
supportsPromptCache: false,
|
|
680
710
|
inputPrice: 1,
|
|
681
711
|
outputPrice: 4,
|
|
@@ -689,7 +719,6 @@ var bedrockModels = {
|
|
|
689
719
|
maxTokens: 5e3,
|
|
690
720
|
contextWindow: 3e5,
|
|
691
721
|
supportsImages: true,
|
|
692
|
-
supportsComputerUse: false,
|
|
693
722
|
supportsPromptCache: true,
|
|
694
723
|
inputPrice: 0.06,
|
|
695
724
|
outputPrice: 0.24,
|
|
@@ -705,7 +734,6 @@ var bedrockModels = {
|
|
|
705
734
|
maxTokens: 5e3,
|
|
706
735
|
contextWindow: 128e3,
|
|
707
736
|
supportsImages: false,
|
|
708
|
-
supportsComputerUse: false,
|
|
709
737
|
supportsPromptCache: true,
|
|
710
738
|
inputPrice: 0.035,
|
|
711
739
|
outputPrice: 0.14,
|
|
@@ -721,7 +749,6 @@ var bedrockModels = {
|
|
|
721
749
|
maxTokens: 8192,
|
|
722
750
|
contextWindow: 2e5,
|
|
723
751
|
supportsImages: true,
|
|
724
|
-
supportsComputerUse: true,
|
|
725
752
|
supportsPromptCache: true,
|
|
726
753
|
supportsReasoningBudget: true,
|
|
727
754
|
inputPrice: 3,
|
|
@@ -736,7 +763,6 @@ var bedrockModels = {
|
|
|
736
763
|
maxTokens: 8192,
|
|
737
764
|
contextWindow: 2e5,
|
|
738
765
|
supportsImages: true,
|
|
739
|
-
supportsComputerUse: true,
|
|
740
766
|
supportsPromptCache: true,
|
|
741
767
|
supportsReasoningBudget: true,
|
|
742
768
|
inputPrice: 15,
|
|
@@ -751,7 +777,6 @@ var bedrockModels = {
|
|
|
751
777
|
maxTokens: 8192,
|
|
752
778
|
contextWindow: 2e5,
|
|
753
779
|
supportsImages: true,
|
|
754
|
-
supportsComputerUse: true,
|
|
755
780
|
supportsPromptCache: true,
|
|
756
781
|
supportsReasoningBudget: true,
|
|
757
782
|
inputPrice: 15,
|
|
@@ -766,7 +791,6 @@ var bedrockModels = {
|
|
|
766
791
|
maxTokens: 8192,
|
|
767
792
|
contextWindow: 2e5,
|
|
768
793
|
supportsImages: true,
|
|
769
|
-
supportsComputerUse: true,
|
|
770
794
|
supportsPromptCache: true,
|
|
771
795
|
supportsReasoningBudget: true,
|
|
772
796
|
inputPrice: 3,
|
|
@@ -781,7 +805,6 @@ var bedrockModels = {
|
|
|
781
805
|
maxTokens: 8192,
|
|
782
806
|
contextWindow: 2e5,
|
|
783
807
|
supportsImages: true,
|
|
784
|
-
supportsComputerUse: true,
|
|
785
808
|
supportsPromptCache: true,
|
|
786
809
|
inputPrice: 3,
|
|
787
810
|
outputPrice: 15,
|
|
@@ -804,6 +827,22 @@ var bedrockModels = {
|
|
|
804
827
|
maxCachePoints: 4,
|
|
805
828
|
cachableFields: ["system", "messages", "tools"]
|
|
806
829
|
},
|
|
830
|
+
"anthropic.claude-haiku-4-5-20251001-v1:0": {
|
|
831
|
+
maxTokens: 8192,
|
|
832
|
+
contextWindow: 2e5,
|
|
833
|
+
supportsImages: true,
|
|
834
|
+
supportsPromptCache: true,
|
|
835
|
+
supportsReasoningBudget: true,
|
|
836
|
+
inputPrice: 1,
|
|
837
|
+
outputPrice: 5,
|
|
838
|
+
cacheWritesPrice: 1.25,
|
|
839
|
+
// 5m cache writes
|
|
840
|
+
cacheReadsPrice: 0.1,
|
|
841
|
+
// cache hits / refreshes
|
|
842
|
+
minTokensPerCachePoint: 2048,
|
|
843
|
+
maxCachePoints: 4,
|
|
844
|
+
cachableFields: ["system", "messages", "tools"]
|
|
845
|
+
},
|
|
807
846
|
"anthropic.claude-3-5-sonnet-20240620-v1:0": {
|
|
808
847
|
maxTokens: 8192,
|
|
809
848
|
contextWindow: 2e5,
|
|
@@ -875,7 +914,6 @@ var bedrockModels = {
|
|
|
875
914
|
maxTokens: 8192,
|
|
876
915
|
contextWindow: 128e3,
|
|
877
916
|
supportsImages: false,
|
|
878
|
-
supportsComputerUse: false,
|
|
879
917
|
supportsPromptCache: false,
|
|
880
918
|
inputPrice: 0.5,
|
|
881
919
|
outputPrice: 1.5,
|
|
@@ -885,7 +923,6 @@ var bedrockModels = {
|
|
|
885
923
|
maxTokens: 8192,
|
|
886
924
|
contextWindow: 128e3,
|
|
887
925
|
supportsImages: false,
|
|
888
|
-
supportsComputerUse: false,
|
|
889
926
|
supportsPromptCache: false,
|
|
890
927
|
inputPrice: 2,
|
|
891
928
|
outputPrice: 6,
|
|
@@ -895,7 +932,6 @@ var bedrockModels = {
|
|
|
895
932
|
maxTokens: 8192,
|
|
896
933
|
contextWindow: 128e3,
|
|
897
934
|
supportsImages: false,
|
|
898
|
-
supportsComputerUse: false,
|
|
899
935
|
supportsPromptCache: false,
|
|
900
936
|
inputPrice: 0.72,
|
|
901
937
|
outputPrice: 0.72,
|
|
@@ -905,7 +941,6 @@ var bedrockModels = {
|
|
|
905
941
|
maxTokens: 8192,
|
|
906
942
|
contextWindow: 128e3,
|
|
907
943
|
supportsImages: true,
|
|
908
|
-
supportsComputerUse: false,
|
|
909
944
|
supportsPromptCache: false,
|
|
910
945
|
inputPrice: 0.72,
|
|
911
946
|
outputPrice: 0.72,
|
|
@@ -915,7 +950,6 @@ var bedrockModels = {
|
|
|
915
950
|
maxTokens: 8192,
|
|
916
951
|
contextWindow: 128e3,
|
|
917
952
|
supportsImages: true,
|
|
918
|
-
supportsComputerUse: false,
|
|
919
953
|
supportsPromptCache: false,
|
|
920
954
|
inputPrice: 0.16,
|
|
921
955
|
outputPrice: 0.16,
|
|
@@ -925,7 +959,6 @@ var bedrockModels = {
|
|
|
925
959
|
maxTokens: 8192,
|
|
926
960
|
contextWindow: 128e3,
|
|
927
961
|
supportsImages: false,
|
|
928
|
-
supportsComputerUse: false,
|
|
929
962
|
supportsPromptCache: false,
|
|
930
963
|
inputPrice: 0.15,
|
|
931
964
|
outputPrice: 0.15,
|
|
@@ -935,7 +968,6 @@ var bedrockModels = {
|
|
|
935
968
|
maxTokens: 8192,
|
|
936
969
|
contextWindow: 128e3,
|
|
937
970
|
supportsImages: false,
|
|
938
|
-
supportsComputerUse: false,
|
|
939
971
|
supportsPromptCache: false,
|
|
940
972
|
inputPrice: 0.1,
|
|
941
973
|
outputPrice: 0.1,
|
|
@@ -945,7 +977,6 @@ var bedrockModels = {
|
|
|
945
977
|
maxTokens: 8192,
|
|
946
978
|
contextWindow: 128e3,
|
|
947
979
|
supportsImages: false,
|
|
948
|
-
supportsComputerUse: false,
|
|
949
980
|
supportsPromptCache: false,
|
|
950
981
|
inputPrice: 2.4,
|
|
951
982
|
outputPrice: 2.4,
|
|
@@ -955,7 +986,6 @@ var bedrockModels = {
|
|
|
955
986
|
maxTokens: 8192,
|
|
956
987
|
contextWindow: 128e3,
|
|
957
988
|
supportsImages: false,
|
|
958
|
-
supportsComputerUse: false,
|
|
959
989
|
supportsPromptCache: false,
|
|
960
990
|
inputPrice: 0.72,
|
|
961
991
|
outputPrice: 0.72,
|
|
@@ -965,7 +995,6 @@ var bedrockModels = {
|
|
|
965
995
|
maxTokens: 8192,
|
|
966
996
|
contextWindow: 128e3,
|
|
967
997
|
supportsImages: false,
|
|
968
|
-
supportsComputerUse: false,
|
|
969
998
|
supportsPromptCache: false,
|
|
970
999
|
inputPrice: 0.9,
|
|
971
1000
|
outputPrice: 0.9,
|
|
@@ -975,7 +1004,6 @@ var bedrockModels = {
|
|
|
975
1004
|
maxTokens: 8192,
|
|
976
1005
|
contextWindow: 8e3,
|
|
977
1006
|
supportsImages: false,
|
|
978
|
-
supportsComputerUse: false,
|
|
979
1007
|
supportsPromptCache: false,
|
|
980
1008
|
inputPrice: 0.22,
|
|
981
1009
|
outputPrice: 0.22,
|
|
@@ -985,7 +1013,6 @@ var bedrockModels = {
|
|
|
985
1013
|
maxTokens: 2048,
|
|
986
1014
|
contextWindow: 8e3,
|
|
987
1015
|
supportsImages: false,
|
|
988
|
-
supportsComputerUse: false,
|
|
989
1016
|
supportsPromptCache: false,
|
|
990
1017
|
inputPrice: 2.65,
|
|
991
1018
|
outputPrice: 3.5
|
|
@@ -994,7 +1021,6 @@ var bedrockModels = {
|
|
|
994
1021
|
maxTokens: 2048,
|
|
995
1022
|
contextWindow: 4e3,
|
|
996
1023
|
supportsImages: false,
|
|
997
|
-
supportsComputerUse: false,
|
|
998
1024
|
supportsPromptCache: false,
|
|
999
1025
|
inputPrice: 0.3,
|
|
1000
1026
|
outputPrice: 0.6
|
|
@@ -1003,7 +1029,6 @@ var bedrockModels = {
|
|
|
1003
1029
|
maxTokens: 4096,
|
|
1004
1030
|
contextWindow: 8e3,
|
|
1005
1031
|
supportsImages: false,
|
|
1006
|
-
supportsComputerUse: false,
|
|
1007
1032
|
supportsPromptCache: false,
|
|
1008
1033
|
inputPrice: 0.15,
|
|
1009
1034
|
outputPrice: 0.2,
|
|
@@ -1013,7 +1038,6 @@ var bedrockModels = {
|
|
|
1013
1038
|
maxTokens: 4096,
|
|
1014
1039
|
contextWindow: 8e3,
|
|
1015
1040
|
supportsImages: false,
|
|
1016
|
-
supportsComputerUse: false,
|
|
1017
1041
|
supportsPromptCache: false,
|
|
1018
1042
|
inputPrice: 0.2,
|
|
1019
1043
|
outputPrice: 0.6,
|
|
@@ -1023,7 +1047,6 @@ var bedrockModels = {
|
|
|
1023
1047
|
maxTokens: 8192,
|
|
1024
1048
|
contextWindow: 8e3,
|
|
1025
1049
|
supportsImages: false,
|
|
1026
|
-
supportsComputerUse: false,
|
|
1027
1050
|
supportsPromptCache: false,
|
|
1028
1051
|
inputPrice: 0.1,
|
|
1029
1052
|
description: "Amazon Titan Text Embeddings"
|
|
@@ -1032,7 +1055,6 @@ var bedrockModels = {
|
|
|
1032
1055
|
maxTokens: 8192,
|
|
1033
1056
|
contextWindow: 8e3,
|
|
1034
1057
|
supportsImages: false,
|
|
1035
|
-
supportsComputerUse: false,
|
|
1036
1058
|
supportsPromptCache: false,
|
|
1037
1059
|
inputPrice: 0.02,
|
|
1038
1060
|
description: "Amazon Titan Text Embeddings V2"
|
|
@@ -1042,17 +1064,22 @@ var BEDROCK_DEFAULT_TEMPERATURE = 0.3;
|
|
|
1042
1064
|
var BEDROCK_MAX_TOKENS = 4096;
|
|
1043
1065
|
var BEDROCK_DEFAULT_CONTEXT = 128e3;
|
|
1044
1066
|
var AWS_INFERENCE_PROFILE_MAPPING = [
|
|
1045
|
-
//
|
|
1067
|
+
// Australia regions (Sydney and Melbourne) → au. inference profile (most specific - 14 chars)
|
|
1068
|
+
["ap-southeast-2", "au."],
|
|
1069
|
+
["ap-southeast-4", "au."],
|
|
1070
|
+
// Japan regions (Tokyo and Osaka) → jp. inference profile (13 chars)
|
|
1071
|
+
["ap-northeast-", "jp."],
|
|
1072
|
+
// US Government Cloud → ug. inference profile (7 chars)
|
|
1046
1073
|
["us-gov-", "ug."],
|
|
1047
|
-
// Americas regions → us. inference profile
|
|
1074
|
+
// Americas regions → us. inference profile (3 chars)
|
|
1048
1075
|
["us-", "us."],
|
|
1049
|
-
// Europe regions → eu. inference profile
|
|
1076
|
+
// Europe regions → eu. inference profile (3 chars)
|
|
1050
1077
|
["eu-", "eu."],
|
|
1051
|
-
// Asia Pacific regions → apac. inference profile
|
|
1078
|
+
// Asia Pacific regions → apac. inference profile (3 chars)
|
|
1052
1079
|
["ap-", "apac."],
|
|
1053
|
-
// Canada regions → ca. inference profile
|
|
1080
|
+
// Canada regions → ca. inference profile (3 chars)
|
|
1054
1081
|
["ca-", "ca."],
|
|
1055
|
-
// South America regions → sa. inference profile
|
|
1082
|
+
// South America regions → sa. inference profile (3 chars)
|
|
1056
1083
|
["sa-", "sa."]
|
|
1057
1084
|
];
|
|
1058
1085
|
var BEDROCK_REGIONS = [
|
|
@@ -1085,10 +1112,25 @@ var BEDROCK_1M_CONTEXT_MODEL_IDS = [
|
|
|
1085
1112
|
"anthropic.claude-sonnet-4-20250514-v1:0",
|
|
1086
1113
|
"anthropic.claude-sonnet-4-5-20250929-v1:0"
|
|
1087
1114
|
];
|
|
1115
|
+
var BEDROCK_GLOBAL_INFERENCE_MODEL_IDS = [
|
|
1116
|
+
"anthropic.claude-sonnet-4-20250514-v1:0",
|
|
1117
|
+
"anthropic.claude-sonnet-4-5-20250929-v1:0",
|
|
1118
|
+
"anthropic.claude-haiku-4-5-20251001-v1:0"
|
|
1119
|
+
];
|
|
1088
1120
|
|
|
1089
1121
|
// src/providers/cerebras.ts
|
|
1090
|
-
var cerebrasDefaultModelId = "
|
|
1122
|
+
var cerebrasDefaultModelId = "gpt-oss-120b";
|
|
1091
1123
|
var cerebrasModels = {
|
|
1124
|
+
"zai-glm-4.6": {
|
|
1125
|
+
maxTokens: 16384,
|
|
1126
|
+
// consistent with their other models
|
|
1127
|
+
contextWindow: 131072,
|
|
1128
|
+
supportsImages: false,
|
|
1129
|
+
supportsPromptCache: false,
|
|
1130
|
+
inputPrice: 0,
|
|
1131
|
+
outputPrice: 0,
|
|
1132
|
+
description: "Highly intelligent general purpose model with up to 1,000 tokens/s"
|
|
1133
|
+
},
|
|
1092
1134
|
"qwen-3-coder-480b-free": {
|
|
1093
1135
|
maxTokens: 4e4,
|
|
1094
1136
|
contextWindow: 64e3,
|
|
@@ -1096,7 +1138,7 @@ var cerebrasModels = {
|
|
|
1096
1138
|
supportsPromptCache: false,
|
|
1097
1139
|
inputPrice: 0,
|
|
1098
1140
|
outputPrice: 0,
|
|
1099
|
-
description: "SOTA coding model with ~2000 tokens/s ($0 free tier)\n\n\u2022 Use this if you don't have a Cerebras subscription\n\u2022 64K context window\n\u2022 Rate limits: 150K TPM, 1M TPH/TPD, 10 RPM, 100 RPH/RPD\n\nUpgrade for higher limits: [https://cloud.cerebras.ai/?utm=roocode](https://cloud.cerebras.ai/?utm=roocode)"
|
|
1141
|
+
description: "[SOON TO BE DEPRECATED] SOTA coding model with ~2000 tokens/s ($0 free tier)\n\n\u2022 Use this if you don't have a Cerebras subscription\n\u2022 64K context window\n\u2022 Rate limits: 150K TPM, 1M TPH/TPD, 10 RPM, 100 RPH/RPD\n\nUpgrade for higher limits: [https://cloud.cerebras.ai/?utm=roocode](https://cloud.cerebras.ai/?utm=roocode)"
|
|
1100
1142
|
},
|
|
1101
1143
|
"qwen-3-coder-480b": {
|
|
1102
1144
|
maxTokens: 4e4,
|
|
@@ -1105,7 +1147,7 @@ var cerebrasModels = {
|
|
|
1105
1147
|
supportsPromptCache: false,
|
|
1106
1148
|
inputPrice: 0,
|
|
1107
1149
|
outputPrice: 0,
|
|
1108
|
-
description: "SOTA coding model with ~2000 tokens/s ($50/$250 paid tiers)\n\n\u2022 Use this if you have a Cerebras subscription\n\u2022 131K context window with higher rate limits"
|
|
1150
|
+
description: "[SOON TO BE DEPRECATED] SOTA coding model with ~2000 tokens/s ($50/$250 paid tiers)\n\n\u2022 Use this if you have a Cerebras subscription\n\u2022 131K context window with higher rate limits"
|
|
1109
1151
|
},
|
|
1110
1152
|
"qwen-3-235b-a22b-instruct-2507": {
|
|
1111
1153
|
maxTokens: 64e3,
|
|
@@ -1439,6 +1481,25 @@ var chutesModels = {
|
|
|
1439
1481
|
outputPrice: 0,
|
|
1440
1482
|
description: "GLM-4.6 introduces major upgrades over GLM-4.5, including a longer 200K-token context window for complex tasks, stronger coding performance in benchmarks and real-world tools (such as Claude Code, Cline, Roo Code, and Kilo Code), improved reasoning with tool use during inference, more capable and efficient agent integration, and refined writing that better matches human style, readability, and natural role-play scenarios."
|
|
1441
1483
|
},
|
|
1484
|
+
"zai-org/GLM-4.6-turbo": {
|
|
1485
|
+
maxTokens: 202752,
|
|
1486
|
+
// From Chutes /v1/models: max_output_length
|
|
1487
|
+
contextWindow: 202752,
|
|
1488
|
+
supportsImages: false,
|
|
1489
|
+
supportsPromptCache: false,
|
|
1490
|
+
inputPrice: 1.15,
|
|
1491
|
+
outputPrice: 3.25,
|
|
1492
|
+
description: "GLM-4.6-turbo model with 200K-token context window, optimized for fast inference."
|
|
1493
|
+
},
|
|
1494
|
+
"meituan-longcat/LongCat-Flash-Thinking-FP8": {
|
|
1495
|
+
maxTokens: 32768,
|
|
1496
|
+
contextWindow: 128e3,
|
|
1497
|
+
supportsImages: false,
|
|
1498
|
+
supportsPromptCache: false,
|
|
1499
|
+
inputPrice: 0,
|
|
1500
|
+
outputPrice: 0,
|
|
1501
|
+
description: "LongCat Flash Thinking FP8 model with 128K context window, optimized for complex reasoning and coding tasks."
|
|
1502
|
+
},
|
|
1442
1503
|
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": {
|
|
1443
1504
|
maxTokens: 32768,
|
|
1444
1505
|
contextWindow: 262144,
|
|
@@ -1503,13 +1564,14 @@ var chutesModels = {
|
|
|
1503
1564
|
description: "Qwen3\u2011VL\u2011235B\u2011A22B\u2011Thinking is an open\u2011weight MoE vision\u2011language model (235B total, ~22B activated) optimized for deliberate multi\u2011step reasoning with strong text\u2011image\u2011video understanding and long\u2011context capabilities."
|
|
1504
1565
|
}
|
|
1505
1566
|
};
|
|
1567
|
+
var chutesDefaultModelInfo = chutesModels[chutesDefaultModelId];
|
|
1506
1568
|
|
|
1507
1569
|
// src/providers/claude-code.ts
|
|
1508
1570
|
var VERTEX_DATE_PATTERN = /-(\d{8})$/;
|
|
1509
1571
|
function convertModelNameForVertex(modelName) {
|
|
1510
1572
|
return modelName.replace(VERTEX_DATE_PATTERN, "@$1");
|
|
1511
1573
|
}
|
|
1512
|
-
var claudeCodeDefaultModelId = "claude-sonnet-4-
|
|
1574
|
+
var claudeCodeDefaultModelId = "claude-sonnet-4-5";
|
|
1513
1575
|
var CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS = 16e3;
|
|
1514
1576
|
function getClaudeCodeModelId(baseModelId, useVertex = false) {
|
|
1515
1577
|
return useVertex ? convertModelNameForVertex(baseModelId) : baseModelId;
|
|
@@ -1524,6 +1586,17 @@ var claudeCodeModels = {
|
|
|
1524
1586
|
supportsReasoningBudget: false,
|
|
1525
1587
|
requiredReasoningBudget: false
|
|
1526
1588
|
},
|
|
1589
|
+
"claude-sonnet-4-5-20250929[1m]": {
|
|
1590
|
+
...anthropicModels["claude-sonnet-4-5"],
|
|
1591
|
+
contextWindow: 1e6,
|
|
1592
|
+
// 1M token context window (requires [1m] suffix)
|
|
1593
|
+
supportsImages: false,
|
|
1594
|
+
supportsPromptCache: true,
|
|
1595
|
+
// Claude Code does report cache tokens
|
|
1596
|
+
supportsReasoningEffort: false,
|
|
1597
|
+
supportsReasoningBudget: false,
|
|
1598
|
+
requiredReasoningBudget: false
|
|
1599
|
+
},
|
|
1527
1600
|
"claude-sonnet-4-20250514": {
|
|
1528
1601
|
...anthropicModels["claude-sonnet-4-20250514"],
|
|
1529
1602
|
supportsImages: false,
|
|
@@ -1577,6 +1650,15 @@ var claudeCodeModels = {
|
|
|
1577
1650
|
supportsReasoningEffort: false,
|
|
1578
1651
|
supportsReasoningBudget: false,
|
|
1579
1652
|
requiredReasoningBudget: false
|
|
1653
|
+
},
|
|
1654
|
+
"claude-haiku-4-5-20251001": {
|
|
1655
|
+
...anthropicModels["claude-haiku-4-5-20251001"],
|
|
1656
|
+
supportsImages: false,
|
|
1657
|
+
supportsPromptCache: true,
|
|
1658
|
+
// Claude Code does report cache tokens
|
|
1659
|
+
supportsReasoningEffort: false,
|
|
1660
|
+
supportsReasoningBudget: false,
|
|
1661
|
+
requiredReasoningBudget: false
|
|
1580
1662
|
}
|
|
1581
1663
|
};
|
|
1582
1664
|
|
|
@@ -1743,6 +1825,15 @@ var fireworksModels = {
|
|
|
1743
1825
|
outputPrice: 2.5,
|
|
1744
1826
|
description: "Kimi K2 is a state-of-the-art mixture-of-experts (MoE) language model with 32 billion activated parameters and 1 trillion total parameters. Trained with the Muon optimizer, Kimi K2 achieves exceptional performance across frontier knowledge, reasoning, and coding tasks while being meticulously optimized for agentic capabilities."
|
|
1745
1827
|
},
|
|
1828
|
+
"accounts/fireworks/models/minimax-m2": {
|
|
1829
|
+
maxTokens: 4096,
|
|
1830
|
+
contextWindow: 204800,
|
|
1831
|
+
supportsImages: false,
|
|
1832
|
+
supportsPromptCache: false,
|
|
1833
|
+
inputPrice: 0.3,
|
|
1834
|
+
outputPrice: 1.2,
|
|
1835
|
+
description: "MiniMax M2 is a high-performance language model with 204.8K context window, optimized for long-context understanding and generation tasks."
|
|
1836
|
+
},
|
|
1746
1837
|
"accounts/fireworks/models/qwen3-235b-a22b-instruct-2507": {
|
|
1747
1838
|
maxTokens: 32768,
|
|
1748
1839
|
contextWindow: 256e3,
|
|
@@ -1806,6 +1897,15 @@ var fireworksModels = {
|
|
|
1806
1897
|
outputPrice: 2.19,
|
|
1807
1898
|
description: "Z.ai GLM-4.5-Air with 106B total parameters and 12B active parameters. Features unified reasoning, coding, and intelligent agent capabilities."
|
|
1808
1899
|
},
|
|
1900
|
+
"accounts/fireworks/models/glm-4p6": {
|
|
1901
|
+
maxTokens: 25344,
|
|
1902
|
+
contextWindow: 198e3,
|
|
1903
|
+
supportsImages: false,
|
|
1904
|
+
supportsPromptCache: false,
|
|
1905
|
+
inputPrice: 0.55,
|
|
1906
|
+
outputPrice: 2.19,
|
|
1907
|
+
description: "Z.ai GLM-4.6 is an advanced coding model with exceptional performance on complex programming tasks. Features improved reasoning capabilities and enhanced code generation quality, making it ideal for software development workflows."
|
|
1908
|
+
},
|
|
1809
1909
|
"accounts/fireworks/models/gpt-oss-20b": {
|
|
1810
1910
|
maxTokens: 16384,
|
|
1811
1911
|
contextWindow: 128e3,
|
|
@@ -1829,25 +1929,70 @@ var fireworksModels = {
|
|
|
1829
1929
|
// src/providers/gemini.ts
|
|
1830
1930
|
var geminiDefaultModelId = "gemini-2.0-flash-001";
|
|
1831
1931
|
var geminiModels = {
|
|
1832
|
-
|
|
1833
|
-
|
|
1932
|
+
// Latest models (pointing to the most recent stable versions)
|
|
1933
|
+
"gemini-flash-latest": {
|
|
1934
|
+
maxTokens: 65536,
|
|
1834
1935
|
contextWindow: 1048576,
|
|
1835
1936
|
supportsImages: true,
|
|
1836
|
-
supportsPromptCache:
|
|
1837
|
-
inputPrice: 0.
|
|
1838
|
-
outputPrice:
|
|
1937
|
+
supportsPromptCache: true,
|
|
1938
|
+
inputPrice: 0.3,
|
|
1939
|
+
outputPrice: 2.5,
|
|
1940
|
+
cacheReadsPrice: 0.075,
|
|
1941
|
+
cacheWritesPrice: 1,
|
|
1839
1942
|
maxThinkingTokens: 24576,
|
|
1943
|
+
supportsReasoningBudget: true
|
|
1944
|
+
},
|
|
1945
|
+
"gemini-flash-lite-latest": {
|
|
1946
|
+
maxTokens: 65536,
|
|
1947
|
+
contextWindow: 1048576,
|
|
1948
|
+
supportsImages: true,
|
|
1949
|
+
supportsPromptCache: true,
|
|
1950
|
+
inputPrice: 0.1,
|
|
1951
|
+
outputPrice: 0.4,
|
|
1952
|
+
cacheReadsPrice: 0.025,
|
|
1953
|
+
cacheWritesPrice: 1,
|
|
1840
1954
|
supportsReasoningBudget: true,
|
|
1841
|
-
|
|
1955
|
+
maxThinkingTokens: 24576
|
|
1842
1956
|
},
|
|
1843
|
-
|
|
1844
|
-
|
|
1957
|
+
// 2.5 Flash models (09-2025 versions - most recent)
|
|
1958
|
+
"gemini-2.5-flash-preview-09-2025": {
|
|
1959
|
+
maxTokens: 65536,
|
|
1845
1960
|
contextWindow: 1048576,
|
|
1846
1961
|
supportsImages: true,
|
|
1847
|
-
supportsPromptCache:
|
|
1848
|
-
inputPrice: 0.
|
|
1849
|
-
outputPrice:
|
|
1962
|
+
supportsPromptCache: true,
|
|
1963
|
+
inputPrice: 0.3,
|
|
1964
|
+
outputPrice: 2.5,
|
|
1965
|
+
cacheReadsPrice: 0.075,
|
|
1966
|
+
cacheWritesPrice: 1,
|
|
1967
|
+
maxThinkingTokens: 24576,
|
|
1968
|
+
supportsReasoningBudget: true
|
|
1969
|
+
},
|
|
1970
|
+
"gemini-2.5-flash-lite-preview-09-2025": {
|
|
1971
|
+
maxTokens: 65536,
|
|
1972
|
+
contextWindow: 1048576,
|
|
1973
|
+
supportsImages: true,
|
|
1974
|
+
supportsPromptCache: true,
|
|
1975
|
+
inputPrice: 0.1,
|
|
1976
|
+
outputPrice: 0.4,
|
|
1977
|
+
cacheReadsPrice: 0.025,
|
|
1978
|
+
cacheWritesPrice: 1,
|
|
1979
|
+
supportsReasoningBudget: true,
|
|
1980
|
+
maxThinkingTokens: 24576
|
|
1981
|
+
},
|
|
1982
|
+
// 2.5 Flash models (06-17 version)
|
|
1983
|
+
"gemini-2.5-flash-lite-preview-06-17": {
|
|
1984
|
+
maxTokens: 64e3,
|
|
1985
|
+
contextWindow: 1048576,
|
|
1986
|
+
supportsImages: true,
|
|
1987
|
+
supportsPromptCache: true,
|
|
1988
|
+
inputPrice: 0.1,
|
|
1989
|
+
outputPrice: 0.4,
|
|
1990
|
+
cacheReadsPrice: 0.025,
|
|
1991
|
+
cacheWritesPrice: 1,
|
|
1992
|
+
supportsReasoningBudget: true,
|
|
1993
|
+
maxThinkingTokens: 24576
|
|
1850
1994
|
},
|
|
1995
|
+
// 2.5 Flash models (05-20 versions)
|
|
1851
1996
|
"gemini-2.5-flash-preview-05-20:thinking": {
|
|
1852
1997
|
maxTokens: 65535,
|
|
1853
1998
|
contextWindow: 1048576,
|
|
@@ -1871,6 +2016,27 @@ var geminiModels = {
|
|
|
1871
2016
|
cacheReadsPrice: 0.0375,
|
|
1872
2017
|
cacheWritesPrice: 1
|
|
1873
2018
|
},
|
|
2019
|
+
// 2.5 Flash models (04-17 versions)
|
|
2020
|
+
"gemini-2.5-flash-preview-04-17:thinking": {
|
|
2021
|
+
maxTokens: 65535,
|
|
2022
|
+
contextWindow: 1048576,
|
|
2023
|
+
supportsImages: true,
|
|
2024
|
+
supportsPromptCache: false,
|
|
2025
|
+
inputPrice: 0.15,
|
|
2026
|
+
outputPrice: 3.5,
|
|
2027
|
+
maxThinkingTokens: 24576,
|
|
2028
|
+
supportsReasoningBudget: true,
|
|
2029
|
+
requiredReasoningBudget: true
|
|
2030
|
+
},
|
|
2031
|
+
"gemini-2.5-flash-preview-04-17": {
|
|
2032
|
+
maxTokens: 65535,
|
|
2033
|
+
contextWindow: 1048576,
|
|
2034
|
+
supportsImages: true,
|
|
2035
|
+
supportsPromptCache: false,
|
|
2036
|
+
inputPrice: 0.15,
|
|
2037
|
+
outputPrice: 0.6
|
|
2038
|
+
},
|
|
2039
|
+
// 2.5 Flash stable
|
|
1874
2040
|
"gemini-2.5-flash": {
|
|
1875
2041
|
maxTokens: 64e3,
|
|
1876
2042
|
contextWindow: 1048576,
|
|
@@ -1883,15 +2049,8 @@ var geminiModels = {
|
|
|
1883
2049
|
maxThinkingTokens: 24576,
|
|
1884
2050
|
supportsReasoningBudget: true
|
|
1885
2051
|
},
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
contextWindow: 1048576,
|
|
1889
|
-
supportsImages: true,
|
|
1890
|
-
supportsPromptCache: false,
|
|
1891
|
-
inputPrice: 0,
|
|
1892
|
-
outputPrice: 0
|
|
1893
|
-
},
|
|
1894
|
-
"gemini-2.5-pro-preview-03-25": {
|
|
2052
|
+
// 2.5 Pro models
|
|
2053
|
+
"gemini-2.5-pro-preview-06-05": {
|
|
1895
2054
|
maxTokens: 65535,
|
|
1896
2055
|
contextWindow: 1048576,
|
|
1897
2056
|
supportsImages: true,
|
|
@@ -1901,6 +2060,8 @@ var geminiModels = {
|
|
|
1901
2060
|
outputPrice: 15,
|
|
1902
2061
|
cacheReadsPrice: 0.625,
|
|
1903
2062
|
cacheWritesPrice: 4.5,
|
|
2063
|
+
maxThinkingTokens: 32768,
|
|
2064
|
+
supportsReasoningBudget: true,
|
|
1904
2065
|
tiers: [
|
|
1905
2066
|
{
|
|
1906
2067
|
contextWindow: 2e5,
|
|
@@ -1941,7 +2102,7 @@ var geminiModels = {
|
|
|
1941
2102
|
}
|
|
1942
2103
|
]
|
|
1943
2104
|
},
|
|
1944
|
-
"gemini-2.5-pro-preview-
|
|
2105
|
+
"gemini-2.5-pro-preview-03-25": {
|
|
1945
2106
|
maxTokens: 65535,
|
|
1946
2107
|
contextWindow: 1048576,
|
|
1947
2108
|
supportsImages: true,
|
|
@@ -1968,6 +2129,14 @@ var geminiModels = {
|
|
|
1968
2129
|
}
|
|
1969
2130
|
]
|
|
1970
2131
|
},
|
|
2132
|
+
"gemini-2.5-pro-exp-03-25": {
|
|
2133
|
+
maxTokens: 65535,
|
|
2134
|
+
contextWindow: 1048576,
|
|
2135
|
+
supportsImages: true,
|
|
2136
|
+
supportsPromptCache: false,
|
|
2137
|
+
inputPrice: 0,
|
|
2138
|
+
outputPrice: 0
|
|
2139
|
+
},
|
|
1971
2140
|
"gemini-2.5-pro": {
|
|
1972
2141
|
maxTokens: 64e3,
|
|
1973
2142
|
contextWindow: 1048576,
|
|
@@ -1996,16 +2165,7 @@ var geminiModels = {
|
|
|
1996
2165
|
}
|
|
1997
2166
|
]
|
|
1998
2167
|
},
|
|
1999
|
-
|
|
2000
|
-
maxTokens: 8192,
|
|
2001
|
-
contextWindow: 1048576,
|
|
2002
|
-
supportsImages: true,
|
|
2003
|
-
supportsPromptCache: true,
|
|
2004
|
-
inputPrice: 0.1,
|
|
2005
|
-
outputPrice: 0.4,
|
|
2006
|
-
cacheReadsPrice: 0.025,
|
|
2007
|
-
cacheWritesPrice: 1
|
|
2008
|
-
},
|
|
2168
|
+
// 2.0 Flash models
|
|
2009
2169
|
"gemini-2.0-flash-lite-preview-02-05": {
|
|
2010
2170
|
maxTokens: 8192,
|
|
2011
2171
|
contextWindow: 1048576,
|
|
@@ -2014,14 +2174,6 @@ var geminiModels = {
|
|
|
2014
2174
|
inputPrice: 0,
|
|
2015
2175
|
outputPrice: 0
|
|
2016
2176
|
},
|
|
2017
|
-
"gemini-2.0-pro-exp-02-05": {
|
|
2018
|
-
maxTokens: 8192,
|
|
2019
|
-
contextWindow: 2097152,
|
|
2020
|
-
supportsImages: true,
|
|
2021
|
-
supportsPromptCache: false,
|
|
2022
|
-
inputPrice: 0,
|
|
2023
|
-
outputPrice: 0
|
|
2024
|
-
},
|
|
2025
2177
|
"gemini-2.0-flash-thinking-exp-01-21": {
|
|
2026
2178
|
maxTokens: 65536,
|
|
2027
2179
|
contextWindow: 1048576,
|
|
@@ -2046,6 +2198,26 @@ var geminiModels = {
|
|
|
2046
2198
|
inputPrice: 0,
|
|
2047
2199
|
outputPrice: 0
|
|
2048
2200
|
},
|
|
2201
|
+
"gemini-2.0-flash-001": {
|
|
2202
|
+
maxTokens: 8192,
|
|
2203
|
+
contextWindow: 1048576,
|
|
2204
|
+
supportsImages: true,
|
|
2205
|
+
supportsPromptCache: true,
|
|
2206
|
+
inputPrice: 0.1,
|
|
2207
|
+
outputPrice: 0.4,
|
|
2208
|
+
cacheReadsPrice: 0.025,
|
|
2209
|
+
cacheWritesPrice: 1
|
|
2210
|
+
},
|
|
2211
|
+
// 2.0 Pro models
|
|
2212
|
+
"gemini-2.0-pro-exp-02-05": {
|
|
2213
|
+
maxTokens: 8192,
|
|
2214
|
+
contextWindow: 2097152,
|
|
2215
|
+
supportsImages: true,
|
|
2216
|
+
supportsPromptCache: false,
|
|
2217
|
+
inputPrice: 0,
|
|
2218
|
+
outputPrice: 0
|
|
2219
|
+
},
|
|
2220
|
+
// 1.5 Flash models
|
|
2049
2221
|
"gemini-1.5-flash-002": {
|
|
2050
2222
|
maxTokens: 8192,
|
|
2051
2223
|
contextWindow: 1048576,
|
|
@@ -2087,6 +2259,7 @@ var geminiModels = {
|
|
|
2087
2259
|
inputPrice: 0,
|
|
2088
2260
|
outputPrice: 0
|
|
2089
2261
|
},
|
|
2262
|
+
// 1.5 Pro models
|
|
2090
2263
|
"gemini-1.5-pro-002": {
|
|
2091
2264
|
maxTokens: 8192,
|
|
2092
2265
|
contextWindow: 2097152,
|
|
@@ -2103,6 +2276,7 @@ var geminiModels = {
|
|
|
2103
2276
|
inputPrice: 0,
|
|
2104
2277
|
outputPrice: 0
|
|
2105
2278
|
},
|
|
2279
|
+
// Experimental models
|
|
2106
2280
|
"gemini-exp-1206": {
|
|
2107
2281
|
maxTokens: 8192,
|
|
2108
2282
|
contextWindow: 2097152,
|
|
@@ -2110,18 +2284,6 @@ var geminiModels = {
|
|
|
2110
2284
|
supportsPromptCache: false,
|
|
2111
2285
|
inputPrice: 0,
|
|
2112
2286
|
outputPrice: 0
|
|
2113
|
-
},
|
|
2114
|
-
"gemini-2.5-flash-lite-preview-06-17": {
|
|
2115
|
-
maxTokens: 64e3,
|
|
2116
|
-
contextWindow: 1048576,
|
|
2117
|
-
supportsImages: true,
|
|
2118
|
-
supportsPromptCache: true,
|
|
2119
|
-
inputPrice: 0.1,
|
|
2120
|
-
outputPrice: 0.4,
|
|
2121
|
-
cacheReadsPrice: 0.025,
|
|
2122
|
-
cacheWritesPrice: 1,
|
|
2123
|
-
supportsReasoningBudget: true,
|
|
2124
|
-
maxThinkingTokens: 24576
|
|
2125
2287
|
}
|
|
2126
2288
|
};
|
|
2127
2289
|
|
|
@@ -2131,7 +2293,6 @@ var glamaDefaultModelInfo = {
|
|
|
2131
2293
|
maxTokens: 8192,
|
|
2132
2294
|
contextWindow: 2e5,
|
|
2133
2295
|
supportsImages: true,
|
|
2134
|
-
supportsComputerUse: true,
|
|
2135
2296
|
supportsPromptCache: true,
|
|
2136
2297
|
inputPrice: 3,
|
|
2137
2298
|
outputPrice: 15,
|
|
@@ -2309,50 +2470,12 @@ var litellmDefaultModelInfo = {
|
|
|
2309
2470
|
maxTokens: 8192,
|
|
2310
2471
|
contextWindow: 2e5,
|
|
2311
2472
|
supportsImages: true,
|
|
2312
|
-
supportsComputerUse: true,
|
|
2313
2473
|
supportsPromptCache: true,
|
|
2314
2474
|
inputPrice: 3,
|
|
2315
2475
|
outputPrice: 15,
|
|
2316
2476
|
cacheWritesPrice: 3.75,
|
|
2317
2477
|
cacheReadsPrice: 0.3
|
|
2318
2478
|
};
|
|
2319
|
-
var LITELLM_COMPUTER_USE_MODELS = /* @__PURE__ */ new Set([
|
|
2320
|
-
"claude-3-5-sonnet-latest",
|
|
2321
|
-
"claude-opus-4-1-20250805",
|
|
2322
|
-
"claude-opus-4-20250514",
|
|
2323
|
-
"claude-sonnet-4-20250514",
|
|
2324
|
-
"claude-3-7-sonnet-latest",
|
|
2325
|
-
"claude-3-7-sonnet-20250219",
|
|
2326
|
-
"claude-3-5-sonnet-20241022",
|
|
2327
|
-
"vertex_ai/claude-3-5-sonnet",
|
|
2328
|
-
"vertex_ai/claude-3-5-sonnet-v2",
|
|
2329
|
-
"vertex_ai/claude-3-5-sonnet-v2@20241022",
|
|
2330
|
-
"vertex_ai/claude-3-7-sonnet@20250219",
|
|
2331
|
-
"vertex_ai/claude-opus-4-1@20250805",
|
|
2332
|
-
"vertex_ai/claude-opus-4@20250514",
|
|
2333
|
-
"vertex_ai/claude-sonnet-4@20250514",
|
|
2334
|
-
"vertex_ai/claude-sonnet-4-5@20250929",
|
|
2335
|
-
"openrouter/anthropic/claude-3.5-sonnet",
|
|
2336
|
-
"openrouter/anthropic/claude-3.5-sonnet:beta",
|
|
2337
|
-
"openrouter/anthropic/claude-3.7-sonnet",
|
|
2338
|
-
"openrouter/anthropic/claude-3.7-sonnet:beta",
|
|
2339
|
-
"anthropic.claude-opus-4-1-20250805-v1:0",
|
|
2340
|
-
"anthropic.claude-opus-4-20250514-v1:0",
|
|
2341
|
-
"anthropic.claude-sonnet-4-20250514-v1:0",
|
|
2342
|
-
"anthropic.claude-3-7-sonnet-20250219-v1:0",
|
|
2343
|
-
"anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
2344
|
-
"us.anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
2345
|
-
"us.anthropic.claude-3-7-sonnet-20250219-v1:0",
|
|
2346
|
-
"us.anthropic.claude-opus-4-1-20250805-v1:0",
|
|
2347
|
-
"us.anthropic.claude-opus-4-20250514-v1:0",
|
|
2348
|
-
"us.anthropic.claude-sonnet-4-20250514-v1:0",
|
|
2349
|
-
"eu.anthropic.claude-3-5-sonnet-20241022-v2:0",
|
|
2350
|
-
"eu.anthropic.claude-3-7-sonnet-20250219-v1:0",
|
|
2351
|
-
"eu.anthropic.claude-opus-4-1-20250805-v1:0",
|
|
2352
|
-
"eu.anthropic.claude-opus-4-20250514-v1:0",
|
|
2353
|
-
"eu.anthropic.claude-sonnet-4-20250514-v1:0",
|
|
2354
|
-
"snowflake/claude-3-5-sonnet"
|
|
2355
|
-
]);
|
|
2356
2479
|
|
|
2357
2480
|
// src/providers/lm-studio.ts
|
|
2358
2481
|
var LMSTUDIO_DEFAULT_TEMPERATURE = 0;
|
|
@@ -2361,7 +2484,6 @@ var lMStudioDefaultModelInfo = {
|
|
|
2361
2484
|
maxTokens: 8192,
|
|
2362
2485
|
contextWindow: 2e5,
|
|
2363
2486
|
supportsImages: true,
|
|
2364
|
-
supportsComputerUse: true,
|
|
2365
2487
|
supportsPromptCache: true,
|
|
2366
2488
|
inputPrice: 0,
|
|
2367
2489
|
outputPrice: 0,
|
|
@@ -2374,9 +2496,9 @@ var lMStudioDefaultModelInfo = {
|
|
|
2374
2496
|
var mistralDefaultModelId = "codestral-latest";
|
|
2375
2497
|
var mistralModels = {
|
|
2376
2498
|
"magistral-medium-latest": {
|
|
2377
|
-
maxTokens:
|
|
2378
|
-
contextWindow:
|
|
2379
|
-
supportsImages:
|
|
2499
|
+
maxTokens: 8192,
|
|
2500
|
+
contextWindow: 128e3,
|
|
2501
|
+
supportsImages: true,
|
|
2380
2502
|
supportsPromptCache: false,
|
|
2381
2503
|
inputPrice: 2,
|
|
2382
2504
|
outputPrice: 5
|
|
@@ -2490,6 +2612,28 @@ var moonshotModels = {
|
|
|
2490
2612
|
cacheReadsPrice: 0.6,
|
|
2491
2613
|
// $0.60 per million tokens (cache hit)
|
|
2492
2614
|
description: `Kimi K2 Turbo is a high-speed version of the state-of-the-art Kimi K2 mixture-of-experts (MoE) language model, with the same 32 billion activated parameters and 1 trillion total parameters, optimized for output speeds of up to 60 tokens per second, peaking at 100 tokens per second.`
|
|
2615
|
+
},
|
|
2616
|
+
"kimi-k2-thinking": {
|
|
2617
|
+
maxTokens: 16e3,
|
|
2618
|
+
// Recommended ≥ 16,000
|
|
2619
|
+
contextWindow: 262144,
|
|
2620
|
+
// 262,144 tokens
|
|
2621
|
+
supportsImages: false,
|
|
2622
|
+
// Text-only (no image/vision support)
|
|
2623
|
+
supportsPromptCache: true,
|
|
2624
|
+
inputPrice: 0.6,
|
|
2625
|
+
// $0.60 per million tokens (cache miss)
|
|
2626
|
+
outputPrice: 2.5,
|
|
2627
|
+
// $2.50 per million tokens
|
|
2628
|
+
cacheWritesPrice: 0,
|
|
2629
|
+
// $0 per million tokens (cache miss)
|
|
2630
|
+
cacheReadsPrice: 0.15,
|
|
2631
|
+
// $0.15 per million tokens (cache hit)
|
|
2632
|
+
supportsTemperature: true,
|
|
2633
|
+
// Default temperature: 1.0
|
|
2634
|
+
preserveReasoning: true,
|
|
2635
|
+
defaultTemperature: 1,
|
|
2636
|
+
description: `The kimi-k2-thinking model is a general-purpose agentic reasoning model developed by Moonshot AI. Thanks to its strength in deep reasoning and multi-turn tool use, it can solve even the hardest problems.`
|
|
2493
2637
|
}
|
|
2494
2638
|
};
|
|
2495
2639
|
var MOONSHOT_DEFAULT_TEMPERATURE = 0.6;
|
|
@@ -2500,7 +2644,6 @@ var ollamaDefaultModelInfo = {
|
|
|
2500
2644
|
maxTokens: 4096,
|
|
2501
2645
|
contextWindow: 2e5,
|
|
2502
2646
|
supportsImages: true,
|
|
2503
|
-
supportsComputerUse: true,
|
|
2504
2647
|
supportsPromptCache: true,
|
|
2505
2648
|
inputPrice: 0,
|
|
2506
2649
|
outputPrice: 0,
|
|
@@ -2510,85 +2653,130 @@ var ollamaDefaultModelInfo = {
|
|
|
2510
2653
|
};
|
|
2511
2654
|
|
|
2512
2655
|
// src/providers/openai.ts
|
|
2513
|
-
var openAiNativeDefaultModelId = "gpt-5
|
|
2656
|
+
var openAiNativeDefaultModelId = "gpt-5.1";
|
|
2514
2657
|
var openAiNativeModels = {
|
|
2515
|
-
"gpt-5
|
|
2658
|
+
"gpt-5.1": {
|
|
2516
2659
|
maxTokens: 128e3,
|
|
2517
2660
|
contextWindow: 4e5,
|
|
2518
2661
|
supportsImages: true,
|
|
2519
2662
|
supportsPromptCache: true,
|
|
2520
|
-
|
|
2663
|
+
promptCacheRetention: "24h",
|
|
2664
|
+
supportsReasoningEffort: ["none", "low", "medium", "high"],
|
|
2665
|
+
reasoningEffort: "medium",
|
|
2521
2666
|
inputPrice: 1.25,
|
|
2522
2667
|
outputPrice: 10,
|
|
2523
|
-
cacheReadsPrice: 0.
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2668
|
+
cacheReadsPrice: 0.125,
|
|
2669
|
+
supportsVerbosity: true,
|
|
2670
|
+
supportsTemperature: false,
|
|
2671
|
+
tiers: [
|
|
2672
|
+
{ name: "flex", contextWindow: 4e5, inputPrice: 0.625, outputPrice: 5, cacheReadsPrice: 0.0625 },
|
|
2673
|
+
{ name: "priority", contextWindow: 4e5, inputPrice: 2.5, outputPrice: 20, cacheReadsPrice: 0.25 }
|
|
2674
|
+
],
|
|
2675
|
+
description: "GPT-5.1: The best model for coding and agentic tasks across domains"
|
|
2676
|
+
},
|
|
2677
|
+
"gpt-5.1-codex": {
|
|
2528
2678
|
maxTokens: 128e3,
|
|
2529
2679
|
contextWindow: 4e5,
|
|
2530
2680
|
supportsImages: true,
|
|
2531
2681
|
supportsPromptCache: true,
|
|
2532
|
-
|
|
2682
|
+
promptCacheRetention: "24h",
|
|
2683
|
+
supportsReasoningEffort: ["low", "medium", "high"],
|
|
2533
2684
|
reasoningEffort: "medium",
|
|
2534
2685
|
inputPrice: 1.25,
|
|
2535
2686
|
outputPrice: 10,
|
|
2536
|
-
cacheReadsPrice: 0.
|
|
2537
|
-
|
|
2538
|
-
|
|
2687
|
+
cacheReadsPrice: 0.125,
|
|
2688
|
+
supportsTemperature: false,
|
|
2689
|
+
tiers: [{ name: "priority", contextWindow: 4e5, inputPrice: 2.5, outputPrice: 20, cacheReadsPrice: 0.25 }],
|
|
2690
|
+
description: "GPT-5.1 Codex: A version of GPT-5.1 optimized for agentic coding in Codex"
|
|
2691
|
+
},
|
|
2692
|
+
"gpt-5.1-codex-mini": {
|
|
2693
|
+
maxTokens: 128e3,
|
|
2694
|
+
contextWindow: 4e5,
|
|
2695
|
+
supportsImages: true,
|
|
2696
|
+
supportsPromptCache: true,
|
|
2697
|
+
promptCacheRetention: "24h",
|
|
2698
|
+
supportsReasoningEffort: ["low", "medium", "high"],
|
|
2699
|
+
reasoningEffort: "medium",
|
|
2700
|
+
inputPrice: 0.25,
|
|
2701
|
+
outputPrice: 2,
|
|
2702
|
+
cacheReadsPrice: 0.025,
|
|
2703
|
+
supportsTemperature: false,
|
|
2704
|
+
description: "GPT-5.1 Codex mini: A version of GPT-5.1 optimized for agentic coding in Codex"
|
|
2705
|
+
},
|
|
2706
|
+
"gpt-5": {
|
|
2707
|
+
maxTokens: 128e3,
|
|
2708
|
+
contextWindow: 4e5,
|
|
2709
|
+
supportsImages: true,
|
|
2710
|
+
supportsPromptCache: true,
|
|
2711
|
+
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
2712
|
+
reasoningEffort: "medium",
|
|
2713
|
+
inputPrice: 1.25,
|
|
2714
|
+
outputPrice: 10,
|
|
2715
|
+
cacheReadsPrice: 0.125,
|
|
2539
2716
|
supportsVerbosity: true,
|
|
2540
2717
|
supportsTemperature: false,
|
|
2541
2718
|
tiers: [
|
|
2542
2719
|
{ name: "flex", contextWindow: 4e5, inputPrice: 0.625, outputPrice: 5, cacheReadsPrice: 0.0625 },
|
|
2543
2720
|
{ name: "priority", contextWindow: 4e5, inputPrice: 2.5, outputPrice: 20, cacheReadsPrice: 0.25 }
|
|
2544
|
-
]
|
|
2721
|
+
],
|
|
2722
|
+
description: "GPT-5: The best model for coding and agentic tasks across domains"
|
|
2545
2723
|
},
|
|
2546
|
-
"gpt-5-mini
|
|
2724
|
+
"gpt-5-mini": {
|
|
2547
2725
|
maxTokens: 128e3,
|
|
2548
2726
|
contextWindow: 4e5,
|
|
2549
2727
|
supportsImages: true,
|
|
2550
2728
|
supportsPromptCache: true,
|
|
2551
|
-
supportsReasoningEffort:
|
|
2729
|
+
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
2552
2730
|
reasoningEffort: "medium",
|
|
2553
2731
|
inputPrice: 0.25,
|
|
2554
2732
|
outputPrice: 2,
|
|
2555
|
-
cacheReadsPrice: 0.
|
|
2556
|
-
description: "GPT-5 Mini: A faster, more cost-efficient version of GPT-5 for well-defined tasks",
|
|
2733
|
+
cacheReadsPrice: 0.025,
|
|
2557
2734
|
supportsVerbosity: true,
|
|
2558
2735
|
supportsTemperature: false,
|
|
2559
2736
|
tiers: [
|
|
2560
2737
|
{ name: "flex", contextWindow: 4e5, inputPrice: 0.125, outputPrice: 1, cacheReadsPrice: 0.0125 },
|
|
2561
2738
|
{ name: "priority", contextWindow: 4e5, inputPrice: 0.45, outputPrice: 3.6, cacheReadsPrice: 0.045 }
|
|
2562
|
-
]
|
|
2739
|
+
],
|
|
2740
|
+
description: "GPT-5 Mini: A faster, more cost-efficient version of GPT-5 for well-defined tasks"
|
|
2563
2741
|
},
|
|
2564
|
-
"gpt-5-
|
|
2742
|
+
"gpt-5-codex": {
|
|
2743
|
+
maxTokens: 128e3,
|
|
2744
|
+
contextWindow: 4e5,
|
|
2745
|
+
supportsImages: true,
|
|
2746
|
+
supportsPromptCache: true,
|
|
2747
|
+
supportsReasoningEffort: ["low", "medium", "high"],
|
|
2748
|
+
reasoningEffort: "medium",
|
|
2749
|
+
inputPrice: 1.25,
|
|
2750
|
+
outputPrice: 10,
|
|
2751
|
+
cacheReadsPrice: 0.125,
|
|
2752
|
+
supportsTemperature: false,
|
|
2753
|
+
tiers: [{ name: "priority", contextWindow: 4e5, inputPrice: 2.5, outputPrice: 20, cacheReadsPrice: 0.25 }],
|
|
2754
|
+
description: "GPT-5-Codex: A version of GPT-5 optimized for agentic coding in Codex"
|
|
2755
|
+
},
|
|
2756
|
+
"gpt-5-nano": {
|
|
2565
2757
|
maxTokens: 128e3,
|
|
2566
2758
|
contextWindow: 4e5,
|
|
2567
2759
|
supportsImages: true,
|
|
2568
2760
|
supportsPromptCache: true,
|
|
2569
|
-
supportsReasoningEffort:
|
|
2761
|
+
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
2570
2762
|
reasoningEffort: "medium",
|
|
2571
2763
|
inputPrice: 0.05,
|
|
2572
2764
|
outputPrice: 0.4,
|
|
2573
|
-
cacheReadsPrice:
|
|
2574
|
-
description: "GPT-5 Nano: Fastest, most cost-efficient version of GPT-5",
|
|
2765
|
+
cacheReadsPrice: 5e-3,
|
|
2575
2766
|
supportsVerbosity: true,
|
|
2576
2767
|
supportsTemperature: false,
|
|
2577
|
-
tiers: [{ name: "flex", contextWindow: 4e5, inputPrice: 0.025, outputPrice: 0.2, cacheReadsPrice: 25e-4 }]
|
|
2768
|
+
tiers: [{ name: "flex", contextWindow: 4e5, inputPrice: 0.025, outputPrice: 0.2, cacheReadsPrice: 25e-4 }],
|
|
2769
|
+
description: "GPT-5 Nano: Fastest, most cost-efficient version of GPT-5"
|
|
2578
2770
|
},
|
|
2579
|
-
"gpt-5-
|
|
2771
|
+
"gpt-5-chat-latest": {
|
|
2580
2772
|
maxTokens: 128e3,
|
|
2581
2773
|
contextWindow: 4e5,
|
|
2582
2774
|
supportsImages: true,
|
|
2583
2775
|
supportsPromptCache: true,
|
|
2584
|
-
supportsReasoningEffort: true,
|
|
2585
|
-
reasoningEffort: "medium",
|
|
2586
2776
|
inputPrice: 1.25,
|
|
2587
2777
|
outputPrice: 10,
|
|
2588
|
-
cacheReadsPrice: 0.
|
|
2589
|
-
description: "GPT-5
|
|
2590
|
-
supportsVerbosity: true,
|
|
2591
|
-
supportsTemperature: false
|
|
2778
|
+
cacheReadsPrice: 0.125,
|
|
2779
|
+
description: "GPT-5 Chat: Optimized for conversational AI and non-reasoning tasks"
|
|
2592
2780
|
},
|
|
2593
2781
|
"gpt-4.1": {
|
|
2594
2782
|
maxTokens: 32768,
|
|
@@ -2637,7 +2825,7 @@ var openAiNativeModels = {
|
|
|
2637
2825
|
inputPrice: 2,
|
|
2638
2826
|
outputPrice: 8,
|
|
2639
2827
|
cacheReadsPrice: 0.5,
|
|
2640
|
-
supportsReasoningEffort:
|
|
2828
|
+
supportsReasoningEffort: ["low", "medium", "high"],
|
|
2641
2829
|
reasoningEffort: "medium",
|
|
2642
2830
|
supportsTemperature: false,
|
|
2643
2831
|
tiers: [
|
|
@@ -2675,7 +2863,7 @@ var openAiNativeModels = {
|
|
|
2675
2863
|
inputPrice: 1.1,
|
|
2676
2864
|
outputPrice: 4.4,
|
|
2677
2865
|
cacheReadsPrice: 0.275,
|
|
2678
|
-
supportsReasoningEffort:
|
|
2866
|
+
supportsReasoningEffort: ["low", "medium", "high"],
|
|
2679
2867
|
reasoningEffort: "medium",
|
|
2680
2868
|
supportsTemperature: false,
|
|
2681
2869
|
tiers: [
|
|
@@ -2713,7 +2901,7 @@ var openAiNativeModels = {
|
|
|
2713
2901
|
inputPrice: 1.1,
|
|
2714
2902
|
outputPrice: 4.4,
|
|
2715
2903
|
cacheReadsPrice: 0.55,
|
|
2716
|
-
supportsReasoningEffort:
|
|
2904
|
+
supportsReasoningEffort: ["low", "medium", "high"],
|
|
2717
2905
|
reasoningEffort: "medium",
|
|
2718
2906
|
supportsTemperature: false
|
|
2719
2907
|
},
|
|
@@ -2802,9 +2990,61 @@ var openAiNativeModels = {
|
|
|
2802
2990
|
supportsPromptCache: false,
|
|
2803
2991
|
inputPrice: 1.5,
|
|
2804
2992
|
outputPrice: 6,
|
|
2805
|
-
cacheReadsPrice: 0,
|
|
2993
|
+
cacheReadsPrice: 0.375,
|
|
2806
2994
|
supportsTemperature: false,
|
|
2807
2995
|
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."
|
|
2996
|
+
},
|
|
2997
|
+
// Dated clones (snapshots) preserved for backward compatibility
|
|
2998
|
+
"gpt-5-2025-08-07": {
|
|
2999
|
+
maxTokens: 128e3,
|
|
3000
|
+
contextWindow: 4e5,
|
|
3001
|
+
supportsImages: true,
|
|
3002
|
+
supportsPromptCache: true,
|
|
3003
|
+
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
3004
|
+
reasoningEffort: "medium",
|
|
3005
|
+
inputPrice: 1.25,
|
|
3006
|
+
outputPrice: 10,
|
|
3007
|
+
cacheReadsPrice: 0.125,
|
|
3008
|
+
supportsVerbosity: true,
|
|
3009
|
+
supportsTemperature: false,
|
|
3010
|
+
tiers: [
|
|
3011
|
+
{ name: "flex", contextWindow: 4e5, inputPrice: 0.625, outputPrice: 5, cacheReadsPrice: 0.0625 },
|
|
3012
|
+
{ name: "priority", contextWindow: 4e5, inputPrice: 2.5, outputPrice: 20, cacheReadsPrice: 0.25 }
|
|
3013
|
+
],
|
|
3014
|
+
description: "GPT-5: The best model for coding and agentic tasks across domains"
|
|
3015
|
+
},
|
|
3016
|
+
"gpt-5-mini-2025-08-07": {
|
|
3017
|
+
maxTokens: 128e3,
|
|
3018
|
+
contextWindow: 4e5,
|
|
3019
|
+
supportsImages: true,
|
|
3020
|
+
supportsPromptCache: true,
|
|
3021
|
+
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
3022
|
+
reasoningEffort: "medium",
|
|
3023
|
+
inputPrice: 0.25,
|
|
3024
|
+
outputPrice: 2,
|
|
3025
|
+
cacheReadsPrice: 0.025,
|
|
3026
|
+
supportsVerbosity: true,
|
|
3027
|
+
supportsTemperature: false,
|
|
3028
|
+
tiers: [
|
|
3029
|
+
{ name: "flex", contextWindow: 4e5, inputPrice: 0.125, outputPrice: 1, cacheReadsPrice: 0.0125 },
|
|
3030
|
+
{ name: "priority", contextWindow: 4e5, inputPrice: 0.45, outputPrice: 3.6, cacheReadsPrice: 0.045 }
|
|
3031
|
+
],
|
|
3032
|
+
description: "GPT-5 Mini: A faster, more cost-efficient version of GPT-5 for well-defined tasks"
|
|
3033
|
+
},
|
|
3034
|
+
"gpt-5-nano-2025-08-07": {
|
|
3035
|
+
maxTokens: 128e3,
|
|
3036
|
+
contextWindow: 4e5,
|
|
3037
|
+
supportsImages: true,
|
|
3038
|
+
supportsPromptCache: true,
|
|
3039
|
+
supportsReasoningEffort: ["minimal", "low", "medium", "high"],
|
|
3040
|
+
reasoningEffort: "medium",
|
|
3041
|
+
inputPrice: 0.05,
|
|
3042
|
+
outputPrice: 0.4,
|
|
3043
|
+
cacheReadsPrice: 5e-3,
|
|
3044
|
+
supportsVerbosity: true,
|
|
3045
|
+
supportsTemperature: false,
|
|
3046
|
+
tiers: [{ name: "flex", contextWindow: 4e5, inputPrice: 0.025, outputPrice: 0.2, cacheReadsPrice: 25e-4 }],
|
|
3047
|
+
description: "GPT-5 Nano: Fastest, most cost-efficient version of GPT-5"
|
|
2808
3048
|
}
|
|
2809
3049
|
};
|
|
2810
3050
|
var openAiModelInfoSaneDefaults = {
|
|
@@ -2817,17 +3057,16 @@ var openAiModelInfoSaneDefaults = {
|
|
|
2817
3057
|
};
|
|
2818
3058
|
var azureOpenAiDefaultApiVersion = "2024-08-01-preview";
|
|
2819
3059
|
var OPENAI_NATIVE_DEFAULT_TEMPERATURE = 0;
|
|
2820
|
-
var GPT5_DEFAULT_TEMPERATURE = 1;
|
|
2821
3060
|
var OPENAI_AZURE_AI_INFERENCE_PATH = "/models/chat/completions";
|
|
2822
3061
|
|
|
2823
3062
|
// src/providers/openrouter.ts
|
|
2824
|
-
var openRouterDefaultModelId = "anthropic/claude-sonnet-4";
|
|
3063
|
+
var openRouterDefaultModelId = "anthropic/claude-sonnet-4.5";
|
|
2825
3064
|
var openRouterDefaultModelInfo = {
|
|
2826
3065
|
maxTokens: 8192,
|
|
2827
3066
|
contextWindow: 2e5,
|
|
2828
3067
|
supportsImages: true,
|
|
2829
|
-
supportsComputerUse: true,
|
|
2830
3068
|
supportsPromptCache: true,
|
|
3069
|
+
supportsNativeTools: true,
|
|
2831
3070
|
inputPrice: 3,
|
|
2832
3071
|
outputPrice: 15,
|
|
2833
3072
|
cacheWritesPrice: 3.75,
|
|
@@ -2857,6 +3096,7 @@ var OPEN_ROUTER_PROMPT_CACHING_MODELS = /* @__PURE__ */ new Set([
|
|
|
2857
3096
|
"anthropic/claude-sonnet-4.5",
|
|
2858
3097
|
"anthropic/claude-opus-4",
|
|
2859
3098
|
"anthropic/claude-opus-4.1",
|
|
3099
|
+
"anthropic/claude-haiku-4.5",
|
|
2860
3100
|
"google/gemini-2.5-flash-preview",
|
|
2861
3101
|
"google/gemini-2.5-flash-preview:thinking",
|
|
2862
3102
|
"google/gemini-2.5-flash-preview-05-20",
|
|
@@ -2867,17 +3107,6 @@ var OPEN_ROUTER_PROMPT_CACHING_MODELS = /* @__PURE__ */ new Set([
|
|
|
2867
3107
|
"google/gemini-flash-1.5",
|
|
2868
3108
|
"google/gemini-flash-1.5-8b"
|
|
2869
3109
|
]);
|
|
2870
|
-
var OPEN_ROUTER_COMPUTER_USE_MODELS = /* @__PURE__ */ new Set([
|
|
2871
|
-
"anthropic/claude-3.5-sonnet",
|
|
2872
|
-
"anthropic/claude-3.5-sonnet:beta",
|
|
2873
|
-
"anthropic/claude-3.7-sonnet",
|
|
2874
|
-
"anthropic/claude-3.7-sonnet:beta",
|
|
2875
|
-
"anthropic/claude-3.7-sonnet:thinking",
|
|
2876
|
-
"anthropic/claude-sonnet-4",
|
|
2877
|
-
"anthropic/claude-sonnet-4.5",
|
|
2878
|
-
"anthropic/claude-opus-4",
|
|
2879
|
-
"anthropic/claude-opus-4.1"
|
|
2880
|
-
]);
|
|
2881
3110
|
var OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS = /* @__PURE__ */ new Set([
|
|
2882
3111
|
"anthropic/claude-3.7-sonnet:thinking",
|
|
2883
3112
|
"google/gemini-2.5-pro",
|
|
@@ -2889,6 +3118,7 @@ var OPEN_ROUTER_REASONING_BUDGET_MODELS = /* @__PURE__ */ new Set([
|
|
|
2889
3118
|
"anthropic/claude-opus-4.1",
|
|
2890
3119
|
"anthropic/claude-sonnet-4",
|
|
2891
3120
|
"anthropic/claude-sonnet-4.5",
|
|
3121
|
+
"anthropic/claude-haiku-4.5",
|
|
2892
3122
|
"google/gemini-2.5-pro-preview",
|
|
2893
3123
|
"google/gemini-2.5-pro",
|
|
2894
3124
|
"google/gemini-2.5-flash-preview-05-20",
|
|
@@ -2933,7 +3163,6 @@ var requestyDefaultModelInfo = {
|
|
|
2933
3163
|
maxTokens: 8192,
|
|
2934
3164
|
contextWindow: 2e5,
|
|
2935
3165
|
supportsImages: true,
|
|
2936
|
-
supportsComputerUse: true,
|
|
2937
3166
|
supportsPromptCache: true,
|
|
2938
3167
|
inputPrice: 3,
|
|
2939
3168
|
outputPrice: 15,
|
|
@@ -2943,46 +3172,43 @@ var requestyDefaultModelInfo = {
|
|
|
2943
3172
|
};
|
|
2944
3173
|
|
|
2945
3174
|
// src/providers/roo.ts
|
|
3175
|
+
import { z as z7 } from "zod";
|
|
2946
3176
|
var rooDefaultModelId = "xai/grok-code-fast-1";
|
|
2947
|
-
var rooModels = {
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
},
|
|
2957
|
-
"roo/code-supernova-1-million": {
|
|
2958
|
-
maxTokens: 3e4,
|
|
2959
|
-
contextWindow: 1e6,
|
|
2960
|
-
supportsImages: true,
|
|
2961
|
-
supportsPromptCache: true,
|
|
2962
|
-
inputPrice: 0,
|
|
2963
|
-
outputPrice: 0,
|
|
2964
|
-
description: "A versatile agentic coding stealth model with a 1M token context window that supports image inputs, accessible for free through Roo Code Cloud for a limited time. (Note: the free prompts and completions are logged by the model provider and used to improve the model.)"
|
|
2965
|
-
},
|
|
2966
|
-
"xai/grok-4-fast": {
|
|
2967
|
-
maxTokens: 3e4,
|
|
2968
|
-
contextWindow: 2e6,
|
|
2969
|
-
supportsImages: false,
|
|
2970
|
-
supportsPromptCache: false,
|
|
2971
|
-
inputPrice: 0,
|
|
2972
|
-
outputPrice: 0,
|
|
2973
|
-
description: "Grok 4 Fast is xAI's latest multimodal model with SOTA cost-efficiency and a 2M token context window. (Note: prompts and completions are logged by xAI and used to improve the model.)",
|
|
2974
|
-
deprecated: true
|
|
2975
|
-
},
|
|
2976
|
-
"deepseek/deepseek-chat-v3.1": {
|
|
2977
|
-
maxTokens: 16384,
|
|
2978
|
-
contextWindow: 163840,
|
|
2979
|
-
supportsImages: false,
|
|
2980
|
-
supportsPromptCache: false,
|
|
2981
|
-
inputPrice: 0,
|
|
2982
|
-
outputPrice: 0,
|
|
2983
|
-
description: "DeepSeek-V3.1 is a large hybrid reasoning model (671B parameters, 37B active). It extends the DeepSeek-V3 base with a two-phase long-context training process, reaching up to 128K tokens, and uses FP8 microscaling for efficient inference."
|
|
3177
|
+
var rooModels = {};
|
|
3178
|
+
var rooModelDefaults = {
|
|
3179
|
+
// Add model-specific defaults below.
|
|
3180
|
+
// You can configure defaultToolProtocol and other ModelInfo fields for specific model IDs.
|
|
3181
|
+
"anthropic/claude-haiku-4.5": {
|
|
3182
|
+
defaultToolProtocol: TOOL_PROTOCOL.NATIVE
|
|
3183
|
+
},
|
|
3184
|
+
"minimax/minimax-m2:free": {
|
|
3185
|
+
defaultToolProtocol: TOOL_PROTOCOL.NATIVE
|
|
2984
3186
|
}
|
|
2985
3187
|
};
|
|
3188
|
+
var RooPricingSchema = z7.object({
|
|
3189
|
+
input: z7.string(),
|
|
3190
|
+
output: z7.string(),
|
|
3191
|
+
input_cache_read: z7.string().optional(),
|
|
3192
|
+
input_cache_write: z7.string().optional()
|
|
3193
|
+
});
|
|
3194
|
+
var RooModelSchema = z7.object({
|
|
3195
|
+
id: z7.string(),
|
|
3196
|
+
object: z7.literal("model"),
|
|
3197
|
+
created: z7.number(),
|
|
3198
|
+
owned_by: z7.string(),
|
|
3199
|
+
name: z7.string(),
|
|
3200
|
+
description: z7.string(),
|
|
3201
|
+
context_window: z7.number(),
|
|
3202
|
+
max_tokens: z7.number(),
|
|
3203
|
+
type: z7.literal("language"),
|
|
3204
|
+
tags: z7.array(z7.string()).optional(),
|
|
3205
|
+
pricing: RooPricingSchema,
|
|
3206
|
+
deprecated: z7.boolean().optional()
|
|
3207
|
+
});
|
|
3208
|
+
var RooModelsResponseSchema = z7.object({
|
|
3209
|
+
object: z7.literal("list"),
|
|
3210
|
+
data: z7.array(RooModelSchema)
|
|
3211
|
+
});
|
|
2986
3212
|
|
|
2987
3213
|
// src/providers/sambanova.ts
|
|
2988
3214
|
var sambaNovaDefaultModelId = "Meta-Llama-3.3-70B-Instruct";
|
|
@@ -3081,7 +3307,7 @@ var sambaNovaModels = {
|
|
|
3081
3307
|
};
|
|
3082
3308
|
|
|
3083
3309
|
// src/providers/unbound.ts
|
|
3084
|
-
var unboundDefaultModelId = "anthropic/claude-
|
|
3310
|
+
var unboundDefaultModelId = "anthropic/claude-sonnet-4-5";
|
|
3085
3311
|
var unboundDefaultModelInfo = {
|
|
3086
3312
|
maxTokens: 8192,
|
|
3087
3313
|
contextWindow: 2e5,
|
|
@@ -3257,7 +3483,6 @@ var vertexModels = {
|
|
|
3257
3483
|
maxTokens: 8192,
|
|
3258
3484
|
contextWindow: 2e5,
|
|
3259
3485
|
supportsImages: true,
|
|
3260
|
-
supportsComputerUse: true,
|
|
3261
3486
|
supportsPromptCache: true,
|
|
3262
3487
|
inputPrice: 3,
|
|
3263
3488
|
outputPrice: 15,
|
|
@@ -3269,7 +3494,6 @@ var vertexModels = {
|
|
|
3269
3494
|
maxTokens: 8192,
|
|
3270
3495
|
contextWindow: 2e5,
|
|
3271
3496
|
supportsImages: true,
|
|
3272
|
-
supportsComputerUse: true,
|
|
3273
3497
|
supportsPromptCache: true,
|
|
3274
3498
|
inputPrice: 3,
|
|
3275
3499
|
outputPrice: 15,
|
|
@@ -3277,11 +3501,21 @@ var vertexModels = {
|
|
|
3277
3501
|
cacheReadsPrice: 0.3,
|
|
3278
3502
|
supportsReasoningBudget: true
|
|
3279
3503
|
},
|
|
3504
|
+
"claude-haiku-4-5@20251001": {
|
|
3505
|
+
maxTokens: 8192,
|
|
3506
|
+
contextWindow: 2e5,
|
|
3507
|
+
supportsImages: true,
|
|
3508
|
+
supportsPromptCache: true,
|
|
3509
|
+
inputPrice: 1,
|
|
3510
|
+
outputPrice: 5,
|
|
3511
|
+
cacheWritesPrice: 1.25,
|
|
3512
|
+
cacheReadsPrice: 0.1,
|
|
3513
|
+
supportsReasoningBudget: true
|
|
3514
|
+
},
|
|
3280
3515
|
"claude-opus-4-1@20250805": {
|
|
3281
3516
|
maxTokens: 8192,
|
|
3282
3517
|
contextWindow: 2e5,
|
|
3283
3518
|
supportsImages: true,
|
|
3284
|
-
supportsComputerUse: true,
|
|
3285
3519
|
supportsPromptCache: true,
|
|
3286
3520
|
inputPrice: 15,
|
|
3287
3521
|
outputPrice: 75,
|
|
@@ -3293,7 +3527,6 @@ var vertexModels = {
|
|
|
3293
3527
|
maxTokens: 8192,
|
|
3294
3528
|
contextWindow: 2e5,
|
|
3295
3529
|
supportsImages: true,
|
|
3296
|
-
supportsComputerUse: true,
|
|
3297
3530
|
supportsPromptCache: true,
|
|
3298
3531
|
inputPrice: 15,
|
|
3299
3532
|
outputPrice: 75,
|
|
@@ -3304,7 +3537,6 @@ var vertexModels = {
|
|
|
3304
3537
|
maxTokens: 64e3,
|
|
3305
3538
|
contextWindow: 2e5,
|
|
3306
3539
|
supportsImages: true,
|
|
3307
|
-
supportsComputerUse: true,
|
|
3308
3540
|
supportsPromptCache: true,
|
|
3309
3541
|
inputPrice: 3,
|
|
3310
3542
|
outputPrice: 15,
|
|
@@ -3317,7 +3549,6 @@ var vertexModels = {
|
|
|
3317
3549
|
maxTokens: 8192,
|
|
3318
3550
|
contextWindow: 2e5,
|
|
3319
3551
|
supportsImages: true,
|
|
3320
|
-
supportsComputerUse: true,
|
|
3321
3552
|
supportsPromptCache: true,
|
|
3322
3553
|
inputPrice: 3,
|
|
3323
3554
|
outputPrice: 15,
|
|
@@ -3328,7 +3559,6 @@ var vertexModels = {
|
|
|
3328
3559
|
maxTokens: 8192,
|
|
3329
3560
|
contextWindow: 2e5,
|
|
3330
3561
|
supportsImages: true,
|
|
3331
|
-
supportsComputerUse: true,
|
|
3332
3562
|
supportsPromptCache: true,
|
|
3333
3563
|
inputPrice: 3,
|
|
3334
3564
|
outputPrice: 15,
|
|
@@ -3848,7 +4078,6 @@ var vercelAiGatewayDefaultModelInfo = {
|
|
|
3848
4078
|
maxTokens: 64e3,
|
|
3849
4079
|
contextWindow: 2e5,
|
|
3850
4080
|
supportsImages: true,
|
|
3851
|
-
supportsComputerUse: true,
|
|
3852
4081
|
supportsPromptCache: true,
|
|
3853
4082
|
inputPrice: 3,
|
|
3854
4083
|
outputPrice: 15,
|
|
@@ -3859,13 +4088,14 @@ var vercelAiGatewayDefaultModelInfo = {
|
|
|
3859
4088
|
var VERCEL_AI_GATEWAY_DEFAULT_TEMPERATURE = 0.7;
|
|
3860
4089
|
|
|
3861
4090
|
// src/providers/zai.ts
|
|
3862
|
-
var internationalZAiDefaultModelId = "glm-4.
|
|
4091
|
+
var internationalZAiDefaultModelId = "glm-4.6";
|
|
3863
4092
|
var internationalZAiModels = {
|
|
3864
4093
|
"glm-4.5": {
|
|
3865
4094
|
maxTokens: 98304,
|
|
3866
4095
|
contextWindow: 131072,
|
|
3867
4096
|
supportsImages: false,
|
|
3868
4097
|
supportsPromptCache: true,
|
|
4098
|
+
supportsReasoningBinary: true,
|
|
3869
4099
|
inputPrice: 0.6,
|
|
3870
4100
|
outputPrice: 2.2,
|
|
3871
4101
|
cacheWritesPrice: 0,
|
|
@@ -3883,50 +4113,87 @@ var internationalZAiModels = {
|
|
|
3883
4113
|
cacheReadsPrice: 0.03,
|
|
3884
4114
|
description: "GLM-4.5-Air is the lightweight version of GLM-4.5. It balances performance and cost-effectiveness, and can flexibly switch to hybrid thinking models."
|
|
3885
4115
|
},
|
|
4116
|
+
"glm-4.5-x": {
|
|
4117
|
+
maxTokens: 98304,
|
|
4118
|
+
contextWindow: 131072,
|
|
4119
|
+
supportsImages: false,
|
|
4120
|
+
supportsPromptCache: true,
|
|
4121
|
+
inputPrice: 2.2,
|
|
4122
|
+
outputPrice: 8.9,
|
|
4123
|
+
cacheWritesPrice: 0,
|
|
4124
|
+
cacheReadsPrice: 0.45,
|
|
4125
|
+
description: "GLM-4.5-X is a high-performance variant optimized for strong reasoning with ultra-fast responses."
|
|
4126
|
+
},
|
|
4127
|
+
"glm-4.5-airx": {
|
|
4128
|
+
maxTokens: 98304,
|
|
4129
|
+
contextWindow: 131072,
|
|
4130
|
+
supportsImages: false,
|
|
4131
|
+
supportsPromptCache: true,
|
|
4132
|
+
inputPrice: 1.1,
|
|
4133
|
+
outputPrice: 4.5,
|
|
4134
|
+
cacheWritesPrice: 0,
|
|
4135
|
+
cacheReadsPrice: 0.22,
|
|
4136
|
+
description: "GLM-4.5-AirX is a lightweight, ultra-fast variant delivering strong performance with lower cost."
|
|
4137
|
+
},
|
|
4138
|
+
"glm-4.5-flash": {
|
|
4139
|
+
maxTokens: 98304,
|
|
4140
|
+
contextWindow: 131072,
|
|
4141
|
+
supportsImages: false,
|
|
4142
|
+
supportsPromptCache: true,
|
|
4143
|
+
inputPrice: 0,
|
|
4144
|
+
outputPrice: 0,
|
|
4145
|
+
cacheWritesPrice: 0,
|
|
4146
|
+
cacheReadsPrice: 0,
|
|
4147
|
+
description: "GLM-4.5-Flash is a free, high-speed model excellent for reasoning, coding, and agentic tasks."
|
|
4148
|
+
},
|
|
4149
|
+
"glm-4.5v": {
|
|
4150
|
+
maxTokens: 16384,
|
|
4151
|
+
contextWindow: 131072,
|
|
4152
|
+
supportsImages: true,
|
|
4153
|
+
supportsPromptCache: true,
|
|
4154
|
+
inputPrice: 0.6,
|
|
4155
|
+
outputPrice: 1.8,
|
|
4156
|
+
cacheWritesPrice: 0,
|
|
4157
|
+
cacheReadsPrice: 0.11,
|
|
4158
|
+
description: "GLM-4.5V is Z.AI's multimodal visual reasoning model (image/video/text/file input), optimized for GUI tasks, grounding, and document/video understanding."
|
|
4159
|
+
},
|
|
3886
4160
|
"glm-4.6": {
|
|
3887
4161
|
maxTokens: 98304,
|
|
3888
|
-
contextWindow:
|
|
4162
|
+
contextWindow: 2e5,
|
|
3889
4163
|
supportsImages: false,
|
|
3890
4164
|
supportsPromptCache: true,
|
|
4165
|
+
supportsReasoningBinary: true,
|
|
3891
4166
|
inputPrice: 0.6,
|
|
3892
4167
|
outputPrice: 2.2,
|
|
3893
4168
|
cacheWritesPrice: 0,
|
|
3894
4169
|
cacheReadsPrice: 0.11,
|
|
3895
4170
|
description: "GLM-4.6 is Zhipu's newest model with an extended context window of up to 200k tokens, providing enhanced capabilities for processing longer documents and conversations."
|
|
4171
|
+
},
|
|
4172
|
+
"glm-4-32b-0414-128k": {
|
|
4173
|
+
maxTokens: 98304,
|
|
4174
|
+
contextWindow: 131072,
|
|
4175
|
+
supportsImages: false,
|
|
4176
|
+
supportsPromptCache: false,
|
|
4177
|
+
inputPrice: 0.1,
|
|
4178
|
+
outputPrice: 0.1,
|
|
4179
|
+
cacheWritesPrice: 0,
|
|
4180
|
+
cacheReadsPrice: 0,
|
|
4181
|
+
description: "GLM-4-32B is a 32 billion parameter model with 128k context length, optimized for efficiency."
|
|
3896
4182
|
}
|
|
3897
4183
|
};
|
|
3898
|
-
var mainlandZAiDefaultModelId = "glm-4.
|
|
4184
|
+
var mainlandZAiDefaultModelId = "glm-4.6";
|
|
3899
4185
|
var mainlandZAiModels = {
|
|
3900
4186
|
"glm-4.5": {
|
|
3901
4187
|
maxTokens: 98304,
|
|
3902
4188
|
contextWindow: 131072,
|
|
3903
4189
|
supportsImages: false,
|
|
3904
4190
|
supportsPromptCache: true,
|
|
4191
|
+
supportsReasoningBinary: true,
|
|
3905
4192
|
inputPrice: 0.29,
|
|
3906
4193
|
outputPrice: 1.14,
|
|
3907
4194
|
cacheWritesPrice: 0,
|
|
3908
4195
|
cacheReadsPrice: 0.057,
|
|
3909
|
-
description: "GLM-4.5 is Zhipu's latest featured model. Its comprehensive capabilities in reasoning, coding, and agent reach the state-of-the-art (SOTA) level among open-source models, with a context length of up to 128k."
|
|
3910
|
-
tiers: [
|
|
3911
|
-
{
|
|
3912
|
-
contextWindow: 32e3,
|
|
3913
|
-
inputPrice: 0.21,
|
|
3914
|
-
outputPrice: 1,
|
|
3915
|
-
cacheReadsPrice: 0.043
|
|
3916
|
-
},
|
|
3917
|
-
{
|
|
3918
|
-
contextWindow: 128e3,
|
|
3919
|
-
inputPrice: 0.29,
|
|
3920
|
-
outputPrice: 1.14,
|
|
3921
|
-
cacheReadsPrice: 0.057
|
|
3922
|
-
},
|
|
3923
|
-
{
|
|
3924
|
-
contextWindow: Infinity,
|
|
3925
|
-
inputPrice: 0.29,
|
|
3926
|
-
outputPrice: 1.14,
|
|
3927
|
-
cacheReadsPrice: 0.057
|
|
3928
|
-
}
|
|
3929
|
-
]
|
|
4196
|
+
description: "GLM-4.5 is Zhipu's latest featured model. Its comprehensive capabilities in reasoning, coding, and agent reach the state-of-the-art (SOTA) level among open-source models, with a context length of up to 128k."
|
|
3930
4197
|
},
|
|
3931
4198
|
"glm-4.5-air": {
|
|
3932
4199
|
maxTokens: 98304,
|
|
@@ -3937,76 +4204,77 @@ var mainlandZAiModels = {
|
|
|
3937
4204
|
outputPrice: 0.6,
|
|
3938
4205
|
cacheWritesPrice: 0,
|
|
3939
4206
|
cacheReadsPrice: 0.02,
|
|
3940
|
-
description: "GLM-4.5-Air is the lightweight version of GLM-4.5. It balances performance and cost-effectiveness, and can flexibly switch to hybrid thinking models."
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
4207
|
+
description: "GLM-4.5-Air is the lightweight version of GLM-4.5. It balances performance and cost-effectiveness, and can flexibly switch to hybrid thinking models."
|
|
4208
|
+
},
|
|
4209
|
+
"glm-4.5-x": {
|
|
4210
|
+
maxTokens: 98304,
|
|
4211
|
+
contextWindow: 131072,
|
|
4212
|
+
supportsImages: false,
|
|
4213
|
+
supportsPromptCache: true,
|
|
4214
|
+
inputPrice: 0.29,
|
|
4215
|
+
outputPrice: 1.14,
|
|
4216
|
+
cacheWritesPrice: 0,
|
|
4217
|
+
cacheReadsPrice: 0.057,
|
|
4218
|
+
description: "GLM-4.5-X is a high-performance variant optimized for strong reasoning with ultra-fast responses."
|
|
4219
|
+
},
|
|
4220
|
+
"glm-4.5-airx": {
|
|
4221
|
+
maxTokens: 98304,
|
|
4222
|
+
contextWindow: 131072,
|
|
4223
|
+
supportsImages: false,
|
|
4224
|
+
supportsPromptCache: true,
|
|
4225
|
+
inputPrice: 0.1,
|
|
4226
|
+
outputPrice: 0.6,
|
|
4227
|
+
cacheWritesPrice: 0,
|
|
4228
|
+
cacheReadsPrice: 0.02,
|
|
4229
|
+
description: "GLM-4.5-AirX is a lightweight, ultra-fast variant delivering strong performance with lower cost."
|
|
4230
|
+
},
|
|
4231
|
+
"glm-4.5-flash": {
|
|
4232
|
+
maxTokens: 98304,
|
|
4233
|
+
contextWindow: 131072,
|
|
4234
|
+
supportsImages: false,
|
|
4235
|
+
supportsPromptCache: true,
|
|
4236
|
+
inputPrice: 0,
|
|
4237
|
+
outputPrice: 0,
|
|
4238
|
+
cacheWritesPrice: 0,
|
|
4239
|
+
cacheReadsPrice: 0,
|
|
4240
|
+
description: "GLM-4.5-Flash is a free, high-speed model excellent for reasoning, coding, and agentic tasks."
|
|
4241
|
+
},
|
|
4242
|
+
"glm-4.5v": {
|
|
4243
|
+
maxTokens: 16384,
|
|
4244
|
+
contextWindow: 131072,
|
|
4245
|
+
supportsImages: true,
|
|
4246
|
+
supportsPromptCache: true,
|
|
4247
|
+
inputPrice: 0.29,
|
|
4248
|
+
outputPrice: 0.93,
|
|
4249
|
+
cacheWritesPrice: 0,
|
|
4250
|
+
cacheReadsPrice: 0.057,
|
|
4251
|
+
description: "GLM-4.5V is Z.AI's multimodal visual reasoning model (image/video/text/file input), optimized for GUI tasks, grounding, and document/video understanding."
|
|
3961
4252
|
},
|
|
3962
4253
|
"glm-4.6": {
|
|
3963
4254
|
maxTokens: 98304,
|
|
3964
4255
|
contextWindow: 204800,
|
|
3965
4256
|
supportsImages: false,
|
|
3966
4257
|
supportsPromptCache: true,
|
|
4258
|
+
supportsReasoningBinary: true,
|
|
3967
4259
|
inputPrice: 0.29,
|
|
3968
4260
|
outputPrice: 1.14,
|
|
3969
4261
|
cacheWritesPrice: 0,
|
|
3970
4262
|
cacheReadsPrice: 0.057,
|
|
3971
|
-
description: "GLM-4.6 is Zhipu's newest model with an extended context window of up to 200k tokens, providing enhanced capabilities for processing longer documents and conversations."
|
|
3972
|
-
tiers: [
|
|
3973
|
-
{
|
|
3974
|
-
contextWindow: 32e3,
|
|
3975
|
-
inputPrice: 0.21,
|
|
3976
|
-
outputPrice: 1,
|
|
3977
|
-
cacheReadsPrice: 0.043
|
|
3978
|
-
},
|
|
3979
|
-
{
|
|
3980
|
-
contextWindow: 128e3,
|
|
3981
|
-
inputPrice: 0.29,
|
|
3982
|
-
outputPrice: 1.14,
|
|
3983
|
-
cacheReadsPrice: 0.057
|
|
3984
|
-
},
|
|
3985
|
-
{
|
|
3986
|
-
contextWindow: 2e5,
|
|
3987
|
-
inputPrice: 0.29,
|
|
3988
|
-
outputPrice: 1.14,
|
|
3989
|
-
cacheReadsPrice: 0.057
|
|
3990
|
-
},
|
|
3991
|
-
{
|
|
3992
|
-
contextWindow: Infinity,
|
|
3993
|
-
inputPrice: 0.29,
|
|
3994
|
-
outputPrice: 1.14,
|
|
3995
|
-
cacheReadsPrice: 0.057
|
|
3996
|
-
}
|
|
3997
|
-
]
|
|
4263
|
+
description: "GLM-4.6 is Zhipu's newest model with an extended context window of up to 200k tokens, providing enhanced capabilities for processing longer documents and conversations."
|
|
3998
4264
|
}
|
|
3999
4265
|
};
|
|
4000
|
-
var ZAI_DEFAULT_TEMPERATURE = 0;
|
|
4266
|
+
var ZAI_DEFAULT_TEMPERATURE = 0.6;
|
|
4001
4267
|
var zaiApiLineConfigs = {
|
|
4002
4268
|
international_coding: {
|
|
4003
|
-
name: "International
|
|
4269
|
+
name: "International",
|
|
4004
4270
|
baseUrl: "https://api.z.ai/api/coding/paas/v4",
|
|
4005
4271
|
isChina: false
|
|
4006
4272
|
},
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4273
|
+
china_coding: {
|
|
4274
|
+
name: "China",
|
|
4275
|
+
baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
|
|
4276
|
+
isChina: true
|
|
4277
|
+
}
|
|
4010
4278
|
};
|
|
4011
4279
|
|
|
4012
4280
|
// src/providers/deepinfra.ts
|
|
@@ -4021,6 +4289,118 @@ var deepInfraDefaultModelInfo = {
|
|
|
4021
4289
|
description: "Qwen 3 Coder 480B A35B Instruct Turbo model, 256K context."
|
|
4022
4290
|
};
|
|
4023
4291
|
|
|
4292
|
+
// src/providers/minimax.ts
|
|
4293
|
+
var minimaxDefaultModelId = "MiniMax-M2";
|
|
4294
|
+
var minimaxModels = {
|
|
4295
|
+
"MiniMax-M2": {
|
|
4296
|
+
maxTokens: 16384,
|
|
4297
|
+
contextWindow: 192e3,
|
|
4298
|
+
supportsImages: false,
|
|
4299
|
+
supportsPromptCache: true,
|
|
4300
|
+
inputPrice: 0.3,
|
|
4301
|
+
outputPrice: 1.2,
|
|
4302
|
+
cacheWritesPrice: 0.375,
|
|
4303
|
+
cacheReadsPrice: 0.03,
|
|
4304
|
+
preserveReasoning: true,
|
|
4305
|
+
description: "MiniMax M2, a model born for Agents and code, featuring Top-tier Coding Capabilities, Powerful Agentic Performance, and Ultimate Cost-Effectiveness & Speed."
|
|
4306
|
+
},
|
|
4307
|
+
"MiniMax-M2-Stable": {
|
|
4308
|
+
maxTokens: 16384,
|
|
4309
|
+
contextWindow: 192e3,
|
|
4310
|
+
supportsImages: false,
|
|
4311
|
+
supportsPromptCache: true,
|
|
4312
|
+
inputPrice: 0.3,
|
|
4313
|
+
outputPrice: 1.2,
|
|
4314
|
+
cacheWritesPrice: 0.375,
|
|
4315
|
+
cacheReadsPrice: 0.03,
|
|
4316
|
+
preserveReasoning: true,
|
|
4317
|
+
description: "MiniMax M2 Stable (High Concurrency, Commercial Use), a model born for Agents and code, featuring Top-tier Coding Capabilities, Powerful Agentic Performance, and Ultimate Cost-Effectiveness & Speed."
|
|
4318
|
+
}
|
|
4319
|
+
};
|
|
4320
|
+
var MINIMAX_DEFAULT_TEMPERATURE = 1;
|
|
4321
|
+
|
|
4322
|
+
// src/providers/index.ts
|
|
4323
|
+
function getProviderDefaultModelId(provider, options = { isChina: false }) {
|
|
4324
|
+
switch (provider) {
|
|
4325
|
+
case "openrouter":
|
|
4326
|
+
return openRouterDefaultModelId;
|
|
4327
|
+
case "requesty":
|
|
4328
|
+
return requestyDefaultModelId;
|
|
4329
|
+
case "glama":
|
|
4330
|
+
return glamaDefaultModelId;
|
|
4331
|
+
case "unbound":
|
|
4332
|
+
return unboundDefaultModelId;
|
|
4333
|
+
case "litellm":
|
|
4334
|
+
return litellmDefaultModelId;
|
|
4335
|
+
case "xai":
|
|
4336
|
+
return xaiDefaultModelId;
|
|
4337
|
+
case "groq":
|
|
4338
|
+
return groqDefaultModelId;
|
|
4339
|
+
case "huggingface":
|
|
4340
|
+
return "meta-llama/Llama-3.3-70B-Instruct";
|
|
4341
|
+
case "chutes":
|
|
4342
|
+
return chutesDefaultModelId;
|
|
4343
|
+
case "bedrock":
|
|
4344
|
+
return bedrockDefaultModelId;
|
|
4345
|
+
case "vertex":
|
|
4346
|
+
return vertexDefaultModelId;
|
|
4347
|
+
case "gemini":
|
|
4348
|
+
return geminiDefaultModelId;
|
|
4349
|
+
case "deepseek":
|
|
4350
|
+
return deepSeekDefaultModelId;
|
|
4351
|
+
case "doubao":
|
|
4352
|
+
return doubaoDefaultModelId;
|
|
4353
|
+
case "moonshot":
|
|
4354
|
+
return moonshotDefaultModelId;
|
|
4355
|
+
case "minimax":
|
|
4356
|
+
return minimaxDefaultModelId;
|
|
4357
|
+
case "zai":
|
|
4358
|
+
return options?.isChina ? mainlandZAiDefaultModelId : internationalZAiDefaultModelId;
|
|
4359
|
+
case "openai-native":
|
|
4360
|
+
return "gpt-4o";
|
|
4361
|
+
// Based on openai-native patterns
|
|
4362
|
+
case "mistral":
|
|
4363
|
+
return mistralDefaultModelId;
|
|
4364
|
+
case "openai":
|
|
4365
|
+
return "";
|
|
4366
|
+
// OpenAI provider uses custom model configuration
|
|
4367
|
+
case "ollama":
|
|
4368
|
+
return "";
|
|
4369
|
+
// Ollama uses dynamic model selection
|
|
4370
|
+
case "lmstudio":
|
|
4371
|
+
return "";
|
|
4372
|
+
// LMStudio uses dynamic model selection
|
|
4373
|
+
case "deepinfra":
|
|
4374
|
+
return deepInfraDefaultModelId;
|
|
4375
|
+
case "vscode-lm":
|
|
4376
|
+
return vscodeLlmDefaultModelId;
|
|
4377
|
+
case "claude-code":
|
|
4378
|
+
return claudeCodeDefaultModelId;
|
|
4379
|
+
case "cerebras":
|
|
4380
|
+
return cerebrasDefaultModelId;
|
|
4381
|
+
case "sambanova":
|
|
4382
|
+
return sambaNovaDefaultModelId;
|
|
4383
|
+
case "fireworks":
|
|
4384
|
+
return fireworksDefaultModelId;
|
|
4385
|
+
case "featherless":
|
|
4386
|
+
return featherlessDefaultModelId;
|
|
4387
|
+
case "io-intelligence":
|
|
4388
|
+
return ioIntelligenceDefaultModelId;
|
|
4389
|
+
case "roo":
|
|
4390
|
+
return rooDefaultModelId;
|
|
4391
|
+
case "qwen-code":
|
|
4392
|
+
return qwenCodeDefaultModelId;
|
|
4393
|
+
case "vercel-ai-gateway":
|
|
4394
|
+
return vercelAiGatewayDefaultModelId;
|
|
4395
|
+
case "anthropic":
|
|
4396
|
+
case "gemini-cli":
|
|
4397
|
+
case "human-relay":
|
|
4398
|
+
case "fake-ai":
|
|
4399
|
+
default:
|
|
4400
|
+
return anthropicDefaultModelId;
|
|
4401
|
+
}
|
|
4402
|
+
}
|
|
4403
|
+
|
|
4024
4404
|
// src/provider-settings.ts
|
|
4025
4405
|
var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
|
|
4026
4406
|
var dynamicProviders = [
|
|
@@ -4032,7 +4412,9 @@ var dynamicProviders = [
|
|
|
4032
4412
|
"io-intelligence",
|
|
4033
4413
|
"requesty",
|
|
4034
4414
|
"unbound",
|
|
4035
|
-
"glama"
|
|
4415
|
+
"glama",
|
|
4416
|
+
"roo",
|
|
4417
|
+
"chutes"
|
|
4036
4418
|
];
|
|
4037
4419
|
var isDynamicProvider = (key) => dynamicProviders.includes(key);
|
|
4038
4420
|
var localProviders = ["ollama", "lmstudio"];
|
|
@@ -4052,7 +4434,6 @@ var providerNames = [
|
|
|
4052
4434
|
"anthropic",
|
|
4053
4435
|
"bedrock",
|
|
4054
4436
|
"cerebras",
|
|
4055
|
-
"chutes",
|
|
4056
4437
|
"claude-code",
|
|
4057
4438
|
"doubao",
|
|
4058
4439
|
"deepseek",
|
|
@@ -4063,6 +4444,7 @@ var providerNames = [
|
|
|
4063
4444
|
"groq",
|
|
4064
4445
|
"mistral",
|
|
4065
4446
|
"moonshot",
|
|
4447
|
+
"minimax",
|
|
4066
4448
|
"openai-native",
|
|
4067
4449
|
"qwen-code",
|
|
4068
4450
|
"roo",
|
|
@@ -4071,260 +4453,269 @@ var providerNames = [
|
|
|
4071
4453
|
"xai",
|
|
4072
4454
|
"zai"
|
|
4073
4455
|
];
|
|
4074
|
-
var providerNamesSchema =
|
|
4456
|
+
var providerNamesSchema = z8.enum(providerNames);
|
|
4075
4457
|
var isProviderName = (key) => typeof key === "string" && providerNames.includes(key);
|
|
4076
|
-
var providerSettingsEntrySchema =
|
|
4077
|
-
id:
|
|
4078
|
-
name:
|
|
4458
|
+
var providerSettingsEntrySchema = z8.object({
|
|
4459
|
+
id: z8.string(),
|
|
4460
|
+
name: z8.string(),
|
|
4079
4461
|
apiProvider: providerNamesSchema.optional(),
|
|
4080
|
-
modelId:
|
|
4462
|
+
modelId: z8.string().optional()
|
|
4081
4463
|
});
|
|
4082
|
-
var baseProviderSettingsSchema =
|
|
4083
|
-
includeMaxTokens:
|
|
4084
|
-
diffEnabled:
|
|
4085
|
-
todoListEnabled:
|
|
4086
|
-
fuzzyMatchThreshold:
|
|
4087
|
-
modelTemperature:
|
|
4088
|
-
rateLimitSeconds:
|
|
4089
|
-
consecutiveMistakeLimit:
|
|
4464
|
+
var baseProviderSettingsSchema = z8.object({
|
|
4465
|
+
includeMaxTokens: z8.boolean().optional(),
|
|
4466
|
+
diffEnabled: z8.boolean().optional(),
|
|
4467
|
+
todoListEnabled: z8.boolean().optional(),
|
|
4468
|
+
fuzzyMatchThreshold: z8.number().optional(),
|
|
4469
|
+
modelTemperature: z8.number().nullish(),
|
|
4470
|
+
rateLimitSeconds: z8.number().optional(),
|
|
4471
|
+
consecutiveMistakeLimit: z8.number().min(0).optional(),
|
|
4090
4472
|
// Model reasoning.
|
|
4091
|
-
enableReasoningEffort:
|
|
4092
|
-
reasoningEffort:
|
|
4093
|
-
modelMaxTokens:
|
|
4094
|
-
modelMaxThinkingTokens:
|
|
4473
|
+
enableReasoningEffort: z8.boolean().optional(),
|
|
4474
|
+
reasoningEffort: reasoningEffortSettingSchema.optional(),
|
|
4475
|
+
modelMaxTokens: z8.number().optional(),
|
|
4476
|
+
modelMaxThinkingTokens: z8.number().optional(),
|
|
4095
4477
|
// Model verbosity.
|
|
4096
|
-
verbosity: verbosityLevelsSchema.optional()
|
|
4478
|
+
verbosity: verbosityLevelsSchema.optional(),
|
|
4479
|
+
// Tool protocol override for this profile.
|
|
4480
|
+
toolProtocol: z8.enum(["xml", "native"]).optional()
|
|
4097
4481
|
});
|
|
4098
4482
|
var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
|
|
4099
|
-
apiModelId:
|
|
4483
|
+
apiModelId: z8.string().optional()
|
|
4100
4484
|
});
|
|
4101
4485
|
var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
4102
|
-
apiKey:
|
|
4103
|
-
anthropicBaseUrl:
|
|
4104
|
-
anthropicUseAuthToken:
|
|
4105
|
-
anthropicBeta1MContext:
|
|
4486
|
+
apiKey: z8.string().optional(),
|
|
4487
|
+
anthropicBaseUrl: z8.string().optional(),
|
|
4488
|
+
anthropicUseAuthToken: z8.boolean().optional(),
|
|
4489
|
+
anthropicBeta1MContext: z8.boolean().optional()
|
|
4106
4490
|
// Enable 'context-1m-2025-08-07' beta for 1M context window.
|
|
4107
4491
|
});
|
|
4108
4492
|
var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
4109
|
-
claudeCodePath:
|
|
4110
|
-
claudeCodeMaxOutputTokens:
|
|
4493
|
+
claudeCodePath: z8.string().optional(),
|
|
4494
|
+
claudeCodeMaxOutputTokens: z8.number().int().min(1).max(2e5).optional()
|
|
4111
4495
|
});
|
|
4112
4496
|
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
4113
|
-
glamaModelId:
|
|
4114
|
-
glamaApiKey:
|
|
4497
|
+
glamaModelId: z8.string().optional(),
|
|
4498
|
+
glamaApiKey: z8.string().optional()
|
|
4115
4499
|
});
|
|
4116
4500
|
var openRouterSchema = baseProviderSettingsSchema.extend({
|
|
4117
|
-
openRouterApiKey:
|
|
4118
|
-
openRouterModelId:
|
|
4119
|
-
openRouterBaseUrl:
|
|
4120
|
-
openRouterSpecificProvider:
|
|
4121
|
-
openRouterUseMiddleOutTransform:
|
|
4501
|
+
openRouterApiKey: z8.string().optional(),
|
|
4502
|
+
openRouterModelId: z8.string().optional(),
|
|
4503
|
+
openRouterBaseUrl: z8.string().optional(),
|
|
4504
|
+
openRouterSpecificProvider: z8.string().optional(),
|
|
4505
|
+
openRouterUseMiddleOutTransform: z8.boolean().optional()
|
|
4122
4506
|
});
|
|
4123
4507
|
var bedrockSchema = apiModelIdProviderModelSchema.extend({
|
|
4124
|
-
awsAccessKey:
|
|
4125
|
-
awsSecretKey:
|
|
4126
|
-
awsSessionToken:
|
|
4127
|
-
awsRegion:
|
|
4128
|
-
awsUseCrossRegionInference:
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4508
|
+
awsAccessKey: z8.string().optional(),
|
|
4509
|
+
awsSecretKey: z8.string().optional(),
|
|
4510
|
+
awsSessionToken: z8.string().optional(),
|
|
4511
|
+
awsRegion: z8.string().optional(),
|
|
4512
|
+
awsUseCrossRegionInference: z8.boolean().optional(),
|
|
4513
|
+
awsUseGlobalInference: z8.boolean().optional(),
|
|
4514
|
+
// Enable Global Inference profile routing when supported
|
|
4515
|
+
awsUsePromptCache: z8.boolean().optional(),
|
|
4516
|
+
awsProfile: z8.string().optional(),
|
|
4517
|
+
awsUseProfile: z8.boolean().optional(),
|
|
4518
|
+
awsApiKey: z8.string().optional(),
|
|
4519
|
+
awsUseApiKey: z8.boolean().optional(),
|
|
4520
|
+
awsCustomArn: z8.string().optional(),
|
|
4521
|
+
awsModelContextWindow: z8.number().optional(),
|
|
4522
|
+
awsBedrockEndpointEnabled: z8.boolean().optional(),
|
|
4523
|
+
awsBedrockEndpoint: z8.string().optional(),
|
|
4524
|
+
awsBedrock1MContext: z8.boolean().optional()
|
|
4139
4525
|
// Enable 'context-1m-2025-08-07' beta for 1M context window.
|
|
4140
4526
|
});
|
|
4141
4527
|
var vertexSchema = apiModelIdProviderModelSchema.extend({
|
|
4142
|
-
vertexKeyFile:
|
|
4143
|
-
vertexJsonCredentials:
|
|
4144
|
-
vertexProjectId:
|
|
4145
|
-
vertexRegion:
|
|
4146
|
-
enableUrlContext:
|
|
4147
|
-
enableGrounding:
|
|
4528
|
+
vertexKeyFile: z8.string().optional(),
|
|
4529
|
+
vertexJsonCredentials: z8.string().optional(),
|
|
4530
|
+
vertexProjectId: z8.string().optional(),
|
|
4531
|
+
vertexRegion: z8.string().optional(),
|
|
4532
|
+
enableUrlContext: z8.boolean().optional(),
|
|
4533
|
+
enableGrounding: z8.boolean().optional()
|
|
4148
4534
|
});
|
|
4149
4535
|
var openAiSchema = baseProviderSettingsSchema.extend({
|
|
4150
|
-
openAiBaseUrl:
|
|
4151
|
-
openAiApiKey:
|
|
4152
|
-
openAiLegacyFormat:
|
|
4153
|
-
openAiR1FormatEnabled:
|
|
4154
|
-
openAiModelId:
|
|
4536
|
+
openAiBaseUrl: z8.string().optional(),
|
|
4537
|
+
openAiApiKey: z8.string().optional(),
|
|
4538
|
+
openAiLegacyFormat: z8.boolean().optional(),
|
|
4539
|
+
openAiR1FormatEnabled: z8.boolean().optional(),
|
|
4540
|
+
openAiModelId: z8.string().optional(),
|
|
4155
4541
|
openAiCustomModelInfo: modelInfoSchema.nullish(),
|
|
4156
|
-
openAiUseAzure:
|
|
4157
|
-
azureApiVersion:
|
|
4158
|
-
openAiStreamingEnabled:
|
|
4159
|
-
openAiHostHeader:
|
|
4542
|
+
openAiUseAzure: z8.boolean().optional(),
|
|
4543
|
+
azureApiVersion: z8.string().optional(),
|
|
4544
|
+
openAiStreamingEnabled: z8.boolean().optional(),
|
|
4545
|
+
openAiHostHeader: z8.string().optional(),
|
|
4160
4546
|
// Keep temporarily for backward compatibility during migration.
|
|
4161
|
-
openAiHeaders:
|
|
4547
|
+
openAiHeaders: z8.record(z8.string(), z8.string()).optional()
|
|
4162
4548
|
});
|
|
4163
4549
|
var ollamaSchema = baseProviderSettingsSchema.extend({
|
|
4164
|
-
ollamaModelId:
|
|
4165
|
-
ollamaBaseUrl:
|
|
4166
|
-
ollamaApiKey:
|
|
4167
|
-
ollamaNumCtx:
|
|
4550
|
+
ollamaModelId: z8.string().optional(),
|
|
4551
|
+
ollamaBaseUrl: z8.string().optional(),
|
|
4552
|
+
ollamaApiKey: z8.string().optional(),
|
|
4553
|
+
ollamaNumCtx: z8.number().int().min(128).optional()
|
|
4168
4554
|
});
|
|
4169
4555
|
var vsCodeLmSchema = baseProviderSettingsSchema.extend({
|
|
4170
|
-
vsCodeLmModelSelector:
|
|
4171
|
-
vendor:
|
|
4172
|
-
family:
|
|
4173
|
-
version:
|
|
4174
|
-
id:
|
|
4556
|
+
vsCodeLmModelSelector: z8.object({
|
|
4557
|
+
vendor: z8.string().optional(),
|
|
4558
|
+
family: z8.string().optional(),
|
|
4559
|
+
version: z8.string().optional(),
|
|
4560
|
+
id: z8.string().optional()
|
|
4175
4561
|
}).optional()
|
|
4176
4562
|
});
|
|
4177
4563
|
var lmStudioSchema = baseProviderSettingsSchema.extend({
|
|
4178
|
-
lmStudioModelId:
|
|
4179
|
-
lmStudioBaseUrl:
|
|
4180
|
-
lmStudioDraftModelId:
|
|
4181
|
-
lmStudioSpeculativeDecodingEnabled:
|
|
4564
|
+
lmStudioModelId: z8.string().optional(),
|
|
4565
|
+
lmStudioBaseUrl: z8.string().optional(),
|
|
4566
|
+
lmStudioDraftModelId: z8.string().optional(),
|
|
4567
|
+
lmStudioSpeculativeDecodingEnabled: z8.boolean().optional()
|
|
4182
4568
|
});
|
|
4183
4569
|
var geminiSchema = apiModelIdProviderModelSchema.extend({
|
|
4184
|
-
geminiApiKey:
|
|
4185
|
-
googleGeminiBaseUrl:
|
|
4186
|
-
enableUrlContext:
|
|
4187
|
-
enableGrounding:
|
|
4570
|
+
geminiApiKey: z8.string().optional(),
|
|
4571
|
+
googleGeminiBaseUrl: z8.string().optional(),
|
|
4572
|
+
enableUrlContext: z8.boolean().optional(),
|
|
4573
|
+
enableGrounding: z8.boolean().optional()
|
|
4188
4574
|
});
|
|
4189
4575
|
var geminiCliSchema = apiModelIdProviderModelSchema.extend({
|
|
4190
|
-
geminiCliOAuthPath:
|
|
4191
|
-
geminiCliProjectId:
|
|
4576
|
+
geminiCliOAuthPath: z8.string().optional(),
|
|
4577
|
+
geminiCliProjectId: z8.string().optional()
|
|
4192
4578
|
});
|
|
4193
4579
|
var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
|
|
4194
|
-
openAiNativeApiKey:
|
|
4195
|
-
openAiNativeBaseUrl:
|
|
4580
|
+
openAiNativeApiKey: z8.string().optional(),
|
|
4581
|
+
openAiNativeBaseUrl: z8.string().optional(),
|
|
4196
4582
|
// OpenAI Responses API service tier for openai-native provider only.
|
|
4197
4583
|
// UI should only expose this when the selected model supports flex/priority.
|
|
4198
4584
|
openAiNativeServiceTier: serviceTierSchema.optional()
|
|
4199
4585
|
});
|
|
4200
4586
|
var mistralSchema = apiModelIdProviderModelSchema.extend({
|
|
4201
|
-
mistralApiKey:
|
|
4202
|
-
mistralCodestralUrl:
|
|
4587
|
+
mistralApiKey: z8.string().optional(),
|
|
4588
|
+
mistralCodestralUrl: z8.string().optional()
|
|
4203
4589
|
});
|
|
4204
4590
|
var deepSeekSchema = apiModelIdProviderModelSchema.extend({
|
|
4205
|
-
deepSeekBaseUrl:
|
|
4206
|
-
deepSeekApiKey:
|
|
4591
|
+
deepSeekBaseUrl: z8.string().optional(),
|
|
4592
|
+
deepSeekApiKey: z8.string().optional()
|
|
4207
4593
|
});
|
|
4208
4594
|
var deepInfraSchema = apiModelIdProviderModelSchema.extend({
|
|
4209
|
-
deepInfraBaseUrl:
|
|
4210
|
-
deepInfraApiKey:
|
|
4211
|
-
deepInfraModelId:
|
|
4595
|
+
deepInfraBaseUrl: z8.string().optional(),
|
|
4596
|
+
deepInfraApiKey: z8.string().optional(),
|
|
4597
|
+
deepInfraModelId: z8.string().optional()
|
|
4212
4598
|
});
|
|
4213
4599
|
var doubaoSchema = apiModelIdProviderModelSchema.extend({
|
|
4214
|
-
doubaoBaseUrl:
|
|
4215
|
-
doubaoApiKey:
|
|
4600
|
+
doubaoBaseUrl: z8.string().optional(),
|
|
4601
|
+
doubaoApiKey: z8.string().optional()
|
|
4216
4602
|
});
|
|
4217
4603
|
var moonshotSchema = apiModelIdProviderModelSchema.extend({
|
|
4218
|
-
moonshotBaseUrl:
|
|
4219
|
-
moonshotApiKey:
|
|
4604
|
+
moonshotBaseUrl: z8.union([z8.literal("https://api.moonshot.ai/v1"), z8.literal("https://api.moonshot.cn/v1")]).optional(),
|
|
4605
|
+
moonshotApiKey: z8.string().optional()
|
|
4606
|
+
});
|
|
4607
|
+
var minimaxSchema = apiModelIdProviderModelSchema.extend({
|
|
4608
|
+
minimaxBaseUrl: z8.union([z8.literal("https://api.minimax.io/v1"), z8.literal("https://api.minimaxi.com/v1")]).optional(),
|
|
4609
|
+
minimaxApiKey: z8.string().optional()
|
|
4220
4610
|
});
|
|
4221
4611
|
var unboundSchema = baseProviderSettingsSchema.extend({
|
|
4222
|
-
unboundApiKey:
|
|
4223
|
-
unboundModelId:
|
|
4612
|
+
unboundApiKey: z8.string().optional(),
|
|
4613
|
+
unboundModelId: z8.string().optional()
|
|
4224
4614
|
});
|
|
4225
4615
|
var requestySchema = baseProviderSettingsSchema.extend({
|
|
4226
|
-
requestyBaseUrl:
|
|
4227
|
-
requestyApiKey:
|
|
4228
|
-
requestyModelId:
|
|
4616
|
+
requestyBaseUrl: z8.string().optional(),
|
|
4617
|
+
requestyApiKey: z8.string().optional(),
|
|
4618
|
+
requestyModelId: z8.string().optional()
|
|
4229
4619
|
});
|
|
4230
4620
|
var humanRelaySchema = baseProviderSettingsSchema;
|
|
4231
4621
|
var fakeAiSchema = baseProviderSettingsSchema.extend({
|
|
4232
|
-
fakeAi:
|
|
4622
|
+
fakeAi: z8.unknown().optional()
|
|
4233
4623
|
});
|
|
4234
4624
|
var xaiSchema = apiModelIdProviderModelSchema.extend({
|
|
4235
|
-
xaiApiKey:
|
|
4625
|
+
xaiApiKey: z8.string().optional()
|
|
4236
4626
|
});
|
|
4237
4627
|
var groqSchema = apiModelIdProviderModelSchema.extend({
|
|
4238
|
-
groqApiKey:
|
|
4628
|
+
groqApiKey: z8.string().optional()
|
|
4239
4629
|
});
|
|
4240
4630
|
var huggingFaceSchema = baseProviderSettingsSchema.extend({
|
|
4241
|
-
huggingFaceApiKey:
|
|
4242
|
-
huggingFaceModelId:
|
|
4243
|
-
huggingFaceInferenceProvider:
|
|
4631
|
+
huggingFaceApiKey: z8.string().optional(),
|
|
4632
|
+
huggingFaceModelId: z8.string().optional(),
|
|
4633
|
+
huggingFaceInferenceProvider: z8.string().optional()
|
|
4244
4634
|
});
|
|
4245
4635
|
var chutesSchema = apiModelIdProviderModelSchema.extend({
|
|
4246
|
-
chutesApiKey:
|
|
4636
|
+
chutesApiKey: z8.string().optional()
|
|
4247
4637
|
});
|
|
4248
4638
|
var litellmSchema = baseProviderSettingsSchema.extend({
|
|
4249
|
-
litellmBaseUrl:
|
|
4250
|
-
litellmApiKey:
|
|
4251
|
-
litellmModelId:
|
|
4252
|
-
litellmUsePromptCache:
|
|
4639
|
+
litellmBaseUrl: z8.string().optional(),
|
|
4640
|
+
litellmApiKey: z8.string().optional(),
|
|
4641
|
+
litellmModelId: z8.string().optional(),
|
|
4642
|
+
litellmUsePromptCache: z8.boolean().optional()
|
|
4253
4643
|
});
|
|
4254
4644
|
var cerebrasSchema = apiModelIdProviderModelSchema.extend({
|
|
4255
|
-
cerebrasApiKey:
|
|
4645
|
+
cerebrasApiKey: z8.string().optional()
|
|
4256
4646
|
});
|
|
4257
4647
|
var sambaNovaSchema = apiModelIdProviderModelSchema.extend({
|
|
4258
|
-
sambaNovaApiKey:
|
|
4648
|
+
sambaNovaApiKey: z8.string().optional()
|
|
4259
4649
|
});
|
|
4260
|
-
var zaiApiLineSchema =
|
|
4650
|
+
var zaiApiLineSchema = z8.enum(["international_coding", "china_coding"]);
|
|
4261
4651
|
var zaiSchema = apiModelIdProviderModelSchema.extend({
|
|
4262
|
-
zaiApiKey:
|
|
4652
|
+
zaiApiKey: z8.string().optional(),
|
|
4263
4653
|
zaiApiLine: zaiApiLineSchema.optional()
|
|
4264
4654
|
});
|
|
4265
4655
|
var fireworksSchema = apiModelIdProviderModelSchema.extend({
|
|
4266
|
-
fireworksApiKey:
|
|
4656
|
+
fireworksApiKey: z8.string().optional()
|
|
4267
4657
|
});
|
|
4268
4658
|
var featherlessSchema = apiModelIdProviderModelSchema.extend({
|
|
4269
|
-
featherlessApiKey:
|
|
4659
|
+
featherlessApiKey: z8.string().optional()
|
|
4270
4660
|
});
|
|
4271
4661
|
var ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
|
|
4272
|
-
ioIntelligenceModelId:
|
|
4273
|
-
ioIntelligenceApiKey:
|
|
4662
|
+
ioIntelligenceModelId: z8.string().optional(),
|
|
4663
|
+
ioIntelligenceApiKey: z8.string().optional()
|
|
4274
4664
|
});
|
|
4275
4665
|
var qwenCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
4276
|
-
qwenCodeOauthPath:
|
|
4666
|
+
qwenCodeOauthPath: z8.string().optional()
|
|
4277
4667
|
});
|
|
4278
4668
|
var rooSchema = apiModelIdProviderModelSchema.extend({
|
|
4279
4669
|
// No additional fields needed - uses cloud authentication.
|
|
4280
4670
|
});
|
|
4281
4671
|
var vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
|
|
4282
|
-
vercelAiGatewayApiKey:
|
|
4283
|
-
vercelAiGatewayModelId:
|
|
4672
|
+
vercelAiGatewayApiKey: z8.string().optional(),
|
|
4673
|
+
vercelAiGatewayModelId: z8.string().optional()
|
|
4284
4674
|
});
|
|
4285
|
-
var defaultSchema =
|
|
4286
|
-
apiProvider:
|
|
4675
|
+
var defaultSchema = z8.object({
|
|
4676
|
+
apiProvider: z8.undefined()
|
|
4287
4677
|
});
|
|
4288
|
-
var providerSettingsSchemaDiscriminated =
|
|
4289
|
-
anthropicSchema.merge(
|
|
4290
|
-
claudeCodeSchema.merge(
|
|
4291
|
-
glamaSchema.merge(
|
|
4292
|
-
openRouterSchema.merge(
|
|
4293
|
-
bedrockSchema.merge(
|
|
4294
|
-
vertexSchema.merge(
|
|
4295
|
-
openAiSchema.merge(
|
|
4296
|
-
ollamaSchema.merge(
|
|
4297
|
-
vsCodeLmSchema.merge(
|
|
4298
|
-
lmStudioSchema.merge(
|
|
4299
|
-
geminiSchema.merge(
|
|
4300
|
-
geminiCliSchema.merge(
|
|
4301
|
-
openAiNativeSchema.merge(
|
|
4302
|
-
mistralSchema.merge(
|
|
4303
|
-
deepSeekSchema.merge(
|
|
4304
|
-
deepInfraSchema.merge(
|
|
4305
|
-
doubaoSchema.merge(
|
|
4306
|
-
moonshotSchema.merge(
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4678
|
+
var providerSettingsSchemaDiscriminated = z8.discriminatedUnion("apiProvider", [
|
|
4679
|
+
anthropicSchema.merge(z8.object({ apiProvider: z8.literal("anthropic") })),
|
|
4680
|
+
claudeCodeSchema.merge(z8.object({ apiProvider: z8.literal("claude-code") })),
|
|
4681
|
+
glamaSchema.merge(z8.object({ apiProvider: z8.literal("glama") })),
|
|
4682
|
+
openRouterSchema.merge(z8.object({ apiProvider: z8.literal("openrouter") })),
|
|
4683
|
+
bedrockSchema.merge(z8.object({ apiProvider: z8.literal("bedrock") })),
|
|
4684
|
+
vertexSchema.merge(z8.object({ apiProvider: z8.literal("vertex") })),
|
|
4685
|
+
openAiSchema.merge(z8.object({ apiProvider: z8.literal("openai") })),
|
|
4686
|
+
ollamaSchema.merge(z8.object({ apiProvider: z8.literal("ollama") })),
|
|
4687
|
+
vsCodeLmSchema.merge(z8.object({ apiProvider: z8.literal("vscode-lm") })),
|
|
4688
|
+
lmStudioSchema.merge(z8.object({ apiProvider: z8.literal("lmstudio") })),
|
|
4689
|
+
geminiSchema.merge(z8.object({ apiProvider: z8.literal("gemini") })),
|
|
4690
|
+
geminiCliSchema.merge(z8.object({ apiProvider: z8.literal("gemini-cli") })),
|
|
4691
|
+
openAiNativeSchema.merge(z8.object({ apiProvider: z8.literal("openai-native") })),
|
|
4692
|
+
mistralSchema.merge(z8.object({ apiProvider: z8.literal("mistral") })),
|
|
4693
|
+
deepSeekSchema.merge(z8.object({ apiProvider: z8.literal("deepseek") })),
|
|
4694
|
+
deepInfraSchema.merge(z8.object({ apiProvider: z8.literal("deepinfra") })),
|
|
4695
|
+
doubaoSchema.merge(z8.object({ apiProvider: z8.literal("doubao") })),
|
|
4696
|
+
moonshotSchema.merge(z8.object({ apiProvider: z8.literal("moonshot") })),
|
|
4697
|
+
minimaxSchema.merge(z8.object({ apiProvider: z8.literal("minimax") })),
|
|
4698
|
+
unboundSchema.merge(z8.object({ apiProvider: z8.literal("unbound") })),
|
|
4699
|
+
requestySchema.merge(z8.object({ apiProvider: z8.literal("requesty") })),
|
|
4700
|
+
humanRelaySchema.merge(z8.object({ apiProvider: z8.literal("human-relay") })),
|
|
4701
|
+
fakeAiSchema.merge(z8.object({ apiProvider: z8.literal("fake-ai") })),
|
|
4702
|
+
xaiSchema.merge(z8.object({ apiProvider: z8.literal("xai") })),
|
|
4703
|
+
groqSchema.merge(z8.object({ apiProvider: z8.literal("groq") })),
|
|
4704
|
+
huggingFaceSchema.merge(z8.object({ apiProvider: z8.literal("huggingface") })),
|
|
4705
|
+
chutesSchema.merge(z8.object({ apiProvider: z8.literal("chutes") })),
|
|
4706
|
+
litellmSchema.merge(z8.object({ apiProvider: z8.literal("litellm") })),
|
|
4707
|
+
cerebrasSchema.merge(z8.object({ apiProvider: z8.literal("cerebras") })),
|
|
4708
|
+
sambaNovaSchema.merge(z8.object({ apiProvider: z8.literal("sambanova") })),
|
|
4709
|
+
zaiSchema.merge(z8.object({ apiProvider: z8.literal("zai") })),
|
|
4710
|
+
fireworksSchema.merge(z8.object({ apiProvider: z8.literal("fireworks") })),
|
|
4711
|
+
featherlessSchema.merge(z8.object({ apiProvider: z8.literal("featherless") })),
|
|
4712
|
+
ioIntelligenceSchema.merge(z8.object({ apiProvider: z8.literal("io-intelligence") })),
|
|
4713
|
+
qwenCodeSchema.merge(z8.object({ apiProvider: z8.literal("qwen-code") })),
|
|
4714
|
+
rooSchema.merge(z8.object({ apiProvider: z8.literal("roo") })),
|
|
4715
|
+
vercelAiGatewaySchema.merge(z8.object({ apiProvider: z8.literal("vercel-ai-gateway") })),
|
|
4325
4716
|
defaultSchema
|
|
4326
4717
|
]);
|
|
4327
|
-
var providerSettingsSchema =
|
|
4718
|
+
var providerSettingsSchema = z8.object({
|
|
4328
4719
|
apiProvider: providerNamesSchema.optional(),
|
|
4329
4720
|
...anthropicSchema.shape,
|
|
4330
4721
|
...claudeCodeSchema.shape,
|
|
@@ -4344,6 +4735,7 @@ var providerSettingsSchema = z7.object({
|
|
|
4344
4735
|
...deepInfraSchema.shape,
|
|
4345
4736
|
...doubaoSchema.shape,
|
|
4346
4737
|
...moonshotSchema.shape,
|
|
4738
|
+
...minimaxSchema.shape,
|
|
4347
4739
|
...unboundSchema.shape,
|
|
4348
4740
|
...requestySchema.shape,
|
|
4349
4741
|
...humanRelaySchema.shape,
|
|
@@ -4364,9 +4756,9 @@ var providerSettingsSchema = z7.object({
|
|
|
4364
4756
|
...vercelAiGatewaySchema.shape,
|
|
4365
4757
|
...codebaseIndexProviderSchema.shape
|
|
4366
4758
|
});
|
|
4367
|
-
var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id:
|
|
4759
|
+
var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z8.string().optional() });
|
|
4368
4760
|
var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscriminated.and(
|
|
4369
|
-
|
|
4761
|
+
z8.object({ id: z8.string().optional() })
|
|
4370
4762
|
);
|
|
4371
4763
|
var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
|
|
4372
4764
|
var modelIdKeys = [
|
|
@@ -4404,6 +4796,7 @@ var modelIdKeysByProvider = {
|
|
|
4404
4796
|
"gemini-cli": "apiModelId",
|
|
4405
4797
|
mistral: "apiModelId",
|
|
4406
4798
|
moonshot: "apiModelId",
|
|
4799
|
+
minimax: "apiModelId",
|
|
4407
4800
|
deepseek: "apiModelId",
|
|
4408
4801
|
deepinfra: "deepInfraModelId",
|
|
4409
4802
|
doubao: "apiModelId",
|
|
@@ -4432,7 +4825,7 @@ var getApiProtocol = (provider, modelId) => {
|
|
|
4432
4825
|
if (provider && provider === "vertex" && modelId && modelId.toLowerCase().includes("claude")) {
|
|
4433
4826
|
return "anthropic";
|
|
4434
4827
|
}
|
|
4435
|
-
if (provider &&
|
|
4828
|
+
if (provider && ["vercel-ai-gateway", "roo"].includes(provider) && modelId && modelId.toLowerCase().startsWith("anthropic/")) {
|
|
4436
4829
|
return "anthropic";
|
|
4437
4830
|
}
|
|
4438
4831
|
return "openai";
|
|
@@ -4453,11 +4846,6 @@ var MODELS_BY_PROVIDER = {
|
|
|
4453
4846
|
label: "Cerebras",
|
|
4454
4847
|
models: Object.keys(cerebrasModels)
|
|
4455
4848
|
},
|
|
4456
|
-
chutes: {
|
|
4457
|
-
id: "chutes",
|
|
4458
|
-
label: "Chutes AI",
|
|
4459
|
-
models: Object.keys(chutesModels)
|
|
4460
|
-
},
|
|
4461
4849
|
"claude-code": { id: "claude-code", label: "Claude Code", models: Object.keys(claudeCodeModels) },
|
|
4462
4850
|
deepseek: {
|
|
4463
4851
|
id: "deepseek",
|
|
@@ -4496,13 +4884,18 @@ var MODELS_BY_PROVIDER = {
|
|
|
4496
4884
|
label: "Moonshot",
|
|
4497
4885
|
models: Object.keys(moonshotModels)
|
|
4498
4886
|
},
|
|
4887
|
+
minimax: {
|
|
4888
|
+
id: "minimax",
|
|
4889
|
+
label: "MiniMax",
|
|
4890
|
+
models: Object.keys(minimaxModels)
|
|
4891
|
+
},
|
|
4499
4892
|
"openai-native": {
|
|
4500
4893
|
id: "openai-native",
|
|
4501
4894
|
label: "OpenAI",
|
|
4502
4895
|
models: Object.keys(openAiNativeModels)
|
|
4503
4896
|
},
|
|
4504
4897
|
"qwen-code": { id: "qwen-code", label: "Qwen Code", models: Object.keys(qwenCodeModels) },
|
|
4505
|
-
roo: { id: "roo", label: "Roo", models:
|
|
4898
|
+
roo: { id: "roo", label: "Roo Code Cloud", models: [] },
|
|
4506
4899
|
sambanova: {
|
|
4507
4900
|
id: "sambanova",
|
|
4508
4901
|
label: "SambaNova",
|
|
@@ -4529,52 +4922,55 @@ var MODELS_BY_PROVIDER = {
|
|
|
4529
4922
|
unbound: { id: "unbound", label: "Unbound", models: [] },
|
|
4530
4923
|
deepinfra: { id: "deepinfra", label: "DeepInfra", models: [] },
|
|
4531
4924
|
"vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] },
|
|
4925
|
+
chutes: { id: "chutes", label: "Chutes AI", models: [] },
|
|
4532
4926
|
// Local providers; models discovered from localhost endpoints.
|
|
4533
4927
|
lmstudio: { id: "lmstudio", label: "LM Studio", models: [] },
|
|
4534
4928
|
ollama: { id: "ollama", label: "Ollama", models: [] }
|
|
4535
4929
|
};
|
|
4536
4930
|
|
|
4537
4931
|
// src/history.ts
|
|
4538
|
-
import { z as
|
|
4539
|
-
var historyItemSchema =
|
|
4540
|
-
id:
|
|
4541
|
-
rootTaskId:
|
|
4542
|
-
parentTaskId:
|
|
4543
|
-
number:
|
|
4544
|
-
ts:
|
|
4545
|
-
task:
|
|
4546
|
-
tokensIn:
|
|
4547
|
-
tokensOut:
|
|
4548
|
-
cacheWrites:
|
|
4549
|
-
cacheReads:
|
|
4550
|
-
totalCost:
|
|
4551
|
-
size:
|
|
4552
|
-
workspace:
|
|
4553
|
-
mode:
|
|
4932
|
+
import { z as z9 } from "zod";
|
|
4933
|
+
var historyItemSchema = z9.object({
|
|
4934
|
+
id: z9.string(),
|
|
4935
|
+
rootTaskId: z9.string().optional(),
|
|
4936
|
+
parentTaskId: z9.string().optional(),
|
|
4937
|
+
number: z9.number(),
|
|
4938
|
+
ts: z9.number(),
|
|
4939
|
+
task: z9.string(),
|
|
4940
|
+
tokensIn: z9.number(),
|
|
4941
|
+
tokensOut: z9.number(),
|
|
4942
|
+
cacheWrites: z9.number().optional(),
|
|
4943
|
+
cacheReads: z9.number().optional(),
|
|
4944
|
+
totalCost: z9.number(),
|
|
4945
|
+
size: z9.number().optional(),
|
|
4946
|
+
workspace: z9.string().optional(),
|
|
4947
|
+
mode: z9.string().optional()
|
|
4554
4948
|
});
|
|
4555
4949
|
|
|
4556
4950
|
// src/experiment.ts
|
|
4557
|
-
import { z as
|
|
4951
|
+
import { z as z10 } from "zod";
|
|
4558
4952
|
var experimentIds = [
|
|
4559
4953
|
"powerSteering",
|
|
4560
4954
|
"multiFileApplyDiff",
|
|
4561
4955
|
"preventFocusDisruption",
|
|
4562
4956
|
"imageGeneration",
|
|
4563
|
-
"runSlashCommand"
|
|
4957
|
+
"runSlashCommand",
|
|
4958
|
+
"nativeToolCalling"
|
|
4564
4959
|
];
|
|
4565
|
-
var experimentIdsSchema =
|
|
4566
|
-
var experimentsSchema =
|
|
4567
|
-
powerSteering:
|
|
4568
|
-
multiFileApplyDiff:
|
|
4569
|
-
preventFocusDisruption:
|
|
4570
|
-
imageGeneration:
|
|
4571
|
-
runSlashCommand:
|
|
4960
|
+
var experimentIdsSchema = z10.enum(experimentIds);
|
|
4961
|
+
var experimentsSchema = z10.object({
|
|
4962
|
+
powerSteering: z10.boolean().optional(),
|
|
4963
|
+
multiFileApplyDiff: z10.boolean().optional(),
|
|
4964
|
+
preventFocusDisruption: z10.boolean().optional(),
|
|
4965
|
+
imageGeneration: z10.boolean().optional(),
|
|
4966
|
+
runSlashCommand: z10.boolean().optional(),
|
|
4967
|
+
nativeToolCalling: z10.boolean().optional()
|
|
4572
4968
|
});
|
|
4573
4969
|
|
|
4574
4970
|
// src/telemetry.ts
|
|
4575
|
-
import { z as
|
|
4971
|
+
import { z as z11 } from "zod";
|
|
4576
4972
|
var telemetrySettings = ["unset", "enabled", "disabled"];
|
|
4577
|
-
var telemetrySettingsSchema =
|
|
4973
|
+
var telemetrySettingsSchema = z11.enum(telemetrySettings);
|
|
4578
4974
|
var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
4579
4975
|
TelemetryEventName2["TASK_CREATED"] = "Task Created";
|
|
4580
4976
|
TelemetryEventName2["TASK_RESTARTED"] = "Task Reopened";
|
|
@@ -4620,53 +5016,53 @@ var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
|
4620
5016
|
TelemetryEventName2["TELEMETRY_SETTINGS_CHANGED"] = "Telemetry Settings Changed";
|
|
4621
5017
|
return TelemetryEventName2;
|
|
4622
5018
|
})(TelemetryEventName || {});
|
|
4623
|
-
var staticAppPropertiesSchema =
|
|
4624
|
-
appName:
|
|
4625
|
-
appVersion:
|
|
4626
|
-
vscodeVersion:
|
|
4627
|
-
platform:
|
|
4628
|
-
editorName:
|
|
4629
|
-
hostname:
|
|
5019
|
+
var staticAppPropertiesSchema = z11.object({
|
|
5020
|
+
appName: z11.string(),
|
|
5021
|
+
appVersion: z11.string(),
|
|
5022
|
+
vscodeVersion: z11.string(),
|
|
5023
|
+
platform: z11.string(),
|
|
5024
|
+
editorName: z11.string(),
|
|
5025
|
+
hostname: z11.string().optional()
|
|
4630
5026
|
});
|
|
4631
|
-
var dynamicAppPropertiesSchema =
|
|
4632
|
-
language:
|
|
4633
|
-
mode:
|
|
5027
|
+
var dynamicAppPropertiesSchema = z11.object({
|
|
5028
|
+
language: z11.string(),
|
|
5029
|
+
mode: z11.string()
|
|
4634
5030
|
});
|
|
4635
|
-
var cloudAppPropertiesSchema =
|
|
4636
|
-
cloudIsAuthenticated:
|
|
5031
|
+
var cloudAppPropertiesSchema = z11.object({
|
|
5032
|
+
cloudIsAuthenticated: z11.boolean().optional()
|
|
4637
5033
|
});
|
|
4638
|
-
var appPropertiesSchema =
|
|
5034
|
+
var appPropertiesSchema = z11.object({
|
|
4639
5035
|
...staticAppPropertiesSchema.shape,
|
|
4640
5036
|
...dynamicAppPropertiesSchema.shape,
|
|
4641
5037
|
...cloudAppPropertiesSchema.shape
|
|
4642
5038
|
});
|
|
4643
|
-
var taskPropertiesSchema =
|
|
4644
|
-
taskId:
|
|
4645
|
-
parentTaskId:
|
|
4646
|
-
apiProvider:
|
|
4647
|
-
modelId:
|
|
4648
|
-
diffStrategy:
|
|
4649
|
-
isSubtask:
|
|
4650
|
-
todos:
|
|
4651
|
-
total:
|
|
4652
|
-
completed:
|
|
4653
|
-
inProgress:
|
|
4654
|
-
pending:
|
|
5039
|
+
var taskPropertiesSchema = z11.object({
|
|
5040
|
+
taskId: z11.string().optional(),
|
|
5041
|
+
parentTaskId: z11.string().optional(),
|
|
5042
|
+
apiProvider: z11.enum(providerNames).optional(),
|
|
5043
|
+
modelId: z11.string().optional(),
|
|
5044
|
+
diffStrategy: z11.string().optional(),
|
|
5045
|
+
isSubtask: z11.boolean().optional(),
|
|
5046
|
+
todos: z11.object({
|
|
5047
|
+
total: z11.number(),
|
|
5048
|
+
completed: z11.number(),
|
|
5049
|
+
inProgress: z11.number(),
|
|
5050
|
+
pending: z11.number()
|
|
4655
5051
|
}).optional()
|
|
4656
5052
|
});
|
|
4657
|
-
var gitPropertiesSchema =
|
|
4658
|
-
repositoryUrl:
|
|
4659
|
-
repositoryName:
|
|
4660
|
-
defaultBranch:
|
|
5053
|
+
var gitPropertiesSchema = z11.object({
|
|
5054
|
+
repositoryUrl: z11.string().optional(),
|
|
5055
|
+
repositoryName: z11.string().optional(),
|
|
5056
|
+
defaultBranch: z11.string().optional()
|
|
4661
5057
|
});
|
|
4662
|
-
var telemetryPropertiesSchema =
|
|
5058
|
+
var telemetryPropertiesSchema = z11.object({
|
|
4663
5059
|
...appPropertiesSchema.shape,
|
|
4664
5060
|
...taskPropertiesSchema.shape,
|
|
4665
5061
|
...gitPropertiesSchema.shape
|
|
4666
5062
|
});
|
|
4667
|
-
var rooCodeTelemetryEventSchema =
|
|
4668
|
-
|
|
4669
|
-
type:
|
|
5063
|
+
var rooCodeTelemetryEventSchema = z11.discriminatedUnion("type", [
|
|
5064
|
+
z11.object({
|
|
5065
|
+
type: z11.enum([
|
|
4670
5066
|
"Task Created" /* TASK_CREATED */,
|
|
4671
5067
|
"Task Reopened" /* TASK_RESTARTED */,
|
|
4672
5068
|
"Task Completed" /* TASK_COMPLETED */,
|
|
@@ -4709,39 +5105,39 @@ var rooCodeTelemetryEventSchema = z10.discriminatedUnion("type", [
|
|
|
4709
5105
|
]),
|
|
4710
5106
|
properties: telemetryPropertiesSchema
|
|
4711
5107
|
}),
|
|
4712
|
-
|
|
4713
|
-
type:
|
|
4714
|
-
properties:
|
|
5108
|
+
z11.object({
|
|
5109
|
+
type: z11.literal("Telemetry Settings Changed" /* TELEMETRY_SETTINGS_CHANGED */),
|
|
5110
|
+
properties: z11.object({
|
|
4715
5111
|
...telemetryPropertiesSchema.shape,
|
|
4716
5112
|
previousSetting: telemetrySettingsSchema,
|
|
4717
5113
|
newSetting: telemetrySettingsSchema
|
|
4718
5114
|
})
|
|
4719
5115
|
}),
|
|
4720
|
-
|
|
4721
|
-
type:
|
|
4722
|
-
properties:
|
|
5116
|
+
z11.object({
|
|
5117
|
+
type: z11.literal("Task Message" /* TASK_MESSAGE */),
|
|
5118
|
+
properties: z11.object({
|
|
4723
5119
|
...telemetryPropertiesSchema.shape,
|
|
4724
|
-
taskId:
|
|
5120
|
+
taskId: z11.string(),
|
|
4725
5121
|
message: clineMessageSchema
|
|
4726
5122
|
})
|
|
4727
5123
|
}),
|
|
4728
|
-
|
|
4729
|
-
type:
|
|
4730
|
-
properties:
|
|
5124
|
+
z11.object({
|
|
5125
|
+
type: z11.literal("LLM Completion" /* LLM_COMPLETION */),
|
|
5126
|
+
properties: z11.object({
|
|
4731
5127
|
...telemetryPropertiesSchema.shape,
|
|
4732
|
-
inputTokens:
|
|
4733
|
-
outputTokens:
|
|
4734
|
-
cacheReadTokens:
|
|
4735
|
-
cacheWriteTokens:
|
|
4736
|
-
cost:
|
|
5128
|
+
inputTokens: z11.number(),
|
|
5129
|
+
outputTokens: z11.number(),
|
|
5130
|
+
cacheReadTokens: z11.number().optional(),
|
|
5131
|
+
cacheWriteTokens: z11.number().optional(),
|
|
5132
|
+
cost: z11.number().optional()
|
|
4737
5133
|
})
|
|
4738
5134
|
})
|
|
4739
5135
|
]);
|
|
4740
5136
|
|
|
4741
5137
|
// src/mode.ts
|
|
4742
|
-
import { z as
|
|
4743
|
-
var groupOptionsSchema =
|
|
4744
|
-
fileRegex:
|
|
5138
|
+
import { z as z12 } from "zod";
|
|
5139
|
+
var groupOptionsSchema = z12.object({
|
|
5140
|
+
fileRegex: z12.string().optional().refine(
|
|
4745
5141
|
(pattern) => {
|
|
4746
5142
|
if (!pattern) {
|
|
4747
5143
|
return true;
|
|
@@ -4755,10 +5151,10 @@ var groupOptionsSchema = z11.object({
|
|
|
4755
5151
|
},
|
|
4756
5152
|
{ message: "Invalid regular expression pattern" }
|
|
4757
5153
|
),
|
|
4758
|
-
description:
|
|
5154
|
+
description: z12.string().optional()
|
|
4759
5155
|
});
|
|
4760
|
-
var groupEntrySchema =
|
|
4761
|
-
var groupEntryArraySchema =
|
|
5156
|
+
var groupEntrySchema = z12.union([toolGroupsSchema, z12.tuple([toolGroupsSchema, groupOptionsSchema])]);
|
|
5157
|
+
var groupEntryArraySchema = z12.array(groupEntrySchema).refine(
|
|
4762
5158
|
(groups) => {
|
|
4763
5159
|
const seen = /* @__PURE__ */ new Set();
|
|
4764
5160
|
return groups.every((group) => {
|
|
@@ -4772,18 +5168,18 @@ var groupEntryArraySchema = z11.array(groupEntrySchema).refine(
|
|
|
4772
5168
|
},
|
|
4773
5169
|
{ message: "Duplicate groups are not allowed" }
|
|
4774
5170
|
);
|
|
4775
|
-
var modeConfigSchema =
|
|
4776
|
-
slug:
|
|
4777
|
-
name:
|
|
4778
|
-
roleDefinition:
|
|
4779
|
-
whenToUse:
|
|
4780
|
-
description:
|
|
4781
|
-
customInstructions:
|
|
5171
|
+
var modeConfigSchema = z12.object({
|
|
5172
|
+
slug: z12.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
|
|
5173
|
+
name: z12.string().min(1, "Name is required"),
|
|
5174
|
+
roleDefinition: z12.string().min(1, "Role definition is required"),
|
|
5175
|
+
whenToUse: z12.string().optional(),
|
|
5176
|
+
description: z12.string().optional(),
|
|
5177
|
+
customInstructions: z12.string().optional(),
|
|
4782
5178
|
groups: groupEntryArraySchema,
|
|
4783
|
-
source:
|
|
5179
|
+
source: z12.enum(["global", "project"]).optional()
|
|
4784
5180
|
});
|
|
4785
|
-
var customModesSettingsSchema =
|
|
4786
|
-
customModes:
|
|
5181
|
+
var customModesSettingsSchema = z12.object({
|
|
5182
|
+
customModes: z12.array(modeConfigSchema).refine(
|
|
4787
5183
|
(modes) => {
|
|
4788
5184
|
const slugs = /* @__PURE__ */ new Set();
|
|
4789
5185
|
return modes.every((mode) => {
|
|
@@ -4799,14 +5195,14 @@ var customModesSettingsSchema = z11.object({
|
|
|
4799
5195
|
}
|
|
4800
5196
|
)
|
|
4801
5197
|
});
|
|
4802
|
-
var promptComponentSchema =
|
|
4803
|
-
roleDefinition:
|
|
4804
|
-
whenToUse:
|
|
4805
|
-
description:
|
|
4806
|
-
customInstructions:
|
|
5198
|
+
var promptComponentSchema = z12.object({
|
|
5199
|
+
roleDefinition: z12.string().optional(),
|
|
5200
|
+
whenToUse: z12.string().optional(),
|
|
5201
|
+
description: z12.string().optional(),
|
|
5202
|
+
customInstructions: z12.string().optional()
|
|
4807
5203
|
});
|
|
4808
|
-
var customModePromptsSchema =
|
|
4809
|
-
var customSupportPromptsSchema =
|
|
5204
|
+
var customModePromptsSchema = z12.record(z12.string(), promptComponentSchema.optional());
|
|
5205
|
+
var customSupportPromptsSchema = z12.record(z12.string(), z12.string().optional());
|
|
4810
5206
|
var DEFAULT_MODES = [
|
|
4811
5207
|
{
|
|
4812
5208
|
slug: "architect",
|
|
@@ -4855,7 +5251,7 @@ var DEFAULT_MODES = [
|
|
|
4855
5251
|
];
|
|
4856
5252
|
|
|
4857
5253
|
// src/vscode.ts
|
|
4858
|
-
import { z as
|
|
5254
|
+
import { z as z13 } from "zod";
|
|
4859
5255
|
var codeActionIds = ["explainCode", "fixCode", "improveCode", "addToContext", "newTask"];
|
|
4860
5256
|
var terminalActionIds = ["terminalAddToContext", "terminalFixCommand", "terminalExplainCommand"];
|
|
4861
5257
|
var commandIds = [
|
|
@@ -4901,114 +5297,134 @@ var languages = [
|
|
|
4901
5297
|
"zh-CN",
|
|
4902
5298
|
"zh-TW"
|
|
4903
5299
|
];
|
|
4904
|
-
var languagesSchema =
|
|
5300
|
+
var languagesSchema = z13.enum(languages);
|
|
4905
5301
|
var isLanguage = (value) => languages.includes(value);
|
|
4906
5302
|
|
|
4907
5303
|
// src/global-settings.ts
|
|
4908
5304
|
var DEFAULT_WRITE_DELAY_MS = 1e3;
|
|
4909
5305
|
var DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT = 5e4;
|
|
4910
|
-
var
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
5306
|
+
var MIN_CHECKPOINT_TIMEOUT_SECONDS = 10;
|
|
5307
|
+
var MAX_CHECKPOINT_TIMEOUT_SECONDS = 60;
|
|
5308
|
+
var DEFAULT_CHECKPOINT_TIMEOUT_SECONDS = 15;
|
|
5309
|
+
var globalSettingsSchema = z14.object({
|
|
5310
|
+
currentApiConfigName: z14.string().optional(),
|
|
5311
|
+
listApiConfigMeta: z14.array(providerSettingsEntrySchema).optional(),
|
|
5312
|
+
pinnedApiConfigs: z14.record(z14.string(), z14.boolean()).optional(),
|
|
5313
|
+
lastShownAnnouncementId: z14.string().optional(),
|
|
5314
|
+
customInstructions: z14.string().optional(),
|
|
5315
|
+
taskHistory: z14.array(historyItemSchema).optional(),
|
|
5316
|
+
dismissedUpsells: z14.array(z14.string()).optional(),
|
|
4918
5317
|
// Image generation settings (experimental) - flattened for simplicity
|
|
4919
|
-
openRouterImageApiKey:
|
|
4920
|
-
openRouterImageGenerationSelectedModel:
|
|
4921
|
-
condensingApiConfigId:
|
|
4922
|
-
customCondensingPrompt:
|
|
4923
|
-
autoApprovalEnabled:
|
|
4924
|
-
alwaysAllowReadOnly:
|
|
4925
|
-
alwaysAllowReadOnlyOutsideWorkspace:
|
|
4926
|
-
alwaysAllowWrite:
|
|
4927
|
-
alwaysAllowWriteOutsideWorkspace:
|
|
4928
|
-
alwaysAllowWriteProtected:
|
|
4929
|
-
writeDelayMs:
|
|
4930
|
-
alwaysAllowBrowser:
|
|
4931
|
-
alwaysApproveResubmit:
|
|
4932
|
-
requestDelaySeconds:
|
|
4933
|
-
alwaysAllowMcp:
|
|
4934
|
-
alwaysAllowModeSwitch:
|
|
4935
|
-
alwaysAllowSubtasks:
|
|
4936
|
-
alwaysAllowExecute:
|
|
4937
|
-
alwaysAllowFollowupQuestions:
|
|
4938
|
-
followupAutoApproveTimeoutMs:
|
|
4939
|
-
alwaysAllowUpdateTodoList:
|
|
4940
|
-
allowedCommands:
|
|
4941
|
-
deniedCommands:
|
|
4942
|
-
commandExecutionTimeout:
|
|
4943
|
-
commandTimeoutAllowlist:
|
|
4944
|
-
preventCompletionWithOpenTodos:
|
|
4945
|
-
allowedMaxRequests:
|
|
4946
|
-
allowedMaxCost:
|
|
4947
|
-
autoCondenseContext:
|
|
4948
|
-
autoCondenseContextPercent:
|
|
4949
|
-
maxConcurrentFileReads:
|
|
5318
|
+
openRouterImageApiKey: z14.string().optional(),
|
|
5319
|
+
openRouterImageGenerationSelectedModel: z14.string().optional(),
|
|
5320
|
+
condensingApiConfigId: z14.string().optional(),
|
|
5321
|
+
customCondensingPrompt: z14.string().optional(),
|
|
5322
|
+
autoApprovalEnabled: z14.boolean().optional(),
|
|
5323
|
+
alwaysAllowReadOnly: z14.boolean().optional(),
|
|
5324
|
+
alwaysAllowReadOnlyOutsideWorkspace: z14.boolean().optional(),
|
|
5325
|
+
alwaysAllowWrite: z14.boolean().optional(),
|
|
5326
|
+
alwaysAllowWriteOutsideWorkspace: z14.boolean().optional(),
|
|
5327
|
+
alwaysAllowWriteProtected: z14.boolean().optional(),
|
|
5328
|
+
writeDelayMs: z14.number().min(0).optional(),
|
|
5329
|
+
alwaysAllowBrowser: z14.boolean().optional(),
|
|
5330
|
+
alwaysApproveResubmit: z14.boolean().optional(),
|
|
5331
|
+
requestDelaySeconds: z14.number().optional(),
|
|
5332
|
+
alwaysAllowMcp: z14.boolean().optional(),
|
|
5333
|
+
alwaysAllowModeSwitch: z14.boolean().optional(),
|
|
5334
|
+
alwaysAllowSubtasks: z14.boolean().optional(),
|
|
5335
|
+
alwaysAllowExecute: z14.boolean().optional(),
|
|
5336
|
+
alwaysAllowFollowupQuestions: z14.boolean().optional(),
|
|
5337
|
+
followupAutoApproveTimeoutMs: z14.number().optional(),
|
|
5338
|
+
alwaysAllowUpdateTodoList: z14.boolean().optional(),
|
|
5339
|
+
allowedCommands: z14.array(z14.string()).optional(),
|
|
5340
|
+
deniedCommands: z14.array(z14.string()).optional(),
|
|
5341
|
+
commandExecutionTimeout: z14.number().optional(),
|
|
5342
|
+
commandTimeoutAllowlist: z14.array(z14.string()).optional(),
|
|
5343
|
+
preventCompletionWithOpenTodos: z14.boolean().optional(),
|
|
5344
|
+
allowedMaxRequests: z14.number().nullish(),
|
|
5345
|
+
allowedMaxCost: z14.number().nullish(),
|
|
5346
|
+
autoCondenseContext: z14.boolean().optional(),
|
|
5347
|
+
autoCondenseContextPercent: z14.number().optional(),
|
|
5348
|
+
maxConcurrentFileReads: z14.number().optional(),
|
|
5349
|
+
/**
|
|
5350
|
+
* Whether to include current time in the environment details
|
|
5351
|
+
* @default true
|
|
5352
|
+
*/
|
|
5353
|
+
includeCurrentTime: z14.boolean().optional(),
|
|
5354
|
+
/**
|
|
5355
|
+
* Whether to include current cost in the environment details
|
|
5356
|
+
* @default true
|
|
5357
|
+
*/
|
|
5358
|
+
includeCurrentCost: z14.boolean().optional(),
|
|
5359
|
+
/**
|
|
5360
|
+
* Maximum number of git status file entries to include in the environment details.
|
|
5361
|
+
* Set to 0 to disable git status. The header (branch, commits) is always included when > 0.
|
|
5362
|
+
* @default 0
|
|
5363
|
+
*/
|
|
5364
|
+
maxGitStatusFiles: z14.number().optional(),
|
|
4950
5365
|
/**
|
|
4951
5366
|
* Whether to include diagnostic messages (errors, warnings) in tool outputs
|
|
4952
5367
|
* @default true
|
|
4953
5368
|
*/
|
|
4954
|
-
includeDiagnosticMessages:
|
|
5369
|
+
includeDiagnosticMessages: z14.boolean().optional(),
|
|
4955
5370
|
/**
|
|
4956
5371
|
* Maximum number of diagnostic messages to include in tool outputs
|
|
4957
5372
|
* @default 50
|
|
4958
5373
|
*/
|
|
4959
|
-
maxDiagnosticMessages:
|
|
4960
|
-
browserToolEnabled:
|
|
4961
|
-
browserViewportSize:
|
|
4962
|
-
screenshotQuality:
|
|
4963
|
-
remoteBrowserEnabled:
|
|
4964
|
-
remoteBrowserHost:
|
|
4965
|
-
cachedChromeHostUrl:
|
|
4966
|
-
enableCheckpoints:
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
5374
|
+
maxDiagnosticMessages: z14.number().optional(),
|
|
5375
|
+
browserToolEnabled: z14.boolean().optional(),
|
|
5376
|
+
browserViewportSize: z14.string().optional(),
|
|
5377
|
+
screenshotQuality: z14.number().optional(),
|
|
5378
|
+
remoteBrowserEnabled: z14.boolean().optional(),
|
|
5379
|
+
remoteBrowserHost: z14.string().optional(),
|
|
5380
|
+
cachedChromeHostUrl: z14.string().optional(),
|
|
5381
|
+
enableCheckpoints: z14.boolean().optional(),
|
|
5382
|
+
checkpointTimeout: z14.number().int().min(MIN_CHECKPOINT_TIMEOUT_SECONDS).max(MAX_CHECKPOINT_TIMEOUT_SECONDS).optional(),
|
|
5383
|
+
ttsEnabled: z14.boolean().optional(),
|
|
5384
|
+
ttsSpeed: z14.number().optional(),
|
|
5385
|
+
soundEnabled: z14.boolean().optional(),
|
|
5386
|
+
soundVolume: z14.number().optional(),
|
|
5387
|
+
maxOpenTabsContext: z14.number().optional(),
|
|
5388
|
+
maxWorkspaceFiles: z14.number().optional(),
|
|
5389
|
+
showRooIgnoredFiles: z14.boolean().optional(),
|
|
5390
|
+
maxReadFileLine: z14.number().optional(),
|
|
5391
|
+
maxImageFileSize: z14.number().optional(),
|
|
5392
|
+
maxTotalImageSize: z14.number().optional(),
|
|
5393
|
+
terminalOutputLineLimit: z14.number().optional(),
|
|
5394
|
+
terminalOutputCharacterLimit: z14.number().optional(),
|
|
5395
|
+
terminalShellIntegrationTimeout: z14.number().optional(),
|
|
5396
|
+
terminalShellIntegrationDisabled: z14.boolean().optional(),
|
|
5397
|
+
terminalCommandDelay: z14.number().optional(),
|
|
5398
|
+
terminalPowershellCounter: z14.boolean().optional(),
|
|
5399
|
+
terminalZshClearEolMark: z14.boolean().optional(),
|
|
5400
|
+
terminalZshOhMy: z14.boolean().optional(),
|
|
5401
|
+
terminalZshP10k: z14.boolean().optional(),
|
|
5402
|
+
terminalZdotdir: z14.boolean().optional(),
|
|
5403
|
+
terminalCompressProgressBar: z14.boolean().optional(),
|
|
5404
|
+
diagnosticsEnabled: z14.boolean().optional(),
|
|
5405
|
+
rateLimitSeconds: z14.number().optional(),
|
|
5406
|
+
diffEnabled: z14.boolean().optional(),
|
|
5407
|
+
fuzzyMatchThreshold: z14.number().optional(),
|
|
4992
5408
|
experiments: experimentsSchema.optional(),
|
|
4993
5409
|
codebaseIndexModels: codebaseIndexModelsSchema.optional(),
|
|
4994
5410
|
codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
|
|
4995
5411
|
language: languagesSchema.optional(),
|
|
4996
5412
|
telemetrySetting: telemetrySettingsSchema.optional(),
|
|
4997
|
-
mcpEnabled:
|
|
4998
|
-
enableMcpServerCreation:
|
|
4999
|
-
mode:
|
|
5000
|
-
modeApiConfigs:
|
|
5001
|
-
customModes:
|
|
5413
|
+
mcpEnabled: z14.boolean().optional(),
|
|
5414
|
+
enableMcpServerCreation: z14.boolean().optional(),
|
|
5415
|
+
mode: z14.string().optional(),
|
|
5416
|
+
modeApiConfigs: z14.record(z14.string(), z14.string()).optional(),
|
|
5417
|
+
customModes: z14.array(modeConfigSchema).optional(),
|
|
5002
5418
|
customModePrompts: customModePromptsSchema.optional(),
|
|
5003
5419
|
customSupportPrompts: customSupportPromptsSchema.optional(),
|
|
5004
|
-
enhancementApiConfigId:
|
|
5005
|
-
includeTaskHistoryInEnhance:
|
|
5006
|
-
historyPreviewCollapsed:
|
|
5007
|
-
reasoningBlockCollapsed:
|
|
5008
|
-
profileThresholds:
|
|
5009
|
-
hasOpenedModeSelector:
|
|
5010
|
-
lastModeExportPath:
|
|
5011
|
-
lastModeImportPath:
|
|
5420
|
+
enhancementApiConfigId: z14.string().optional(),
|
|
5421
|
+
includeTaskHistoryInEnhance: z14.boolean().optional(),
|
|
5422
|
+
historyPreviewCollapsed: z14.boolean().optional(),
|
|
5423
|
+
reasoningBlockCollapsed: z14.boolean().optional(),
|
|
5424
|
+
profileThresholds: z14.record(z14.string(), z14.number()).optional(),
|
|
5425
|
+
hasOpenedModeSelector: z14.boolean().optional(),
|
|
5426
|
+
lastModeExportPath: z14.string().optional(),
|
|
5427
|
+
lastModeImportPath: z14.string().optional()
|
|
5012
5428
|
});
|
|
5013
5429
|
var GLOBAL_SETTINGS_KEYS = globalSettingsSchema.keyof().options;
|
|
5014
5430
|
var rooCodeSettingsSchema = providerSettingsSchema.merge(globalSettingsSchema);
|
|
@@ -5029,6 +5445,7 @@ var SECRET_STATE_KEYS = [
|
|
|
5029
5445
|
"doubaoApiKey",
|
|
5030
5446
|
"moonshotApiKey",
|
|
5031
5447
|
"mistralApiKey",
|
|
5448
|
+
"minimaxApiKey",
|
|
5032
5449
|
"unboundApiKey",
|
|
5033
5450
|
"requestyApiKey",
|
|
5034
5451
|
"xaiApiKey",
|
|
@@ -5042,6 +5459,7 @@ var SECRET_STATE_KEYS = [
|
|
|
5042
5459
|
"codebaseIndexGeminiApiKey",
|
|
5043
5460
|
"codebaseIndexMistralApiKey",
|
|
5044
5461
|
"codebaseIndexVercelAiGatewayApiKey",
|
|
5462
|
+
"codebaseIndexOpenRouterApiKey",
|
|
5045
5463
|
"huggingFaceApiKey",
|
|
5046
5464
|
"sambaNovaApiKey",
|
|
5047
5465
|
"zaiApiKey",
|
|
@@ -5111,6 +5529,7 @@ var EVALS_SETTINGS = {
|
|
|
5111
5529
|
rateLimitSeconds: 0,
|
|
5112
5530
|
maxOpenTabsContext: 20,
|
|
5113
5531
|
maxWorkspaceFiles: 200,
|
|
5532
|
+
maxGitStatusFiles: 20,
|
|
5114
5533
|
showRooIgnoredFiles: true,
|
|
5115
5534
|
maxReadFileLine: -1,
|
|
5116
5535
|
// -1 to enable full file reading.
|
|
@@ -5126,62 +5545,62 @@ var EVALS_SETTINGS = {
|
|
|
5126
5545
|
var EVALS_TIMEOUT = 5 * 60 * 1e3;
|
|
5127
5546
|
|
|
5128
5547
|
// src/marketplace.ts
|
|
5129
|
-
import { z as
|
|
5130
|
-
var mcpParameterSchema =
|
|
5131
|
-
name:
|
|
5132
|
-
key:
|
|
5133
|
-
placeholder:
|
|
5134
|
-
optional:
|
|
5548
|
+
import { z as z15 } from "zod";
|
|
5549
|
+
var mcpParameterSchema = z15.object({
|
|
5550
|
+
name: z15.string().min(1),
|
|
5551
|
+
key: z15.string().min(1),
|
|
5552
|
+
placeholder: z15.string().optional(),
|
|
5553
|
+
optional: z15.boolean().optional().default(false)
|
|
5135
5554
|
});
|
|
5136
|
-
var mcpInstallationMethodSchema =
|
|
5137
|
-
name:
|
|
5138
|
-
content:
|
|
5139
|
-
parameters:
|
|
5140
|
-
prerequisites:
|
|
5555
|
+
var mcpInstallationMethodSchema = z15.object({
|
|
5556
|
+
name: z15.string().min(1),
|
|
5557
|
+
content: z15.string().min(1),
|
|
5558
|
+
parameters: z15.array(mcpParameterSchema).optional(),
|
|
5559
|
+
prerequisites: z15.array(z15.string()).optional()
|
|
5141
5560
|
});
|
|
5142
|
-
var marketplaceItemTypeSchema =
|
|
5143
|
-
var baseMarketplaceItemSchema =
|
|
5144
|
-
id:
|
|
5145
|
-
name:
|
|
5146
|
-
description:
|
|
5147
|
-
author:
|
|
5148
|
-
authorUrl:
|
|
5149
|
-
tags:
|
|
5150
|
-
prerequisites:
|
|
5561
|
+
var marketplaceItemTypeSchema = z15.enum(["mode", "mcp"]);
|
|
5562
|
+
var baseMarketplaceItemSchema = z15.object({
|
|
5563
|
+
id: z15.string().min(1),
|
|
5564
|
+
name: z15.string().min(1, "Name is required"),
|
|
5565
|
+
description: z15.string(),
|
|
5566
|
+
author: z15.string().optional(),
|
|
5567
|
+
authorUrl: z15.string().url("Author URL must be a valid URL").optional(),
|
|
5568
|
+
tags: z15.array(z15.string()).optional(),
|
|
5569
|
+
prerequisites: z15.array(z15.string()).optional()
|
|
5151
5570
|
});
|
|
5152
5571
|
var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
5153
|
-
content:
|
|
5572
|
+
content: z15.string().min(1)
|
|
5154
5573
|
// YAML content for modes
|
|
5155
5574
|
});
|
|
5156
5575
|
var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
5157
|
-
url:
|
|
5576
|
+
url: z15.string().url(),
|
|
5158
5577
|
// Required url field
|
|
5159
|
-
content:
|
|
5578
|
+
content: z15.union([z15.string().min(1), z15.array(mcpInstallationMethodSchema)]),
|
|
5160
5579
|
// Single config or array of methods
|
|
5161
|
-
parameters:
|
|
5580
|
+
parameters: z15.array(mcpParameterSchema).optional()
|
|
5162
5581
|
});
|
|
5163
|
-
var marketplaceItemSchema =
|
|
5582
|
+
var marketplaceItemSchema = z15.discriminatedUnion("type", [
|
|
5164
5583
|
// Mode marketplace item
|
|
5165
5584
|
modeMarketplaceItemSchema.extend({
|
|
5166
|
-
type:
|
|
5585
|
+
type: z15.literal("mode")
|
|
5167
5586
|
}),
|
|
5168
5587
|
// MCP marketplace item
|
|
5169
5588
|
mcpMarketplaceItemSchema.extend({
|
|
5170
|
-
type:
|
|
5589
|
+
type: z15.literal("mcp")
|
|
5171
5590
|
})
|
|
5172
5591
|
]);
|
|
5173
|
-
var installMarketplaceItemOptionsSchema =
|
|
5174
|
-
target:
|
|
5175
|
-
parameters:
|
|
5592
|
+
var installMarketplaceItemOptionsSchema = z15.object({
|
|
5593
|
+
target: z15.enum(["global", "project"]).optional().default("project"),
|
|
5594
|
+
parameters: z15.record(z15.string(), z15.any()).optional()
|
|
5176
5595
|
});
|
|
5177
5596
|
|
|
5178
5597
|
// src/cloud.ts
|
|
5179
|
-
var organizationAllowListSchema =
|
|
5180
|
-
allowAll:
|
|
5181
|
-
providers:
|
|
5182
|
-
|
|
5183
|
-
allowAll:
|
|
5184
|
-
models:
|
|
5598
|
+
var organizationAllowListSchema = z16.object({
|
|
5599
|
+
allowAll: z16.boolean(),
|
|
5600
|
+
providers: z16.record(
|
|
5601
|
+
z16.object({
|
|
5602
|
+
allowAll: z16.boolean(),
|
|
5603
|
+
models: z16.array(z16.string()).optional()
|
|
5185
5604
|
})
|
|
5186
5605
|
)
|
|
5187
5606
|
});
|
|
@@ -5199,46 +5618,46 @@ var organizationDefaultSettingsSchema = globalSettingsSchema.pick({
|
|
|
5199
5618
|
terminalShellIntegrationTimeout: true,
|
|
5200
5619
|
terminalZshClearEolMark: true
|
|
5201
5620
|
}).merge(
|
|
5202
|
-
|
|
5203
|
-
maxOpenTabsContext:
|
|
5204
|
-
maxReadFileLine:
|
|
5205
|
-
maxWorkspaceFiles:
|
|
5206
|
-
terminalCommandDelay:
|
|
5207
|
-
terminalOutputLineLimit:
|
|
5208
|
-
terminalShellIntegrationTimeout:
|
|
5621
|
+
z16.object({
|
|
5622
|
+
maxOpenTabsContext: z16.number().int().nonnegative().optional(),
|
|
5623
|
+
maxReadFileLine: z16.number().int().gte(-1).optional(),
|
|
5624
|
+
maxWorkspaceFiles: z16.number().int().nonnegative().optional(),
|
|
5625
|
+
terminalCommandDelay: z16.number().int().nonnegative().optional(),
|
|
5626
|
+
terminalOutputLineLimit: z16.number().int().nonnegative().optional(),
|
|
5627
|
+
terminalShellIntegrationTimeout: z16.number().int().nonnegative().optional()
|
|
5209
5628
|
})
|
|
5210
5629
|
);
|
|
5211
|
-
var organizationCloudSettingsSchema =
|
|
5212
|
-
recordTaskMessages:
|
|
5213
|
-
enableTaskSharing:
|
|
5214
|
-
taskShareExpirationDays:
|
|
5215
|
-
allowMembersViewAllTasks:
|
|
5630
|
+
var organizationCloudSettingsSchema = z16.object({
|
|
5631
|
+
recordTaskMessages: z16.boolean().optional(),
|
|
5632
|
+
enableTaskSharing: z16.boolean().optional(),
|
|
5633
|
+
taskShareExpirationDays: z16.number().int().positive().optional(),
|
|
5634
|
+
allowMembersViewAllTasks: z16.boolean().optional()
|
|
5216
5635
|
});
|
|
5217
|
-
var organizationFeaturesSchema =
|
|
5218
|
-
roomoteControlEnabled:
|
|
5636
|
+
var organizationFeaturesSchema = z16.object({
|
|
5637
|
+
roomoteControlEnabled: z16.boolean().optional()
|
|
5219
5638
|
});
|
|
5220
|
-
var organizationSettingsSchema =
|
|
5221
|
-
version:
|
|
5639
|
+
var organizationSettingsSchema = z16.object({
|
|
5640
|
+
version: z16.number(),
|
|
5222
5641
|
cloudSettings: organizationCloudSettingsSchema.optional(),
|
|
5223
5642
|
defaultSettings: organizationDefaultSettingsSchema,
|
|
5224
5643
|
allowList: organizationAllowListSchema,
|
|
5225
5644
|
features: organizationFeaturesSchema.optional(),
|
|
5226
|
-
hiddenMcps:
|
|
5227
|
-
hideMarketplaceMcps:
|
|
5228
|
-
mcps:
|
|
5229
|
-
providerProfiles:
|
|
5645
|
+
hiddenMcps: z16.array(z16.string()).optional(),
|
|
5646
|
+
hideMarketplaceMcps: z16.boolean().optional(),
|
|
5647
|
+
mcps: z16.array(mcpMarketplaceItemSchema).optional(),
|
|
5648
|
+
providerProfiles: z16.record(z16.string(), providerSettingsWithIdSchema).optional()
|
|
5230
5649
|
});
|
|
5231
|
-
var userFeaturesSchema =
|
|
5232
|
-
roomoteControlEnabled:
|
|
5650
|
+
var userFeaturesSchema = z16.object({
|
|
5651
|
+
roomoteControlEnabled: z16.boolean().optional()
|
|
5233
5652
|
});
|
|
5234
|
-
var userSettingsConfigSchema =
|
|
5235
|
-
extensionBridgeEnabled:
|
|
5236
|
-
taskSyncEnabled:
|
|
5653
|
+
var userSettingsConfigSchema = z16.object({
|
|
5654
|
+
extensionBridgeEnabled: z16.boolean().optional(),
|
|
5655
|
+
taskSyncEnabled: z16.boolean().optional()
|
|
5237
5656
|
});
|
|
5238
|
-
var userSettingsDataSchema =
|
|
5657
|
+
var userSettingsDataSchema = z16.object({
|
|
5239
5658
|
features: userFeaturesSchema,
|
|
5240
5659
|
settings: userSettingsConfigSchema,
|
|
5241
|
-
version:
|
|
5660
|
+
version: z16.number()
|
|
5242
5661
|
});
|
|
5243
5662
|
var ORGANIZATION_ALLOW_ALL = {
|
|
5244
5663
|
allowAll: true,
|
|
@@ -5255,12 +5674,12 @@ var ORGANIZATION_DEFAULT = {
|
|
|
5255
5674
|
defaultSettings: {},
|
|
5256
5675
|
allowList: ORGANIZATION_ALLOW_ALL
|
|
5257
5676
|
};
|
|
5258
|
-
var shareResponseSchema =
|
|
5259
|
-
success:
|
|
5260
|
-
shareUrl:
|
|
5261
|
-
error:
|
|
5262
|
-
isNewShare:
|
|
5263
|
-
manageUrl:
|
|
5677
|
+
var shareResponseSchema = z16.object({
|
|
5678
|
+
success: z16.boolean(),
|
|
5679
|
+
shareUrl: z16.string().optional(),
|
|
5680
|
+
error: z16.string().optional(),
|
|
5681
|
+
isNewShare: z16.boolean().optional(),
|
|
5682
|
+
manageUrl: z16.string().optional()
|
|
5264
5683
|
});
|
|
5265
5684
|
var ConnectionState = /* @__PURE__ */ ((ConnectionState2) => {
|
|
5266
5685
|
ConnectionState2["DISCONNECTED"] = "disconnected";
|
|
@@ -5272,31 +5691,31 @@ var ConnectionState = /* @__PURE__ */ ((ConnectionState2) => {
|
|
|
5272
5691
|
})(ConnectionState || {});
|
|
5273
5692
|
var HEARTBEAT_INTERVAL_MS = 2e4;
|
|
5274
5693
|
var INSTANCE_TTL_SECONDS = 60;
|
|
5275
|
-
var extensionTaskSchema =
|
|
5276
|
-
taskId:
|
|
5277
|
-
taskStatus:
|
|
5694
|
+
var extensionTaskSchema = z16.object({
|
|
5695
|
+
taskId: z16.string(),
|
|
5696
|
+
taskStatus: z16.nativeEnum(TaskStatus),
|
|
5278
5697
|
taskAsk: clineMessageSchema.optional(),
|
|
5279
|
-
queuedMessages:
|
|
5280
|
-
parentTaskId:
|
|
5281
|
-
childTaskId:
|
|
5698
|
+
queuedMessages: z16.array(queuedMessageSchema).optional(),
|
|
5699
|
+
parentTaskId: z16.string().optional(),
|
|
5700
|
+
childTaskId: z16.string().optional(),
|
|
5282
5701
|
tokenUsage: tokenUsageSchema.optional(),
|
|
5283
5702
|
...taskMetadataSchema.shape
|
|
5284
5703
|
});
|
|
5285
|
-
var extensionInstanceSchema =
|
|
5286
|
-
instanceId:
|
|
5287
|
-
userId:
|
|
5288
|
-
workspacePath:
|
|
5704
|
+
var extensionInstanceSchema = z16.object({
|
|
5705
|
+
instanceId: z16.string(),
|
|
5706
|
+
userId: z16.string(),
|
|
5707
|
+
workspacePath: z16.string(),
|
|
5289
5708
|
appProperties: staticAppPropertiesSchema,
|
|
5290
5709
|
gitProperties: gitPropertiesSchema.optional(),
|
|
5291
|
-
lastHeartbeat:
|
|
5710
|
+
lastHeartbeat: z16.coerce.number(),
|
|
5292
5711
|
task: extensionTaskSchema,
|
|
5293
5712
|
taskAsk: clineMessageSchema.optional(),
|
|
5294
|
-
taskHistory:
|
|
5295
|
-
mode:
|
|
5296
|
-
modes:
|
|
5297
|
-
providerProfile:
|
|
5298
|
-
providerProfiles:
|
|
5299
|
-
isCloudAgent:
|
|
5713
|
+
taskHistory: z16.array(z16.string()),
|
|
5714
|
+
mode: z16.string().optional(),
|
|
5715
|
+
modes: z16.array(z16.object({ slug: z16.string(), name: z16.string() })).optional(),
|
|
5716
|
+
providerProfile: z16.string().optional(),
|
|
5717
|
+
providerProfiles: z16.array(z16.object({ name: z16.string(), provider: z16.string().optional() })).optional(),
|
|
5718
|
+
isCloudAgent: z16.boolean().optional()
|
|
5300
5719
|
});
|
|
5301
5720
|
var ExtensionBridgeEventName = ((ExtensionBridgeEventName2) => {
|
|
5302
5721
|
ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskCreated"] = "taskCreated" /* TaskCreated */] = "TaskCreated";
|
|
@@ -5321,108 +5740,108 @@ var ExtensionBridgeEventName = ((ExtensionBridgeEventName2) => {
|
|
|
5321
5740
|
ExtensionBridgeEventName2["HeartbeatUpdated"] = "heartbeat_updated";
|
|
5322
5741
|
return ExtensionBridgeEventName2;
|
|
5323
5742
|
})(ExtensionBridgeEventName || {});
|
|
5324
|
-
var extensionBridgeEventSchema =
|
|
5325
|
-
|
|
5326
|
-
type:
|
|
5743
|
+
var extensionBridgeEventSchema = z16.discriminatedUnion("type", [
|
|
5744
|
+
z16.object({
|
|
5745
|
+
type: z16.literal(ExtensionBridgeEventName.TaskCreated),
|
|
5327
5746
|
instance: extensionInstanceSchema,
|
|
5328
|
-
timestamp:
|
|
5747
|
+
timestamp: z16.number()
|
|
5329
5748
|
}),
|
|
5330
|
-
|
|
5331
|
-
type:
|
|
5749
|
+
z16.object({
|
|
5750
|
+
type: z16.literal(ExtensionBridgeEventName.TaskStarted),
|
|
5332
5751
|
instance: extensionInstanceSchema,
|
|
5333
|
-
timestamp:
|
|
5752
|
+
timestamp: z16.number()
|
|
5334
5753
|
}),
|
|
5335
|
-
|
|
5336
|
-
type:
|
|
5754
|
+
z16.object({
|
|
5755
|
+
type: z16.literal(ExtensionBridgeEventName.TaskCompleted),
|
|
5337
5756
|
instance: extensionInstanceSchema,
|
|
5338
|
-
timestamp:
|
|
5757
|
+
timestamp: z16.number()
|
|
5339
5758
|
}),
|
|
5340
|
-
|
|
5341
|
-
type:
|
|
5759
|
+
z16.object({
|
|
5760
|
+
type: z16.literal(ExtensionBridgeEventName.TaskAborted),
|
|
5342
5761
|
instance: extensionInstanceSchema,
|
|
5343
|
-
timestamp:
|
|
5762
|
+
timestamp: z16.number()
|
|
5344
5763
|
}),
|
|
5345
|
-
|
|
5346
|
-
type:
|
|
5764
|
+
z16.object({
|
|
5765
|
+
type: z16.literal(ExtensionBridgeEventName.TaskFocused),
|
|
5347
5766
|
instance: extensionInstanceSchema,
|
|
5348
|
-
timestamp:
|
|
5767
|
+
timestamp: z16.number()
|
|
5349
5768
|
}),
|
|
5350
|
-
|
|
5351
|
-
type:
|
|
5769
|
+
z16.object({
|
|
5770
|
+
type: z16.literal(ExtensionBridgeEventName.TaskUnfocused),
|
|
5352
5771
|
instance: extensionInstanceSchema,
|
|
5353
|
-
timestamp:
|
|
5772
|
+
timestamp: z16.number()
|
|
5354
5773
|
}),
|
|
5355
|
-
|
|
5356
|
-
type:
|
|
5774
|
+
z16.object({
|
|
5775
|
+
type: z16.literal(ExtensionBridgeEventName.TaskActive),
|
|
5357
5776
|
instance: extensionInstanceSchema,
|
|
5358
|
-
timestamp:
|
|
5777
|
+
timestamp: z16.number()
|
|
5359
5778
|
}),
|
|
5360
|
-
|
|
5361
|
-
type:
|
|
5779
|
+
z16.object({
|
|
5780
|
+
type: z16.literal(ExtensionBridgeEventName.TaskInteractive),
|
|
5362
5781
|
instance: extensionInstanceSchema,
|
|
5363
|
-
timestamp:
|
|
5782
|
+
timestamp: z16.number()
|
|
5364
5783
|
}),
|
|
5365
|
-
|
|
5366
|
-
type:
|
|
5784
|
+
z16.object({
|
|
5785
|
+
type: z16.literal(ExtensionBridgeEventName.TaskResumable),
|
|
5367
5786
|
instance: extensionInstanceSchema,
|
|
5368
|
-
timestamp:
|
|
5787
|
+
timestamp: z16.number()
|
|
5369
5788
|
}),
|
|
5370
|
-
|
|
5371
|
-
type:
|
|
5789
|
+
z16.object({
|
|
5790
|
+
type: z16.literal(ExtensionBridgeEventName.TaskIdle),
|
|
5372
5791
|
instance: extensionInstanceSchema,
|
|
5373
|
-
timestamp:
|
|
5792
|
+
timestamp: z16.number()
|
|
5374
5793
|
}),
|
|
5375
|
-
|
|
5376
|
-
type:
|
|
5794
|
+
z16.object({
|
|
5795
|
+
type: z16.literal(ExtensionBridgeEventName.TaskPaused),
|
|
5377
5796
|
instance: extensionInstanceSchema,
|
|
5378
|
-
timestamp:
|
|
5797
|
+
timestamp: z16.number()
|
|
5379
5798
|
}),
|
|
5380
|
-
|
|
5381
|
-
type:
|
|
5799
|
+
z16.object({
|
|
5800
|
+
type: z16.literal(ExtensionBridgeEventName.TaskUnpaused),
|
|
5382
5801
|
instance: extensionInstanceSchema,
|
|
5383
|
-
timestamp:
|
|
5802
|
+
timestamp: z16.number()
|
|
5384
5803
|
}),
|
|
5385
|
-
|
|
5386
|
-
type:
|
|
5804
|
+
z16.object({
|
|
5805
|
+
type: z16.literal(ExtensionBridgeEventName.TaskSpawned),
|
|
5387
5806
|
instance: extensionInstanceSchema,
|
|
5388
|
-
timestamp:
|
|
5807
|
+
timestamp: z16.number()
|
|
5389
5808
|
}),
|
|
5390
|
-
|
|
5391
|
-
type:
|
|
5809
|
+
z16.object({
|
|
5810
|
+
type: z16.literal(ExtensionBridgeEventName.TaskUserMessage),
|
|
5392
5811
|
instance: extensionInstanceSchema,
|
|
5393
|
-
timestamp:
|
|
5812
|
+
timestamp: z16.number()
|
|
5394
5813
|
}),
|
|
5395
|
-
|
|
5396
|
-
type:
|
|
5814
|
+
z16.object({
|
|
5815
|
+
type: z16.literal(ExtensionBridgeEventName.TaskTokenUsageUpdated),
|
|
5397
5816
|
instance: extensionInstanceSchema,
|
|
5398
|
-
timestamp:
|
|
5817
|
+
timestamp: z16.number()
|
|
5399
5818
|
}),
|
|
5400
|
-
|
|
5401
|
-
type:
|
|
5819
|
+
z16.object({
|
|
5820
|
+
type: z16.literal(ExtensionBridgeEventName.ModeChanged),
|
|
5402
5821
|
instance: extensionInstanceSchema,
|
|
5403
|
-
mode:
|
|
5404
|
-
timestamp:
|
|
5822
|
+
mode: z16.string(),
|
|
5823
|
+
timestamp: z16.number()
|
|
5405
5824
|
}),
|
|
5406
|
-
|
|
5407
|
-
type:
|
|
5825
|
+
z16.object({
|
|
5826
|
+
type: z16.literal(ExtensionBridgeEventName.ProviderProfileChanged),
|
|
5408
5827
|
instance: extensionInstanceSchema,
|
|
5409
|
-
providerProfile:
|
|
5410
|
-
timestamp:
|
|
5828
|
+
providerProfile: z16.object({ name: z16.string(), provider: z16.string().optional() }),
|
|
5829
|
+
timestamp: z16.number()
|
|
5411
5830
|
}),
|
|
5412
|
-
|
|
5413
|
-
type:
|
|
5831
|
+
z16.object({
|
|
5832
|
+
type: z16.literal("instance_registered" /* InstanceRegistered */),
|
|
5414
5833
|
instance: extensionInstanceSchema,
|
|
5415
|
-
timestamp:
|
|
5834
|
+
timestamp: z16.number()
|
|
5416
5835
|
}),
|
|
5417
|
-
|
|
5418
|
-
type:
|
|
5836
|
+
z16.object({
|
|
5837
|
+
type: z16.literal("instance_unregistered" /* InstanceUnregistered */),
|
|
5419
5838
|
instance: extensionInstanceSchema,
|
|
5420
|
-
timestamp:
|
|
5839
|
+
timestamp: z16.number()
|
|
5421
5840
|
}),
|
|
5422
|
-
|
|
5423
|
-
type:
|
|
5841
|
+
z16.object({
|
|
5842
|
+
type: z16.literal("heartbeat_updated" /* HeartbeatUpdated */),
|
|
5424
5843
|
instance: extensionInstanceSchema,
|
|
5425
|
-
timestamp:
|
|
5844
|
+
timestamp: z16.number()
|
|
5426
5845
|
})
|
|
5427
5846
|
]);
|
|
5428
5847
|
var ExtensionBridgeCommandName = /* @__PURE__ */ ((ExtensionBridgeCommandName2) => {
|
|
@@ -5431,29 +5850,29 @@ var ExtensionBridgeCommandName = /* @__PURE__ */ ((ExtensionBridgeCommandName2)
|
|
|
5431
5850
|
ExtensionBridgeCommandName2["ResumeTask"] = "resume_task";
|
|
5432
5851
|
return ExtensionBridgeCommandName2;
|
|
5433
5852
|
})(ExtensionBridgeCommandName || {});
|
|
5434
|
-
var extensionBridgeCommandSchema =
|
|
5435
|
-
|
|
5436
|
-
type:
|
|
5437
|
-
instanceId:
|
|
5438
|
-
payload:
|
|
5439
|
-
text:
|
|
5440
|
-
images:
|
|
5441
|
-
mode:
|
|
5442
|
-
providerProfile:
|
|
5853
|
+
var extensionBridgeCommandSchema = z16.discriminatedUnion("type", [
|
|
5854
|
+
z16.object({
|
|
5855
|
+
type: z16.literal("start_task" /* StartTask */),
|
|
5856
|
+
instanceId: z16.string(),
|
|
5857
|
+
payload: z16.object({
|
|
5858
|
+
text: z16.string(),
|
|
5859
|
+
images: z16.array(z16.string()).optional(),
|
|
5860
|
+
mode: z16.string().optional(),
|
|
5861
|
+
providerProfile: z16.string().optional()
|
|
5443
5862
|
}),
|
|
5444
|
-
timestamp:
|
|
5863
|
+
timestamp: z16.number()
|
|
5445
5864
|
}),
|
|
5446
|
-
|
|
5447
|
-
type:
|
|
5448
|
-
instanceId:
|
|
5449
|
-
payload:
|
|
5450
|
-
timestamp:
|
|
5865
|
+
z16.object({
|
|
5866
|
+
type: z16.literal("stop_task" /* StopTask */),
|
|
5867
|
+
instanceId: z16.string(),
|
|
5868
|
+
payload: z16.object({ taskId: z16.string() }),
|
|
5869
|
+
timestamp: z16.number()
|
|
5451
5870
|
}),
|
|
5452
|
-
|
|
5453
|
-
type:
|
|
5454
|
-
instanceId:
|
|
5455
|
-
payload:
|
|
5456
|
-
timestamp:
|
|
5871
|
+
z16.object({
|
|
5872
|
+
type: z16.literal("resume_task" /* ResumeTask */),
|
|
5873
|
+
instanceId: z16.string(),
|
|
5874
|
+
payload: z16.object({ taskId: z16.string() }),
|
|
5875
|
+
timestamp: z16.number()
|
|
5457
5876
|
})
|
|
5458
5877
|
]);
|
|
5459
5878
|
var TaskBridgeEventName = ((TaskBridgeEventName2) => {
|
|
@@ -5462,21 +5881,21 @@ var TaskBridgeEventName = ((TaskBridgeEventName2) => {
|
|
|
5462
5881
|
TaskBridgeEventName2[TaskBridgeEventName2["TaskInteractive"] = "taskInteractive" /* TaskInteractive */] = "TaskInteractive";
|
|
5463
5882
|
return TaskBridgeEventName2;
|
|
5464
5883
|
})(TaskBridgeEventName || {});
|
|
5465
|
-
var taskBridgeEventSchema =
|
|
5466
|
-
|
|
5467
|
-
type:
|
|
5468
|
-
taskId:
|
|
5469
|
-
action:
|
|
5884
|
+
var taskBridgeEventSchema = z16.discriminatedUnion("type", [
|
|
5885
|
+
z16.object({
|
|
5886
|
+
type: z16.literal(TaskBridgeEventName.Message),
|
|
5887
|
+
taskId: z16.string(),
|
|
5888
|
+
action: z16.string(),
|
|
5470
5889
|
message: clineMessageSchema
|
|
5471
5890
|
}),
|
|
5472
|
-
|
|
5473
|
-
type:
|
|
5474
|
-
taskId:
|
|
5475
|
-
mode:
|
|
5891
|
+
z16.object({
|
|
5892
|
+
type: z16.literal(TaskBridgeEventName.TaskModeSwitched),
|
|
5893
|
+
taskId: z16.string(),
|
|
5894
|
+
mode: z16.string()
|
|
5476
5895
|
}),
|
|
5477
|
-
|
|
5478
|
-
type:
|
|
5479
|
-
taskId:
|
|
5896
|
+
z16.object({
|
|
5897
|
+
type: z16.literal(TaskBridgeEventName.TaskInteractive),
|
|
5898
|
+
taskId: z16.string()
|
|
5480
5899
|
})
|
|
5481
5900
|
]);
|
|
5482
5901
|
var TaskBridgeCommandName = /* @__PURE__ */ ((TaskBridgeCommandName2) => {
|
|
@@ -5485,35 +5904,35 @@ var TaskBridgeCommandName = /* @__PURE__ */ ((TaskBridgeCommandName2) => {
|
|
|
5485
5904
|
TaskBridgeCommandName2["DenyAsk"] = "deny_ask";
|
|
5486
5905
|
return TaskBridgeCommandName2;
|
|
5487
5906
|
})(TaskBridgeCommandName || {});
|
|
5488
|
-
var taskBridgeCommandSchema =
|
|
5489
|
-
|
|
5490
|
-
type:
|
|
5491
|
-
taskId:
|
|
5492
|
-
payload:
|
|
5493
|
-
text:
|
|
5494
|
-
images:
|
|
5495
|
-
mode:
|
|
5496
|
-
providerProfile:
|
|
5907
|
+
var taskBridgeCommandSchema = z16.discriminatedUnion("type", [
|
|
5908
|
+
z16.object({
|
|
5909
|
+
type: z16.literal("message" /* Message */),
|
|
5910
|
+
taskId: z16.string(),
|
|
5911
|
+
payload: z16.object({
|
|
5912
|
+
text: z16.string(),
|
|
5913
|
+
images: z16.array(z16.string()).optional(),
|
|
5914
|
+
mode: z16.string().optional(),
|
|
5915
|
+
providerProfile: z16.string().optional()
|
|
5497
5916
|
}),
|
|
5498
|
-
timestamp:
|
|
5917
|
+
timestamp: z16.number()
|
|
5499
5918
|
}),
|
|
5500
|
-
|
|
5501
|
-
type:
|
|
5502
|
-
taskId:
|
|
5503
|
-
payload:
|
|
5504
|
-
text:
|
|
5505
|
-
images:
|
|
5919
|
+
z16.object({
|
|
5920
|
+
type: z16.literal("approve_ask" /* ApproveAsk */),
|
|
5921
|
+
taskId: z16.string(),
|
|
5922
|
+
payload: z16.object({
|
|
5923
|
+
text: z16.string().optional(),
|
|
5924
|
+
images: z16.array(z16.string()).optional()
|
|
5506
5925
|
}),
|
|
5507
|
-
timestamp:
|
|
5926
|
+
timestamp: z16.number()
|
|
5508
5927
|
}),
|
|
5509
|
-
|
|
5510
|
-
type:
|
|
5511
|
-
taskId:
|
|
5512
|
-
payload:
|
|
5513
|
-
text:
|
|
5514
|
-
images:
|
|
5928
|
+
z16.object({
|
|
5929
|
+
type: z16.literal("deny_ask" /* DenyAsk */),
|
|
5930
|
+
taskId: z16.string(),
|
|
5931
|
+
payload: z16.object({
|
|
5932
|
+
text: z16.string().optional(),
|
|
5933
|
+
images: z16.array(z16.string()).optional()
|
|
5515
5934
|
}),
|
|
5516
|
-
timestamp:
|
|
5935
|
+
timestamp: z16.number()
|
|
5517
5936
|
})
|
|
5518
5937
|
]);
|
|
5519
5938
|
var ExtensionSocketEvents = /* @__PURE__ */ ((ExtensionSocketEvents2) => {
|
|
@@ -5536,25 +5955,25 @@ var TaskSocketEvents = /* @__PURE__ */ ((TaskSocketEvents2) => {
|
|
|
5536
5955
|
TaskSocketEvents2["RELAYED_COMMAND"] = "task:relayed_command";
|
|
5537
5956
|
return TaskSocketEvents2;
|
|
5538
5957
|
})(TaskSocketEvents || {});
|
|
5539
|
-
var usageStatsSchema =
|
|
5540
|
-
success:
|
|
5541
|
-
data:
|
|
5542
|
-
dates:
|
|
5958
|
+
var usageStatsSchema = z16.object({
|
|
5959
|
+
success: z16.boolean(),
|
|
5960
|
+
data: z16.object({
|
|
5961
|
+
dates: z16.array(z16.string()),
|
|
5543
5962
|
// Array of date strings
|
|
5544
|
-
tasks:
|
|
5963
|
+
tasks: z16.array(z16.number()),
|
|
5545
5964
|
// Array of task counts
|
|
5546
|
-
tokens:
|
|
5965
|
+
tokens: z16.array(z16.number()),
|
|
5547
5966
|
// Array of token counts
|
|
5548
|
-
costs:
|
|
5967
|
+
costs: z16.array(z16.number()),
|
|
5549
5968
|
// Array of costs in USD
|
|
5550
|
-
totals:
|
|
5551
|
-
tasks:
|
|
5552
|
-
tokens:
|
|
5553
|
-
cost:
|
|
5969
|
+
totals: z16.object({
|
|
5970
|
+
tasks: z16.number(),
|
|
5971
|
+
tokens: z16.number(),
|
|
5972
|
+
cost: z16.number()
|
|
5554
5973
|
// Total cost in USD
|
|
5555
5974
|
})
|
|
5556
5975
|
}),
|
|
5557
|
-
period:
|
|
5976
|
+
period: z16.number()
|
|
5558
5977
|
// Period in days (e.g., 30)
|
|
5559
5978
|
});
|
|
5560
5979
|
|
|
@@ -5565,18 +5984,18 @@ var COOKIE_CONSENT_EVENTS = {
|
|
|
5565
5984
|
};
|
|
5566
5985
|
|
|
5567
5986
|
// src/followup.ts
|
|
5568
|
-
import { z as
|
|
5569
|
-
var suggestionItemSchema =
|
|
5570
|
-
answer:
|
|
5571
|
-
mode:
|
|
5987
|
+
import { z as z17 } from "zod";
|
|
5988
|
+
var suggestionItemSchema = z17.object({
|
|
5989
|
+
answer: z17.string(),
|
|
5990
|
+
mode: z17.string().optional()
|
|
5572
5991
|
});
|
|
5573
|
-
var followUpDataSchema =
|
|
5574
|
-
question:
|
|
5575
|
-
suggest:
|
|
5992
|
+
var followUpDataSchema = z17.object({
|
|
5993
|
+
question: z17.string().optional(),
|
|
5994
|
+
suggest: z17.array(suggestionItemSchema).optional()
|
|
5576
5995
|
});
|
|
5577
5996
|
|
|
5578
5997
|
// src/ipc.ts
|
|
5579
|
-
import { z as
|
|
5998
|
+
import { z as z18 } from "zod";
|
|
5580
5999
|
var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
|
|
5581
6000
|
IpcMessageType2["Connect"] = "Connect";
|
|
5582
6001
|
IpcMessageType2["Disconnect"] = "Disconnect";
|
|
@@ -5590,84 +6009,92 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
|
|
|
5590
6009
|
IpcOrigin2["Server"] = "server";
|
|
5591
6010
|
return IpcOrigin2;
|
|
5592
6011
|
})(IpcOrigin || {});
|
|
5593
|
-
var ackSchema =
|
|
5594
|
-
clientId:
|
|
5595
|
-
pid:
|
|
5596
|
-
ppid:
|
|
6012
|
+
var ackSchema = z18.object({
|
|
6013
|
+
clientId: z18.string(),
|
|
6014
|
+
pid: z18.number(),
|
|
6015
|
+
ppid: z18.number()
|
|
5597
6016
|
});
|
|
5598
6017
|
var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
5599
6018
|
TaskCommandName2["StartNewTask"] = "StartNewTask";
|
|
5600
6019
|
TaskCommandName2["CancelTask"] = "CancelTask";
|
|
5601
6020
|
TaskCommandName2["CloseTask"] = "CloseTask";
|
|
5602
6021
|
TaskCommandName2["ResumeTask"] = "ResumeTask";
|
|
6022
|
+
TaskCommandName2["SendMessage"] = "SendMessage";
|
|
5603
6023
|
return TaskCommandName2;
|
|
5604
6024
|
})(TaskCommandName || {});
|
|
5605
|
-
var taskCommandSchema =
|
|
5606
|
-
|
|
5607
|
-
commandName:
|
|
5608
|
-
data:
|
|
6025
|
+
var taskCommandSchema = z18.discriminatedUnion("commandName", [
|
|
6026
|
+
z18.object({
|
|
6027
|
+
commandName: z18.literal("StartNewTask" /* StartNewTask */),
|
|
6028
|
+
data: z18.object({
|
|
5609
6029
|
configuration: rooCodeSettingsSchema,
|
|
5610
|
-
text:
|
|
5611
|
-
images:
|
|
5612
|
-
newTab:
|
|
6030
|
+
text: z18.string(),
|
|
6031
|
+
images: z18.array(z18.string()).optional(),
|
|
6032
|
+
newTab: z18.boolean().optional()
|
|
5613
6033
|
})
|
|
5614
6034
|
}),
|
|
5615
|
-
|
|
5616
|
-
commandName:
|
|
5617
|
-
data:
|
|
6035
|
+
z18.object({
|
|
6036
|
+
commandName: z18.literal("CancelTask" /* CancelTask */),
|
|
6037
|
+
data: z18.string()
|
|
6038
|
+
}),
|
|
6039
|
+
z18.object({
|
|
6040
|
+
commandName: z18.literal("CloseTask" /* CloseTask */),
|
|
6041
|
+
data: z18.string()
|
|
5618
6042
|
}),
|
|
5619
|
-
|
|
5620
|
-
commandName:
|
|
5621
|
-
data:
|
|
6043
|
+
z18.object({
|
|
6044
|
+
commandName: z18.literal("ResumeTask" /* ResumeTask */),
|
|
6045
|
+
data: z18.string()
|
|
5622
6046
|
}),
|
|
5623
|
-
|
|
5624
|
-
commandName:
|
|
5625
|
-
data:
|
|
6047
|
+
z18.object({
|
|
6048
|
+
commandName: z18.literal("SendMessage" /* SendMessage */),
|
|
6049
|
+
data: z18.object({
|
|
6050
|
+
text: z18.string().optional(),
|
|
6051
|
+
images: z18.array(z18.string()).optional()
|
|
6052
|
+
})
|
|
5626
6053
|
})
|
|
5627
6054
|
]);
|
|
5628
|
-
var ipcMessageSchema =
|
|
5629
|
-
|
|
5630
|
-
type:
|
|
5631
|
-
origin:
|
|
6055
|
+
var ipcMessageSchema = z18.discriminatedUnion("type", [
|
|
6056
|
+
z18.object({
|
|
6057
|
+
type: z18.literal("Ack" /* Ack */),
|
|
6058
|
+
origin: z18.literal("server" /* Server */),
|
|
5632
6059
|
data: ackSchema
|
|
5633
6060
|
}),
|
|
5634
|
-
|
|
5635
|
-
type:
|
|
5636
|
-
origin:
|
|
5637
|
-
clientId:
|
|
6061
|
+
z18.object({
|
|
6062
|
+
type: z18.literal("TaskCommand" /* TaskCommand */),
|
|
6063
|
+
origin: z18.literal("client" /* Client */),
|
|
6064
|
+
clientId: z18.string(),
|
|
5638
6065
|
data: taskCommandSchema
|
|
5639
6066
|
}),
|
|
5640
|
-
|
|
5641
|
-
type:
|
|
5642
|
-
origin:
|
|
5643
|
-
relayClientId:
|
|
6067
|
+
z18.object({
|
|
6068
|
+
type: z18.literal("TaskEvent" /* TaskEvent */),
|
|
6069
|
+
origin: z18.literal("server" /* Server */),
|
|
6070
|
+
relayClientId: z18.string().optional(),
|
|
5644
6071
|
data: taskEventSchema
|
|
5645
6072
|
})
|
|
5646
6073
|
]);
|
|
5647
6074
|
|
|
5648
6075
|
// src/mcp.ts
|
|
5649
|
-
import { z as
|
|
5650
|
-
var mcpExecutionStatusSchema =
|
|
5651
|
-
|
|
5652
|
-
executionId:
|
|
5653
|
-
status:
|
|
5654
|
-
serverName:
|
|
5655
|
-
toolName:
|
|
6076
|
+
import { z as z19 } from "zod";
|
|
6077
|
+
var mcpExecutionStatusSchema = z19.discriminatedUnion("status", [
|
|
6078
|
+
z19.object({
|
|
6079
|
+
executionId: z19.string(),
|
|
6080
|
+
status: z19.literal("started"),
|
|
6081
|
+
serverName: z19.string(),
|
|
6082
|
+
toolName: z19.string()
|
|
5656
6083
|
}),
|
|
5657
|
-
|
|
5658
|
-
executionId:
|
|
5659
|
-
status:
|
|
5660
|
-
response:
|
|
6084
|
+
z19.object({
|
|
6085
|
+
executionId: z19.string(),
|
|
6086
|
+
status: z19.literal("output"),
|
|
6087
|
+
response: z19.string()
|
|
5661
6088
|
}),
|
|
5662
|
-
|
|
5663
|
-
executionId:
|
|
5664
|
-
status:
|
|
5665
|
-
response:
|
|
6089
|
+
z19.object({
|
|
6090
|
+
executionId: z19.string(),
|
|
6091
|
+
status: z19.literal("completed"),
|
|
6092
|
+
response: z19.string().optional()
|
|
5666
6093
|
}),
|
|
5667
|
-
|
|
5668
|
-
executionId:
|
|
5669
|
-
status:
|
|
5670
|
-
error:
|
|
6094
|
+
z19.object({
|
|
6095
|
+
executionId: z19.string(),
|
|
6096
|
+
status: z19.literal("error"),
|
|
6097
|
+
error: z19.string().optional()
|
|
5671
6098
|
})
|
|
5672
6099
|
]);
|
|
5673
6100
|
|
|
@@ -5677,40 +6104,40 @@ function shouldUseSingleFileRead(modelId) {
|
|
|
5677
6104
|
}
|
|
5678
6105
|
|
|
5679
6106
|
// src/todo.ts
|
|
5680
|
-
import { z as
|
|
5681
|
-
var todoStatusSchema =
|
|
5682
|
-
var todoItemSchema =
|
|
5683
|
-
id:
|
|
5684
|
-
content:
|
|
6107
|
+
import { z as z20 } from "zod";
|
|
6108
|
+
var todoStatusSchema = z20.enum(["pending", "in_progress", "completed"]);
|
|
6109
|
+
var todoItemSchema = z20.object({
|
|
6110
|
+
id: z20.string(),
|
|
6111
|
+
content: z20.string(),
|
|
5685
6112
|
status: todoStatusSchema
|
|
5686
6113
|
});
|
|
5687
6114
|
|
|
5688
6115
|
// src/terminal.ts
|
|
5689
|
-
import { z as
|
|
5690
|
-
var commandExecutionStatusSchema =
|
|
5691
|
-
|
|
5692
|
-
executionId:
|
|
5693
|
-
status:
|
|
5694
|
-
pid:
|
|
5695
|
-
command:
|
|
6116
|
+
import { z as z21 } from "zod";
|
|
6117
|
+
var commandExecutionStatusSchema = z21.discriminatedUnion("status", [
|
|
6118
|
+
z21.object({
|
|
6119
|
+
executionId: z21.string(),
|
|
6120
|
+
status: z21.literal("started"),
|
|
6121
|
+
pid: z21.number().optional(),
|
|
6122
|
+
command: z21.string()
|
|
5696
6123
|
}),
|
|
5697
|
-
|
|
5698
|
-
executionId:
|
|
5699
|
-
status:
|
|
5700
|
-
output:
|
|
6124
|
+
z21.object({
|
|
6125
|
+
executionId: z21.string(),
|
|
6126
|
+
status: z21.literal("output"),
|
|
6127
|
+
output: z21.string()
|
|
5701
6128
|
}),
|
|
5702
|
-
|
|
5703
|
-
executionId:
|
|
5704
|
-
status:
|
|
5705
|
-
exitCode:
|
|
6129
|
+
z21.object({
|
|
6130
|
+
executionId: z21.string(),
|
|
6131
|
+
status: z21.literal("exited"),
|
|
6132
|
+
exitCode: z21.number().optional()
|
|
5706
6133
|
}),
|
|
5707
|
-
|
|
5708
|
-
executionId:
|
|
5709
|
-
status:
|
|
6134
|
+
z21.object({
|
|
6135
|
+
executionId: z21.string(),
|
|
6136
|
+
status: z21.literal("fallback")
|
|
5710
6137
|
}),
|
|
5711
|
-
|
|
5712
|
-
executionId:
|
|
5713
|
-
status:
|
|
6138
|
+
z21.object({
|
|
6139
|
+
executionId: z21.string(),
|
|
6140
|
+
status: z21.literal("timeout")
|
|
5714
6141
|
})
|
|
5715
6142
|
]);
|
|
5716
6143
|
export {
|
|
@@ -5720,6 +6147,7 @@ export {
|
|
|
5720
6147
|
BEDROCK_1M_CONTEXT_MODEL_IDS,
|
|
5721
6148
|
BEDROCK_DEFAULT_CONTEXT,
|
|
5722
6149
|
BEDROCK_DEFAULT_TEMPERATURE,
|
|
6150
|
+
BEDROCK_GLOBAL_INFERENCE_MODEL_IDS,
|
|
5723
6151
|
BEDROCK_MAX_TOKENS,
|
|
5724
6152
|
BEDROCK_REGIONS,
|
|
5725
6153
|
CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
|
|
@@ -5728,6 +6156,7 @@ export {
|
|
|
5728
6156
|
COOKIE_CONSENT_EVENTS,
|
|
5729
6157
|
ConnectionState,
|
|
5730
6158
|
DEEP_SEEK_DEFAULT_TEMPERATURE,
|
|
6159
|
+
DEFAULT_CHECKPOINT_TIMEOUT_SECONDS,
|
|
5731
6160
|
DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
|
|
5732
6161
|
DEFAULT_MODES,
|
|
5733
6162
|
DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
|
|
@@ -5743,7 +6172,6 @@ export {
|
|
|
5743
6172
|
GLOBAL_SECRET_KEYS,
|
|
5744
6173
|
GLOBAL_SETTINGS_KEYS,
|
|
5745
6174
|
GLOBAL_STATE_KEYS,
|
|
5746
|
-
GPT5_DEFAULT_TEMPERATURE,
|
|
5747
6175
|
HEARTBEAT_INTERVAL_MS,
|
|
5748
6176
|
HUGGINGFACE_API_URL,
|
|
5749
6177
|
HUGGINGFACE_CACHE_DURATION,
|
|
@@ -5757,15 +6185,16 @@ export {
|
|
|
5757
6185
|
IO_INTELLIGENCE_CACHE_DURATION,
|
|
5758
6186
|
IpcMessageType,
|
|
5759
6187
|
IpcOrigin,
|
|
5760
|
-
LITELLM_COMPUTER_USE_MODELS,
|
|
5761
6188
|
LMSTUDIO_DEFAULT_TEMPERATURE,
|
|
6189
|
+
MAX_CHECKPOINT_TIMEOUT_SECONDS,
|
|
6190
|
+
MINIMAX_DEFAULT_TEMPERATURE,
|
|
6191
|
+
MIN_CHECKPOINT_TIMEOUT_SECONDS,
|
|
5762
6192
|
MISTRAL_DEFAULT_TEMPERATURE,
|
|
5763
6193
|
MODELS_BY_PROVIDER,
|
|
5764
6194
|
MOONSHOT_DEFAULT_TEMPERATURE,
|
|
5765
6195
|
OPENAI_AZURE_AI_INFERENCE_PATH,
|
|
5766
6196
|
OPENAI_NATIVE_DEFAULT_TEMPERATURE,
|
|
5767
6197
|
OPENROUTER_DEFAULT_PROVIDER_NAME,
|
|
5768
|
-
OPEN_ROUTER_COMPUTER_USE_MODELS,
|
|
5769
6198
|
OPEN_ROUTER_PROMPT_CACHING_MODELS,
|
|
5770
6199
|
OPEN_ROUTER_REASONING_BUDGET_MODELS,
|
|
5771
6200
|
OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS,
|
|
@@ -5773,7 +6202,11 @@ export {
|
|
|
5773
6202
|
ORGANIZATION_DEFAULT,
|
|
5774
6203
|
PROVIDER_SETTINGS_KEYS,
|
|
5775
6204
|
RooCodeEventName,
|
|
6205
|
+
RooModelSchema,
|
|
6206
|
+
RooModelsResponseSchema,
|
|
6207
|
+
RooPricingSchema,
|
|
5776
6208
|
SECRET_STATE_KEYS,
|
|
6209
|
+
TOOL_PROTOCOL,
|
|
5777
6210
|
TaskBridgeCommandName,
|
|
5778
6211
|
TaskBridgeEventName,
|
|
5779
6212
|
TaskCommandName,
|
|
@@ -5797,6 +6230,7 @@ export {
|
|
|
5797
6230
|
cerebrasDefaultModelId,
|
|
5798
6231
|
cerebrasModels,
|
|
5799
6232
|
chutesDefaultModelId,
|
|
6233
|
+
chutesDefaultModelInfo,
|
|
5800
6234
|
chutesModels,
|
|
5801
6235
|
claudeCodeDefaultModelId,
|
|
5802
6236
|
claudeCodeModels,
|
|
@@ -5844,7 +6278,9 @@ export {
|
|
|
5844
6278
|
geminiModels,
|
|
5845
6279
|
getApiProtocol,
|
|
5846
6280
|
getClaudeCodeModelId,
|
|
6281
|
+
getEffectiveProtocol,
|
|
5847
6282
|
getModelId,
|
|
6283
|
+
getProviderDefaultModelId,
|
|
5848
6284
|
gitPropertiesSchema,
|
|
5849
6285
|
glamaDefaultModelId,
|
|
5850
6286
|
glamaDefaultModelInfo,
|
|
@@ -5874,6 +6310,8 @@ export {
|
|
|
5874
6310
|
isLanguage,
|
|
5875
6311
|
isLocalProvider,
|
|
5876
6312
|
isModelParameter,
|
|
6313
|
+
isNativeProtocol,
|
|
6314
|
+
isNonBlockingAsk,
|
|
5877
6315
|
isProviderName,
|
|
5878
6316
|
isResumableAsk,
|
|
5879
6317
|
isSecretStateKey,
|
|
@@ -5893,6 +6331,8 @@ export {
|
|
|
5893
6331
|
mcpInstallationMethodSchema,
|
|
5894
6332
|
mcpMarketplaceItemSchema,
|
|
5895
6333
|
mcpParameterSchema,
|
|
6334
|
+
minimaxDefaultModelId,
|
|
6335
|
+
minimaxModels,
|
|
5896
6336
|
mistralDefaultModelId,
|
|
5897
6337
|
mistralModels,
|
|
5898
6338
|
modeConfigSchema,
|
|
@@ -5904,6 +6344,7 @@ export {
|
|
|
5904
6344
|
modelParametersSchema,
|
|
5905
6345
|
moonshotDefaultModelId,
|
|
5906
6346
|
moonshotModels,
|
|
6347
|
+
nonBlockingAsks,
|
|
5907
6348
|
ollamaDefaultModelId,
|
|
5908
6349
|
ollamaDefaultModelInfo,
|
|
5909
6350
|
openAiModelInfoSaneDefaults,
|
|
@@ -5926,8 +6367,12 @@ export {
|
|
|
5926
6367
|
queuedMessageSchema,
|
|
5927
6368
|
qwenCodeDefaultModelId,
|
|
5928
6369
|
qwenCodeModels,
|
|
6370
|
+
reasoningEffortExtendedSchema,
|
|
6371
|
+
reasoningEffortSettingSchema,
|
|
6372
|
+
reasoningEffortSettingValues,
|
|
5929
6373
|
reasoningEffortWithMinimalSchema,
|
|
5930
6374
|
reasoningEfforts,
|
|
6375
|
+
reasoningEffortsExtended,
|
|
5931
6376
|
reasoningEffortsSchema,
|
|
5932
6377
|
requestyDefaultModelId,
|
|
5933
6378
|
requestyDefaultModelInfo,
|
|
@@ -5936,6 +6381,7 @@ export {
|
|
|
5936
6381
|
rooCodeSettingsSchema,
|
|
5937
6382
|
rooCodeTelemetryEventSchema,
|
|
5938
6383
|
rooDefaultModelId,
|
|
6384
|
+
rooModelDefaults,
|
|
5939
6385
|
rooModels,
|
|
5940
6386
|
sambaNovaDefaultModelId,
|
|
5941
6387
|
sambaNovaModels,
|