@roo-code/types 1.78.0 → 1.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +104 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +151 -98
- package/dist/index.d.ts +151 -98
- package/dist/index.js +92 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3781,52 +3781,63 @@ var deepInfraDefaultModelInfo = {
|
|
|
3781
3781
|
};
|
|
3782
3782
|
|
|
3783
3783
|
// src/provider-settings.ts
|
|
3784
|
+
var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
|
|
3785
|
+
var dynamicProviders = [
|
|
3786
|
+
"openrouter",
|
|
3787
|
+
"vercel-ai-gateway",
|
|
3788
|
+
"huggingface",
|
|
3789
|
+
"litellm",
|
|
3790
|
+
"deepinfra",
|
|
3791
|
+
"io-intelligence",
|
|
3792
|
+
"requesty",
|
|
3793
|
+
"unbound",
|
|
3794
|
+
"glama"
|
|
3795
|
+
];
|
|
3796
|
+
var isDynamicProvider = (key) => dynamicProviders.includes(key);
|
|
3797
|
+
var localProviders = ["ollama", "lmstudio"];
|
|
3798
|
+
var isLocalProvider = (key) => localProviders.includes(key);
|
|
3799
|
+
var internalProviders = ["vscode-lm"];
|
|
3800
|
+
var isInternalProvider = (key) => internalProviders.includes(key);
|
|
3801
|
+
var customProviders = ["openai"];
|
|
3802
|
+
var isCustomProvider = (key) => customProviders.includes(key);
|
|
3803
|
+
var fauxProviders = ["fake-ai", "human-relay"];
|
|
3804
|
+
var isFauxProvider = (key) => fauxProviders.includes(key);
|
|
3784
3805
|
var providerNames = [
|
|
3806
|
+
...dynamicProviders,
|
|
3807
|
+
...localProviders,
|
|
3808
|
+
...internalProviders,
|
|
3809
|
+
...customProviders,
|
|
3810
|
+
...fauxProviders,
|
|
3785
3811
|
"anthropic",
|
|
3786
|
-
"claude-code",
|
|
3787
|
-
"glama",
|
|
3788
|
-
"openrouter",
|
|
3789
3812
|
"bedrock",
|
|
3790
|
-
"
|
|
3791
|
-
"
|
|
3792
|
-
"
|
|
3793
|
-
"
|
|
3794
|
-
"
|
|
3813
|
+
"cerebras",
|
|
3814
|
+
"chutes",
|
|
3815
|
+
"claude-code",
|
|
3816
|
+
"doubao",
|
|
3817
|
+
"deepseek",
|
|
3818
|
+
"featherless",
|
|
3819
|
+
"fireworks",
|
|
3795
3820
|
"gemini",
|
|
3796
3821
|
"gemini-cli",
|
|
3797
|
-
"
|
|
3822
|
+
"groq",
|
|
3798
3823
|
"mistral",
|
|
3799
3824
|
"moonshot",
|
|
3800
|
-
"
|
|
3801
|
-
"deepinfra",
|
|
3802
|
-
"doubao",
|
|
3825
|
+
"openai-native",
|
|
3803
3826
|
"qwen-code",
|
|
3804
|
-
"unbound",
|
|
3805
|
-
"requesty",
|
|
3806
|
-
"human-relay",
|
|
3807
|
-
"fake-ai",
|
|
3808
|
-
"xai",
|
|
3809
|
-
"groq",
|
|
3810
|
-
"chutes",
|
|
3811
|
-
"litellm",
|
|
3812
|
-
"huggingface",
|
|
3813
|
-
"cerebras",
|
|
3814
|
-
"sambanova",
|
|
3815
|
-
"zai",
|
|
3816
|
-
"fireworks",
|
|
3817
|
-
"featherless",
|
|
3818
|
-
"io-intelligence",
|
|
3819
3827
|
"roo",
|
|
3820
|
-
"
|
|
3828
|
+
"sambanova",
|
|
3829
|
+
"vertex",
|
|
3830
|
+
"xai",
|
|
3831
|
+
"zai"
|
|
3821
3832
|
];
|
|
3822
3833
|
var providerNamesSchema = z7.enum(providerNames);
|
|
3834
|
+
var isProviderName = (key) => typeof key === "string" && providerNames.includes(key);
|
|
3823
3835
|
var providerSettingsEntrySchema = z7.object({
|
|
3824
3836
|
id: z7.string(),
|
|
3825
3837
|
name: z7.string(),
|
|
3826
3838
|
apiProvider: providerNamesSchema.optional(),
|
|
3827
3839
|
modelId: z7.string().optional()
|
|
3828
3840
|
});
|
|
3829
|
-
var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
|
|
3830
3841
|
var baseProviderSettingsSchema = z7.object({
|
|
3831
3842
|
includeMaxTokens: z7.boolean().optional(),
|
|
3832
3843
|
diffEnabled: z7.boolean().optional(),
|
|
@@ -3851,7 +3862,7 @@ var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
|
3851
3862
|
anthropicBaseUrl: z7.string().optional(),
|
|
3852
3863
|
anthropicUseAuthToken: z7.boolean().optional(),
|
|
3853
3864
|
anthropicBeta1MContext: z7.boolean().optional()
|
|
3854
|
-
// Enable 'context-1m-2025-08-07' beta for 1M context window
|
|
3865
|
+
// Enable 'context-1m-2025-08-07' beta for 1M context window.
|
|
3855
3866
|
});
|
|
3856
3867
|
var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
3857
3868
|
claudeCodePath: z7.string().optional(),
|
|
@@ -3884,7 +3895,7 @@ var bedrockSchema = apiModelIdProviderModelSchema.extend({
|
|
|
3884
3895
|
awsBedrockEndpointEnabled: z7.boolean().optional(),
|
|
3885
3896
|
awsBedrockEndpoint: z7.string().optional(),
|
|
3886
3897
|
awsBedrock1MContext: z7.boolean().optional()
|
|
3887
|
-
// Enable 'context-1m-2025-08-07' beta for 1M context window
|
|
3898
|
+
// Enable 'context-1m-2025-08-07' beta for 1M context window.
|
|
3888
3899
|
});
|
|
3889
3900
|
var vertexSchema = apiModelIdProviderModelSchema.extend({
|
|
3890
3901
|
vertexKeyFile: z7.string().optional(),
|
|
@@ -4023,7 +4034,7 @@ var qwenCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
|
4023
4034
|
qwenCodeOauthPath: z7.string().optional()
|
|
4024
4035
|
});
|
|
4025
4036
|
var rooSchema = apiModelIdProviderModelSchema.extend({
|
|
4026
|
-
// No additional fields needed - uses cloud authentication
|
|
4037
|
+
// No additional fields needed - uses cloud authentication.
|
|
4027
4038
|
});
|
|
4028
4039
|
var vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
|
|
4029
4040
|
vercelAiGatewayApiKey: z7.string().optional(),
|
|
@@ -4116,7 +4127,7 @@ var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscrimina
|
|
|
4116
4127
|
z7.object({ id: z7.string().optional() })
|
|
4117
4128
|
);
|
|
4118
4129
|
var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
|
|
4119
|
-
var
|
|
4130
|
+
var modelIdKeys = [
|
|
4120
4131
|
"apiModelId",
|
|
4121
4132
|
"glamaModelId",
|
|
4122
4133
|
"openRouterModelId",
|
|
@@ -4133,9 +4144,44 @@ var MODEL_ID_KEYS = [
|
|
|
4133
4144
|
"deepInfraModelId"
|
|
4134
4145
|
];
|
|
4135
4146
|
var getModelId = (settings) => {
|
|
4136
|
-
const modelIdKey =
|
|
4147
|
+
const modelIdKey = modelIdKeys.find((key) => settings[key]);
|
|
4137
4148
|
return modelIdKey ? settings[modelIdKey] : void 0;
|
|
4138
4149
|
};
|
|
4150
|
+
var isTypicalProvider = (key) => isProviderName(key) && !isInternalProvider(key) && !isCustomProvider(key) && !isFauxProvider(key);
|
|
4151
|
+
var modelIdKeysByProvider = {
|
|
4152
|
+
anthropic: "apiModelId",
|
|
4153
|
+
"claude-code": "apiModelId",
|
|
4154
|
+
glama: "glamaModelId",
|
|
4155
|
+
openrouter: "openRouterModelId",
|
|
4156
|
+
bedrock: "apiModelId",
|
|
4157
|
+
vertex: "apiModelId",
|
|
4158
|
+
"openai-native": "openAiModelId",
|
|
4159
|
+
ollama: "ollamaModelId",
|
|
4160
|
+
lmstudio: "lmStudioModelId",
|
|
4161
|
+
gemini: "apiModelId",
|
|
4162
|
+
"gemini-cli": "apiModelId",
|
|
4163
|
+
mistral: "apiModelId",
|
|
4164
|
+
moonshot: "apiModelId",
|
|
4165
|
+
deepseek: "apiModelId",
|
|
4166
|
+
deepinfra: "deepInfraModelId",
|
|
4167
|
+
doubao: "apiModelId",
|
|
4168
|
+
"qwen-code": "apiModelId",
|
|
4169
|
+
unbound: "unboundModelId",
|
|
4170
|
+
requesty: "requestyModelId",
|
|
4171
|
+
xai: "apiModelId",
|
|
4172
|
+
groq: "apiModelId",
|
|
4173
|
+
chutes: "apiModelId",
|
|
4174
|
+
litellm: "litellmModelId",
|
|
4175
|
+
huggingface: "huggingFaceModelId",
|
|
4176
|
+
cerebras: "apiModelId",
|
|
4177
|
+
sambanova: "apiModelId",
|
|
4178
|
+
zai: "apiModelId",
|
|
4179
|
+
fireworks: "apiModelId",
|
|
4180
|
+
featherless: "apiModelId",
|
|
4181
|
+
"io-intelligence": "ioIntelligenceModelId",
|
|
4182
|
+
roo: "apiModelId",
|
|
4183
|
+
"vercel-ai-gateway": "vercelAiGatewayModelId"
|
|
4184
|
+
};
|
|
4139
4185
|
var ANTHROPIC_STYLE_PROVIDERS = ["anthropic", "claude-code", "bedrock"];
|
|
4140
4186
|
var getApiProtocol = (provider, modelId) => {
|
|
4141
4187
|
if (provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider)) {
|
|
@@ -4242,17 +4288,6 @@ var MODELS_BY_PROVIDER = {
|
|
|
4242
4288
|
deepinfra: { id: "deepinfra", label: "DeepInfra", models: [] },
|
|
4243
4289
|
"vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] }
|
|
4244
4290
|
};
|
|
4245
|
-
var dynamicProviders = [
|
|
4246
|
-
"glama",
|
|
4247
|
-
"huggingface",
|
|
4248
|
-
"litellm",
|
|
4249
|
-
"openrouter",
|
|
4250
|
-
"requesty",
|
|
4251
|
-
"unbound",
|
|
4252
|
-
"deepinfra",
|
|
4253
|
-
"vercel-ai-gateway"
|
|
4254
|
-
];
|
|
4255
|
-
var isDynamicProvider = (key) => dynamicProviders.includes(key);
|
|
4256
4291
|
|
|
4257
4292
|
// src/history.ts
|
|
4258
4293
|
import { z as z8 } from "zod";
|
|
@@ -5441,7 +5476,6 @@ export {
|
|
|
5441
5476
|
LMSTUDIO_DEFAULT_TEMPERATURE,
|
|
5442
5477
|
MISTRAL_DEFAULT_TEMPERATURE,
|
|
5443
5478
|
MODELS_BY_PROVIDER,
|
|
5444
|
-
MODEL_ID_KEYS,
|
|
5445
5479
|
MOONSHOT_DEFAULT_TEMPERATURE,
|
|
5446
5480
|
OPENAI_AZURE_AI_INFERENCE_PATH,
|
|
5447
5481
|
OPENAI_NATIVE_DEFAULT_TEMPERATURE,
|
|
@@ -5497,6 +5531,7 @@ export {
|
|
|
5497
5531
|
convertModelNameForVertex,
|
|
5498
5532
|
customModePromptsSchema,
|
|
5499
5533
|
customModesSettingsSchema,
|
|
5534
|
+
customProviders,
|
|
5500
5535
|
customSupportPromptsSchema,
|
|
5501
5536
|
deepInfraDefaultModelId,
|
|
5502
5537
|
deepInfraDefaultModelInfo,
|
|
@@ -5514,6 +5549,7 @@ export {
|
|
|
5514
5549
|
extensionBridgeCommandSchema,
|
|
5515
5550
|
extensionBridgeEventSchema,
|
|
5516
5551
|
extensionInstanceSchema,
|
|
5552
|
+
fauxProviders,
|
|
5517
5553
|
featherlessDefaultModelId,
|
|
5518
5554
|
featherlessModels,
|
|
5519
5555
|
fireworksDefaultModelId,
|
|
@@ -5536,26 +5572,34 @@ export {
|
|
|
5536
5572
|
idleAsks,
|
|
5537
5573
|
installMarketplaceItemOptionsSchema,
|
|
5538
5574
|
interactiveAsks,
|
|
5575
|
+
internalProviders,
|
|
5539
5576
|
internationalZAiDefaultModelId,
|
|
5540
5577
|
internationalZAiModels,
|
|
5541
5578
|
ioIntelligenceDefaultBaseUrl,
|
|
5542
5579
|
ioIntelligenceDefaultModelId,
|
|
5543
5580
|
ioIntelligenceModels,
|
|
5544
5581
|
ipcMessageSchema,
|
|
5582
|
+
isCustomProvider,
|
|
5545
5583
|
isDynamicProvider,
|
|
5584
|
+
isFauxProvider,
|
|
5546
5585
|
isGlobalStateKey,
|
|
5547
5586
|
isIdleAsk,
|
|
5548
5587
|
isInteractiveAsk,
|
|
5588
|
+
isInternalProvider,
|
|
5549
5589
|
isLanguage,
|
|
5590
|
+
isLocalProvider,
|
|
5550
5591
|
isModelParameter,
|
|
5592
|
+
isProviderName,
|
|
5551
5593
|
isResumableAsk,
|
|
5552
5594
|
isSecretStateKey,
|
|
5595
|
+
isTypicalProvider,
|
|
5553
5596
|
lMStudioDefaultModelId,
|
|
5554
5597
|
lMStudioDefaultModelInfo,
|
|
5555
5598
|
languages,
|
|
5556
5599
|
languagesSchema,
|
|
5557
5600
|
litellmDefaultModelId,
|
|
5558
5601
|
litellmDefaultModelInfo,
|
|
5602
|
+
localProviders,
|
|
5559
5603
|
mainlandZAiDefaultModelId,
|
|
5560
5604
|
mainlandZAiModels,
|
|
5561
5605
|
marketplaceItemSchema,
|
|
@@ -5568,6 +5612,8 @@ export {
|
|
|
5568
5612
|
mistralModels,
|
|
5569
5613
|
modeConfigSchema,
|
|
5570
5614
|
modeMarketplaceItemSchema,
|
|
5615
|
+
modelIdKeys,
|
|
5616
|
+
modelIdKeysByProvider,
|
|
5571
5617
|
modelInfoSchema,
|
|
5572
5618
|
modelParameters,
|
|
5573
5619
|
modelParametersSchema,
|