diff --git a/packages/types/src/model.ts b/packages/types/src/model.ts index 3bd66782cf..a70ebdd663 100644 --- a/packages/types/src/model.ts +++ b/packages/types/src/model.ts @@ -32,7 +32,7 @@ export const modelInfoSchema = z.object({ maxThinkingTokens: z.number().nullish(), contextWindow: z.number(), supportsImages: z.boolean().optional(), - supportsComputerUse: z.boolean().optional(), + supportsBrowserUse: z.boolean().optional(), supportsPromptCache: z.boolean(), supportsReasoningBudget: z.boolean().optional(), requiredReasoningBudget: z.boolean().optional(), diff --git a/packages/types/src/providers/anthropic.ts b/packages/types/src/providers/anthropic.ts index d0f1629ee9..4835ce0691 100644 --- a/packages/types/src/providers/anthropic.ts +++ b/packages/types/src/providers/anthropic.ts @@ -10,7 +10,7 @@ export const anthropicModels = { maxTokens: 64_000, // Overridden to 8k if `enableReasoningEffort` is false. contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, // $3 per million input tokens outputPrice: 15.0, // $15 per million output tokens @@ -22,7 +22,7 @@ export const anthropicModels = { maxTokens: 32_000, // Overridden to 8k if `enableReasoningEffort` is false. contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 15.0, // $15 per million input tokens outputPrice: 75.0, // $75 per million output tokens @@ -34,7 +34,7 @@ export const anthropicModels = { maxTokens: 128_000, // Unlocked by passing `beta` flag to the model. Otherwise, it's 64k. contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, // $3 per million input tokens outputPrice: 15.0, // $15 per million output tokens @@ -47,7 +47,7 @@ export const anthropicModels = { maxTokens: 8192, // Since we already have a `:thinking` virtual model we aren't setting `supportsReasoningBudget: true` here. contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, // $3 per million input tokens outputPrice: 15.0, // $15 per million output tokens @@ -58,7 +58,7 @@ export const anthropicModels = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, // $3 per million input tokens outputPrice: 15.0, // $15 per million output tokens diff --git a/packages/types/src/providers/bedrock.ts b/packages/types/src/providers/bedrock.ts index a15f041252..f54b3e42a4 100644 --- a/packages/types/src/providers/bedrock.ts +++ b/packages/types/src/providers/bedrock.ts @@ -17,7 +17,7 @@ export const bedrockModels = { maxTokens: 5000, contextWindow: 300_000, supportsImages: true, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: true, inputPrice: 0.8, outputPrice: 3.2, @@ -31,7 +31,7 @@ export const bedrockModels = { maxTokens: 5000, contextWindow: 300_000, supportsImages: true, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 1.0, outputPrice: 4.0, @@ -43,7 +43,7 @@ export const bedrockModels = { maxTokens: 5000, contextWindow: 300_000, supportsImages: true, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: true, inputPrice: 0.06, outputPrice: 0.24, @@ -57,7 +57,7 @@ export const bedrockModels = { maxTokens: 5000, contextWindow: 128_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: true, inputPrice: 0.035, outputPrice: 0.14, @@ -71,7 +71,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, supportsReasoningBudget: true, inputPrice: 3.0, @@ -86,7 +86,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, supportsReasoningBudget: true, inputPrice: 15.0, @@ -101,7 +101,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, supportsReasoningBudget: true, inputPrice: 3.0, @@ -116,7 +116,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, @@ -210,7 +210,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 128_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.72, outputPrice: 0.72, @@ -220,7 +220,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 128_000, supportsImages: true, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.72, outputPrice: 0.72, @@ -230,7 +230,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 128_000, supportsImages: true, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.16, outputPrice: 0.16, @@ -240,7 +240,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 128_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.15, outputPrice: 0.15, @@ -250,7 +250,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 128_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.1, outputPrice: 0.1, @@ -260,7 +260,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 128_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 2.4, outputPrice: 2.4, @@ -270,7 +270,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 128_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.72, outputPrice: 0.72, @@ -280,7 +280,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 128_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.9, outputPrice: 0.9, @@ -290,7 +290,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 8_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.22, outputPrice: 0.22, @@ -300,7 +300,7 @@ export const bedrockModels = { maxTokens: 2048, contextWindow: 8_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 2.65, outputPrice: 3.5, @@ -309,7 +309,7 @@ export const bedrockModels = { maxTokens: 2048, contextWindow: 4_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.3, outputPrice: 0.6, @@ -318,7 +318,7 @@ export const bedrockModels = { maxTokens: 4096, contextWindow: 8_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.15, outputPrice: 0.2, @@ -328,7 +328,7 @@ export const bedrockModels = { maxTokens: 4096, contextWindow: 8_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.2, outputPrice: 0.6, @@ -338,7 +338,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 8_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.1, description: "Amazon Titan Text Embeddings", @@ -347,7 +347,7 @@ export const bedrockModels = { maxTokens: 8192, contextWindow: 8_000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 0.02, description: "Amazon Titan Text Embeddings V2", diff --git a/packages/types/src/providers/gemini.ts b/packages/types/src/providers/gemini.ts index a7225c7330..3e0a54e9c2 100644 --- a/packages/types/src/providers/gemini.ts +++ b/packages/types/src/providers/gemini.ts @@ -10,6 +10,7 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0.15, outputPrice: 3.5, @@ -21,6 +22,7 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0.15, outputPrice: 0.6, @@ -29,6 +31,7 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 0.15, outputPrice: 3.5, @@ -42,6 +45,7 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 0.15, outputPrice: 0.6, @@ -52,6 +56,7 @@ export const geminiModels = { maxTokens: 64_000, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 0.3, outputPrice: 2.5, @@ -64,6 +69,7 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -72,6 +78,7 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 2.5, // This is the pricing for prompts above 200k tokens. outputPrice: 15, @@ -96,6 +103,7 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 2.5, // This is the pricing for prompts above 200k tokens. outputPrice: 15, @@ -120,6 +128,7 @@ export const geminiModels = { maxTokens: 65_535, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 2.5, // This is the pricing for prompts above 200k tokens. outputPrice: 15, @@ -146,6 +155,7 @@ export const geminiModels = { maxTokens: 64_000, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 2.5, // This is the pricing for prompts above 200k tokens. outputPrice: 15, @@ -173,6 +183,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 0.1, outputPrice: 0.4, @@ -183,6 +194,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -191,6 +203,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 2_097_152, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -199,6 +212,7 @@ export const geminiModels = { maxTokens: 65_536, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -207,6 +221,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 32_767, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -215,6 +230,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -223,6 +239,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 0.15, // This is the pricing for prompts above 128k tokens. outputPrice: 0.6, @@ -247,6 +264,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -255,6 +273,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -263,6 +282,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 2_097_152, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -271,6 +291,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 2_097_152, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -279,6 +300,7 @@ export const geminiModels = { maxTokens: 8192, contextWindow: 2_097_152, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 0, outputPrice: 0, @@ -287,6 +309,7 @@ export const geminiModels = { maxTokens: 64_000, contextWindow: 1_048_576, supportsImages: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 0.1, outputPrice: 0.4, diff --git a/packages/types/src/providers/glama.ts b/packages/types/src/providers/glama.ts index ea05d2c47f..06cb665682 100644 --- a/packages/types/src/providers/glama.ts +++ b/packages/types/src/providers/glama.ts @@ -7,7 +7,7 @@ export const glamaDefaultModelInfo: ModelInfo = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, diff --git a/packages/types/src/providers/lite-llm.ts b/packages/types/src/providers/lite-llm.ts index 303aa2b298..cd4fa3ac63 100644 --- a/packages/types/src/providers/lite-llm.ts +++ b/packages/types/src/providers/lite-llm.ts @@ -7,7 +7,7 @@ export const litellmDefaultModelInfo: ModelInfo = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, diff --git a/packages/types/src/providers/lm-studio.ts b/packages/types/src/providers/lm-studio.ts index 9e39ae5608..8c928ab19e 100644 --- a/packages/types/src/providers/lm-studio.ts +++ b/packages/types/src/providers/lm-studio.ts @@ -9,7 +9,7 @@ export const lMStudioDefaultModelInfo: ModelInfo = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 0, outputPrice: 0, diff --git a/packages/types/src/providers/ollama.ts b/packages/types/src/providers/ollama.ts index d269da8f4d..a15c7062e0 100644 --- a/packages/types/src/providers/ollama.ts +++ b/packages/types/src/providers/ollama.ts @@ -7,7 +7,7 @@ export const ollamaDefaultModelInfo: ModelInfo = { maxTokens: 4096, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 0, outputPrice: 0, diff --git a/packages/types/src/providers/openrouter.ts b/packages/types/src/providers/openrouter.ts index bbdbc7e732..c3df5430f7 100644 --- a/packages/types/src/providers/openrouter.ts +++ b/packages/types/src/providers/openrouter.ts @@ -7,7 +7,7 @@ export const openRouterDefaultModelInfo: ModelInfo = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, diff --git a/packages/types/src/providers/requesty.ts b/packages/types/src/providers/requesty.ts index 8bc7d720d5..68e91f98cc 100644 --- a/packages/types/src/providers/requesty.ts +++ b/packages/types/src/providers/requesty.ts @@ -8,7 +8,7 @@ export const requestyDefaultModelInfo: ModelInfo = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, diff --git a/packages/types/src/providers/vertex.ts b/packages/types/src/providers/vertex.ts index b048c19403..e49b829a8c 100644 --- a/packages/types/src/providers/vertex.ts +++ b/packages/types/src/providers/vertex.ts @@ -167,7 +167,7 @@ export const vertexModels = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, @@ -179,7 +179,7 @@ export const vertexModels = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 15.0, outputPrice: 75.0, @@ -190,7 +190,7 @@ export const vertexModels = { maxTokens: 64_000, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, @@ -203,7 +203,7 @@ export const vertexModels = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, @@ -214,7 +214,7 @@ export const vertexModels = { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, diff --git a/src/api/providers/__tests__/glama.spec.ts b/src/api/providers/__tests__/glama.spec.ts index d42491321f..fd48028fe4 100644 --- a/src/api/providers/__tests__/glama.spec.ts +++ b/src/api/providers/__tests__/glama.spec.ts @@ -20,7 +20,7 @@ vitest.mock("../fetchers/modelCache", () => ({ cacheReadsPrice: 0.3, description: "Claude 3.7 Sonnet", thinking: false, - supportsComputerUse: true, + supportsBrowserUse: true, }, "openai/gpt-4o": { maxTokens: 4096, diff --git a/src/api/providers/__tests__/openrouter.spec.ts b/src/api/providers/__tests__/openrouter.spec.ts index 5c0e52c2c2..fd4223481d 100644 --- a/src/api/providers/__tests__/openrouter.spec.ts +++ b/src/api/providers/__tests__/openrouter.spec.ts @@ -26,7 +26,7 @@ vitest.mock("../fetchers/modelCache", () => ({ cacheReadsPrice: 0.3, description: "Claude 3.7 Sonnet", thinking: false, - supportsComputerUse: true, + supportsBrowserUse: true, }, "anthropic/claude-3.7-sonnet:thinking": { maxTokens: 128000, @@ -38,7 +38,7 @@ vitest.mock("../fetchers/modelCache", () => ({ cacheWritesPrice: 3.75, cacheReadsPrice: 0.3, description: "Claude 3.7 Sonnet with thinking", - supportsComputerUse: true, + supportsBrowserUse: true, }, }) }), diff --git a/src/api/providers/__tests__/requesty.spec.ts b/src/api/providers/__tests__/requesty.spec.ts index 7f7fc2d527..1e1b71b1ea 100644 --- a/src/api/providers/__tests__/requesty.spec.ts +++ b/src/api/providers/__tests__/requesty.spec.ts @@ -30,7 +30,7 @@ vitest.mock("../fetchers/modelCache", () => ({ contextWindow: 200000, supportsImages: true, supportsPromptCache: true, - supportsComputerUse: true, + supportsBrowserUse: true, inputPrice: 3, outputPrice: 15, cacheWritesPrice: 3.75, @@ -75,7 +75,7 @@ describe("RequestyHandler", () => { contextWindow: 200000, supportsImages: true, supportsPromptCache: true, - supportsComputerUse: true, + supportsBrowserUse: true, inputPrice: 3, outputPrice: 15, cacheWritesPrice: 3.75, @@ -96,7 +96,7 @@ describe("RequestyHandler", () => { contextWindow: 200000, supportsImages: true, supportsPromptCache: true, - supportsComputerUse: true, + supportsBrowserUse: true, inputPrice: 3, outputPrice: 15, cacheWritesPrice: 3.75, diff --git a/src/api/providers/__tests__/unbound.spec.ts b/src/api/providers/__tests__/unbound.spec.ts index 7a987c5f43..57cd627ce0 100644 --- a/src/api/providers/__tests__/unbound.spec.ts +++ b/src/api/providers/__tests__/unbound.spec.ts @@ -21,7 +21,7 @@ vitest.mock("../fetchers/modelCache", () => ({ cacheReadsPrice: 0.3, description: "Claude 3.5 Sonnet", thinking: false, - supportsComputerUse: true, + supportsBrowserUse: true, }, "anthropic/claude-3-7-sonnet-20250219": { maxTokens: 8192, @@ -34,7 +34,7 @@ vitest.mock("../fetchers/modelCache", () => ({ cacheReadsPrice: 0.3, description: "Claude 3.7 Sonnet", thinking: false, - supportsComputerUse: true, + supportsBrowserUse: true, }, "openai/gpt-4o": { maxTokens: 4096, diff --git a/src/api/providers/fetchers/__tests__/litellm.spec.ts b/src/api/providers/fetchers/__tests__/litellm.spec.ts index f4db3bc12e..1c6afc28cc 100644 --- a/src/api/providers/fetchers/__tests__/litellm.spec.ts +++ b/src/api/providers/fetchers/__tests__/litellm.spec.ts @@ -92,7 +92,7 @@ describe("getLiteLLMModels", () => { maxTokens: 4096, contextWindow: 200000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: 3, outputPrice: 15, @@ -102,7 +102,7 @@ describe("getLiteLLMModels", () => { maxTokens: 8192, contextWindow: 128000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: 10, outputPrice: 30, @@ -170,7 +170,7 @@ describe("getLiteLLMModels", () => { maxTokens: 4096, contextWindow: 200000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: false, inputPrice: undefined, outputPrice: undefined, @@ -181,7 +181,7 @@ describe("getLiteLLMModels", () => { maxTokens: 4096, contextWindow: 200000, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: false, inputPrice: undefined, outputPrice: undefined, @@ -316,7 +316,7 @@ describe("getLiteLLMModels", () => { maxTokens: 4096, contextWindow: 200000, supportsImages: true, - supportsComputerUse: true, // Should be true due to fallback + supportsBrowserUse: true, // Should be true due to fallback supportsPromptCache: false, inputPrice: undefined, outputPrice: undefined, @@ -327,7 +327,7 @@ describe("getLiteLLMModels", () => { maxTokens: 8192, contextWindow: 128000, supportsImages: false, - supportsComputerUse: false, // Should be false as it's not in fallback list + supportsBrowserUse: false, // Should be false as it's not in fallback list supportsPromptCache: false, inputPrice: undefined, outputPrice: undefined, @@ -390,7 +390,7 @@ describe("getLiteLLMModels", () => { maxTokens: 4096, contextWindow: 200000, supportsImages: true, - supportsComputerUse: false, // False because explicitly set to false (fallback ignored) + supportsBrowserUse: false, // False because explicitly set to false (fallback ignored) supportsPromptCache: false, inputPrice: undefined, outputPrice: undefined, @@ -401,7 +401,7 @@ describe("getLiteLLMModels", () => { maxTokens: 8192, contextWindow: 128000, supportsImages: false, - supportsComputerUse: true, // True because explicitly set to true + supportsBrowserUse: true, // True because explicitly set to true supportsPromptCache: false, inputPrice: undefined, outputPrice: undefined, @@ -412,7 +412,7 @@ describe("getLiteLLMModels", () => { maxTokens: 8192, contextWindow: 128000, supportsImages: false, - supportsComputerUse: false, // False because explicitly set to false + supportsBrowserUse: false, // False because explicitly set to false supportsPromptCache: false, inputPrice: undefined, outputPrice: undefined, @@ -468,8 +468,8 @@ describe("getLiteLLMModels", () => { const result = await getLiteLLMModels("test-api-key", "http://localhost:4000") - expect(result["vertex-claude"].supportsComputerUse).toBe(true) - expect(result["openrouter-claude"].supportsComputerUse).toBe(true) - expect(result["bedrock-claude"].supportsComputerUse).toBe(true) + expect(result["vertex-claude"].supportsBrowserUse).toBe(true) + expect(result["openrouter-claude"].supportsBrowserUse).toBe(true) + expect(result["bedrock-claude"].supportsBrowserUse).toBe(true) }) }) diff --git a/src/api/providers/fetchers/__tests__/lmstudio.test.ts b/src/api/providers/fetchers/__tests__/lmstudio.test.ts index 59b4388785..bf25aa14f9 100644 --- a/src/api/providers/fetchers/__tests__/lmstudio.test.ts +++ b/src/api/providers/fetchers/__tests__/lmstudio.test.ts @@ -54,7 +54,7 @@ describe("LMStudio Fetcher", () => { contextWindow: rawModel.contextLength, supportsPromptCache: true, supportsImages: rawModel.vision, - supportsComputerUse: false, + supportsBrowserUse: false, maxTokens: rawModel.contextLength, inputPrice: 0, outputPrice: 0, diff --git a/src/api/providers/fetchers/__tests__/ollama.test.ts b/src/api/providers/fetchers/__tests__/ollama.test.ts index bf1bf3c6b2..c96ea777df 100644 --- a/src/api/providers/fetchers/__tests__/ollama.test.ts +++ b/src/api/providers/fetchers/__tests__/ollama.test.ts @@ -22,7 +22,7 @@ describe("Ollama Fetcher", () => { maxTokens: 40960, contextWindow: 40960, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: true, inputPrice: 0, outputPrice: 0, @@ -47,7 +47,7 @@ describe("Ollama Fetcher", () => { maxTokens: 40960, contextWindow: 40960, supportsImages: false, - supportsComputerUse: false, + supportsBrowserUse: false, supportsPromptCache: true, inputPrice: 0, outputPrice: 0, diff --git a/src/api/providers/fetchers/__tests__/openrouter.spec.ts b/src/api/providers/fetchers/__tests__/openrouter.spec.ts index f0ebead30f..5b829749c2 100644 --- a/src/api/providers/fetchers/__tests__/openrouter.spec.ts +++ b/src/api/providers/fetchers/__tests__/openrouter.spec.ts @@ -50,7 +50,7 @@ describe("OpenRouter API", () => { expect( Object.entries(models) - .filter(([_, model]) => model.supportsComputerUse) + .filter(([_, model]) => model.supportsBrowserUse) .map(([id, _]) => id) .sort(), ).toEqual(Array.from(OPEN_ROUTER_COMPUTER_USE_MODELS).sort()) @@ -158,7 +158,7 @@ describe("OpenRouter API", () => { cacheWritesPrice: 3.75, cacheReadsPrice: 0.3, description: expect.any(String), - supportsComputerUse: true, + supportsBrowserUse: true, supportsReasoningBudget: false, supportsReasoningEffort: false, supportedParameters: ["max_tokens", "temperature", "reasoning", "include_reasoning"], @@ -174,7 +174,7 @@ describe("OpenRouter API", () => { cacheWritesPrice: 3.75, cacheReadsPrice: 0.3, description: expect.any(String), - supportsComputerUse: true, + supportsBrowserUse: true, supportsReasoningBudget: true, requiredReasoningBudget: true, supportsReasoningEffort: true, diff --git a/src/api/providers/fetchers/glama.ts b/src/api/providers/fetchers/glama.ts index 9fd57e2c68..e66fa524b7 100644 --- a/src/api/providers/fetchers/glama.ts +++ b/src/api/providers/fetchers/glama.ts @@ -16,7 +16,7 @@ export async function getGlamaModels(): Promise> { maxTokens: rawModel.maxTokensOutput, contextWindow: rawModel.maxTokensInput, supportsImages: rawModel.capabilities?.includes("input:image"), - supportsComputerUse: rawModel.capabilities?.includes("computer_use"), + supportsBrowserUse: rawModel.capabilities?.includes("computer_use"), supportsPromptCache: rawModel.capabilities?.includes("caching"), inputPrice: parseApiPrice(rawModel.pricePerToken?.input), outputPrice: parseApiPrice(rawModel.pricePerToken?.output), diff --git a/src/api/providers/fetchers/litellm.ts b/src/api/providers/fetchers/litellm.ts index 47617cd390..7cc7c3c75a 100644 --- a/src/api/providers/fetchers/litellm.ts +++ b/src/api/providers/fetchers/litellm.ts @@ -39,12 +39,12 @@ export async function getLiteLLMModels(apiKey: string, baseUrl: string): Promise if (!modelName || !modelInfo || !litellmModelName) continue // Use explicit supports_computer_use if available, otherwise fall back to hardcoded list - let supportsComputerUse: boolean + let supportsBrowserUse: boolean if (modelInfo.supports_computer_use !== undefined) { - supportsComputerUse = Boolean(modelInfo.supports_computer_use) + supportsBrowserUse = Boolean(modelInfo.supports_computer_use) } else { // Fallback for older LiteLLM versions that don't have supports_computer_use field - supportsComputerUse = computerModels.some((computer_model) => + supportsBrowserUse = computerModels.some((computer_model) => litellmModelName.endsWith(computer_model), ) } @@ -54,7 +54,7 @@ export async function getLiteLLMModels(apiKey: string, baseUrl: string): Promise contextWindow: modelInfo.max_input_tokens || 200000, supportsImages: Boolean(modelInfo.supports_vision), // litellm_params.model may have a prefix like openrouter/ - supportsComputerUse, + supportsBrowserUse, supportsPromptCache: Boolean(modelInfo.supports_prompt_caching), inputPrice: modelInfo.input_cost_per_token ? modelInfo.input_cost_per_token * 1000000 : undefined, outputPrice: modelInfo.output_cost_per_token diff --git a/src/api/providers/fetchers/lmstudio.ts b/src/api/providers/fetchers/lmstudio.ts index ea1a590f1e..b14dfb0c04 100644 --- a/src/api/providers/fetchers/lmstudio.ts +++ b/src/api/providers/fetchers/lmstudio.ts @@ -8,7 +8,7 @@ export const parseLMStudioModel = (rawModel: LLMInstanceInfo): ModelInfo => { contextWindow: rawModel.contextLength, supportsPromptCache: true, supportsImages: rawModel.vision, - supportsComputerUse: false, + supportsBrowserUse: false, maxTokens: rawModel.contextLength, }) diff --git a/src/api/providers/fetchers/ollama.ts b/src/api/providers/fetchers/ollama.ts index 8e1e3f7f07..11ef31391a 100644 --- a/src/api/providers/fetchers/ollama.ts +++ b/src/api/providers/fetchers/ollama.ts @@ -47,7 +47,7 @@ export const parseOllamaModel = (rawModel: OllamaModelInfoResponse): ModelInfo = contextWindow: contextWindow || ollamaDefaultModelInfo.contextWindow, supportsPromptCache: true, supportsImages: rawModel.capabilities?.includes("vision"), - supportsComputerUse: false, + supportsBrowserUse: false, maxTokens: contextWindow || ollamaDefaultModelInfo.contextWindow, }) diff --git a/src/api/providers/fetchers/openrouter.ts b/src/api/providers/fetchers/openrouter.ts index a98484ba0e..e7a9c13563 100644 --- a/src/api/providers/fetchers/openrouter.ts +++ b/src/api/providers/fetchers/openrouter.ts @@ -209,7 +209,7 @@ export const parseOpenRouterModel = ({ // The OpenRouter model definition doesn't give us any hints about // computer use, so we need to set that manually. if (OPEN_ROUTER_COMPUTER_USE_MODELS.has(id)) { - modelInfo.supportsComputerUse = true + modelInfo.supportsBrowserUse = true } if (OPEN_ROUTER_REASONING_BUDGET_MODELS.has(id)) { diff --git a/src/api/providers/fetchers/requesty.ts b/src/api/providers/fetchers/requesty.ts index e339dae1aa..0784c46a67 100644 --- a/src/api/providers/fetchers/requesty.ts +++ b/src/api/providers/fetchers/requesty.ts @@ -33,7 +33,7 @@ export async function getRequestyModels(apiKey?: string): Promise { info: { contextWindow: 8000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsVision: true, maxTokens: 4000, supportsPromptCache: true, @@ -547,7 +547,7 @@ describe("summarizeConversation with custom settings", () => { info: { contextWindow: 8000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsVision: true, maxTokens: 4000, supportsPromptCache: true, @@ -571,7 +571,7 @@ describe("summarizeConversation with custom settings", () => { info: { contextWindow: 4000, supportsImages: true, - supportsComputerUse: false, + supportsBrowserUse: false, supportsVision: false, maxTokens: 2000, supportsPromptCache: false, diff --git a/src/core/prompts/__tests__/add-custom-instructions.spec.ts b/src/core/prompts/__tests__/add-custom-instructions.spec.ts index b2ca5589f9..93da21e620 100644 --- a/src/core/prompts/__tests__/add-custom-instructions.spec.ts +++ b/src/core/prompts/__tests__/add-custom-instructions.spec.ts @@ -193,7 +193,7 @@ describe("addCustomInstructions", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -216,7 +216,7 @@ describe("addCustomInstructions", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -241,7 +241,7 @@ describe("addCustomInstructions", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse mockMcpHub, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -267,7 +267,7 @@ describe("addCustomInstructions", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse mockMcpHub, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -291,7 +291,7 @@ describe("addCustomInstructions", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize diff --git a/src/core/prompts/__tests__/custom-system-prompt.spec.ts b/src/core/prompts/__tests__/custom-system-prompt.spec.ts index acf34ac459..c416760742 100644 --- a/src/core/prompts/__tests__/custom-system-prompt.spec.ts +++ b/src/core/prompts/__tests__/custom-system-prompt.spec.ts @@ -75,7 +75,7 @@ describe("File-Based Custom System Prompt", () => { const prompt = await SYSTEM_PROMPT( mockContext, "test/path", // Using a relative path without leading slash - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -112,7 +112,7 @@ describe("File-Based Custom System Prompt", () => { const prompt = await SYSTEM_PROMPT( mockContext, "test/path", // Using a relative path without leading slash - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -158,7 +158,7 @@ describe("File-Based Custom System Prompt", () => { const prompt = await SYSTEM_PROMPT( mockContext, "test/path", // Using a relative path without leading slash - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize diff --git a/src/core/prompts/__tests__/system-prompt.spec.ts b/src/core/prompts/__tests__/system-prompt.spec.ts index e6af6eaf5a..a52cd9b342 100644 --- a/src/core/prompts/__tests__/system-prompt.spec.ts +++ b/src/core/prompts/__tests__/system-prompt.spec.ts @@ -207,7 +207,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -226,11 +226,11 @@ describe("SYSTEM_PROMPT", () => { expect(prompt).toMatchFileSnapshot("./__snapshots__/system-prompt/consistent-system-prompt.snap") }) - it("should include browser actions when supportsComputerUse is true", async () => { + it("should include browser actions when supportsBrowserUse is true", async () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - true, // supportsComputerUse + true, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy "1280x800", // browserViewportSize @@ -255,7 +255,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse mockMcpHub, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -278,7 +278,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // explicitly undefined mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -301,7 +301,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - true, // supportsComputerUse + true, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy "900x600", // different viewport size @@ -324,7 +324,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub new MultiSearchReplaceDiffStrategy(), // Use actual diff strategy from the codebase undefined, // browserViewportSize @@ -348,7 +348,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub new MultiSearchReplaceDiffStrategy(), // Use actual diff strategy from the codebase undefined, // browserViewportSize @@ -372,7 +372,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub new MultiSearchReplaceDiffStrategy(), // Use actual diff strategy from the codebase undefined, // browserViewportSize @@ -423,7 +423,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -484,7 +484,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -522,7 +522,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize @@ -555,7 +555,7 @@ describe("SYSTEM_PROMPT", () => { const prompt = await SYSTEM_PROMPT( mockContext, "/test/path", - false, // supportsComputerUse + false, // supportsBrowserUse undefined, // mcpHub undefined, // diffStrategy undefined, // browserViewportSize diff --git a/src/core/prompts/sections/capabilities.ts b/src/core/prompts/sections/capabilities.ts index e2d27db5bb..17c0d5a6be 100644 --- a/src/core/prompts/sections/capabilities.ts +++ b/src/core/prompts/sections/capabilities.ts @@ -4,7 +4,7 @@ import { CodeIndexManager } from "../../../services/code-index/manager" export function getCapabilitiesSection( cwd: string, - supportsComputerUse: boolean, + supportsBrowserUse: boolean, mcpHub?: McpHub, diffStrategy?: DiffStrategy, codeIndexManager?: CodeIndexManager, @@ -14,7 +14,7 @@ export function getCapabilitiesSection( CAPABILITIES - You have access to tools that let you execute CLI commands on the user's computer, list files, view source code definitions, regex search${ - supportsComputerUse ? ", use the browser" : "" + supportsBrowserUse ? ", use the browser" : "" }, read and write files, and ask follow-up questions. These tools help you effectively accomplish a wide range of tasks, such as writing code, making edits or improvements to existing files, understanding the current state of a project, performing system operations, and much more. - When the user initially gives you a task, a recursive list of all filepaths in the current workspace directory ('${cwd}') will be included in environment_details. This provides an overview of the project's file structure, offering key insights into the project from directory/file names (how developers conceptualize and organize their code) and file extensions (the language used). This can also guide decision-making on which files to explore further. If you need to further explore directories such as outside the current workspace directory, you can use the list_files tool. If you pass 'true' for the recursive parameter, it will list files recursively. Otherwise, it will list files at the top level, which is better suited for generic directories where you don't necessarily need the nested structure, like the Desktop.${ codeIndexManager && @@ -29,7 +29,7 @@ CAPABILITIES - You can use the list_code_definition_names tool to get an overview of source code definitions for all files at the top level of a specified directory. This can be particularly useful when you need to understand the broader context and relationships between certain parts of the code. You may need to call this tool multiple times to understand various parts of the codebase related to the task. - For example, when asked to make edits or improvements you might analyze the file structure in the initial environment_details to get an overview of the project, then use list_code_definition_names to get further insight using source code definitions for files located in relevant directories, then read_file to examine the contents of relevant files, analyze the code and suggest improvements or make necessary edits, then use ${diffStrategy ? "the apply_diff or write_to_file" : "the write_to_file"} tool to apply the changes. If you refactored code that could affect other parts of the codebase, you could use search_files to ensure you update other files as needed. - You can use the execute_command tool to run commands on the user's computer whenever you feel it can help accomplish the user's task. When you need to execute a CLI command, you must provide a clear explanation of what the command does. Prefer to execute complex CLI commands over creating executable scripts, since they are more flexible and easier to run. Interactive and long-running commands are allowed, since the commands are run in the user's VSCode terminal. The user may keep commands running in the background and you will be kept updated on their status along the way. Each command you execute is run in a new terminal instance.${ - supportsComputerUse + supportsBrowserUse ? "\n- You can use the browser_action tool to interact with websites (including html files and locally running development servers) through a Puppeteer-controlled browser when you feel it is necessary in accomplishing the user's task. This tool is particularly useful for web development tasks as it allows you to launch a browser, navigate to pages, interact with elements through clicks and keyboard input, and capture the results through screenshots and console logs. This tool may be useful at key stages of web development tasks-such as after implementing new features, making substantial changes, when troubleshooting issues, or to verify the result of your work. You can analyze the provided screenshots to ensure correct rendering or identify errors, and review console logs for runtime issues.\n - For example, if asked to add a component to a react website, you might create the necessary files, use execute_command to run the site locally, then use browser_action to launch the browser, navigate to the local server, and verify the component renders & functions correctly before closing the browser." : "" }${ diff --git a/src/core/prompts/sections/rules.ts b/src/core/prompts/sections/rules.ts index 3b2e992085..82b3773f48 100644 --- a/src/core/prompts/sections/rules.ts +++ b/src/core/prompts/sections/rules.ts @@ -47,7 +47,7 @@ function getEditingInstructions(diffStrategy?: DiffStrategy): string { export function getRulesSection( cwd: string, - supportsComputerUse: boolean, + supportsBrowserUse: boolean, diffStrategy?: DiffStrategy, codeIndexManager?: CodeIndexManager, ): string { @@ -82,7 +82,7 @@ ${getEditingInstructions(diffStrategy)} - When executing commands, if you don't see the expected output, assume the terminal executed the command successfully and proceed with the task. The user's terminal may be unable to stream the output back properly. If you absolutely need to see the actual terminal output, use the ask_followup_question tool to request the user to copy and paste it back to you. - The user may provide a file's contents directly in their message, in which case you shouldn't use the read_file tool to get the file contents again since you already have it. - Your goal is to try to accomplish the user's task, NOT engage in a back and forth conversation.${ - supportsComputerUse + supportsBrowserUse ? '\n- The user may ask generic non-development tasks, such as "what\'s the latest news" or "look up the weather in San Diego", in which case you might use the browser_action tool to complete the task if it makes sense to do so, rather than trying to create a website or using curl to answer the question. However, if an available MCP server tool or resource can be used instead, you should prefer to use it over browser_action.' : "" } @@ -93,7 +93,7 @@ ${getEditingInstructions(diffStrategy)} - Before executing commands, check the "Actively Running Terminals" section in environment_details. If present, consider how these active processes might impact your task. For example, if a local development server is already running, you wouldn't need to start it again. If no active terminals are listed, proceed with command execution as normal. - MCP operations should be used one at a time, similar to other tool usage. Wait for confirmation of success before proceeding with additional operations. - It is critical you wait for the user's response after each tool use, in order to confirm the success of the tool use. For example, if asked to make a todo app, you would create a file, wait for the user's response it was created successfully, then create another file if needed, wait for the user's response it was created successfully, etc.${ - supportsComputerUse + supportsBrowserUse ? " Then if you want to test your work, you might use browser_action to launch the site, wait for the user's response confirming the site was launched along with a screenshot, then perhaps e.g., click a button to test functionality if needed, wait for the user's response confirming the button was clicked along with a screenshot of the new state, before finally closing the browser." : "" }` diff --git a/src/core/prompts/system.ts b/src/core/prompts/system.ts index 61fd9df81e..d315aa2096 100644 --- a/src/core/prompts/system.ts +++ b/src/core/prompts/system.ts @@ -29,7 +29,7 @@ import { async function generatePrompt( context: vscode.ExtensionContext, cwd: string, - supportsComputerUse: boolean, + supportsBrowserUse: boolean, mode: Mode, mcpHub?: McpHub, diffStrategy?: DiffStrategy, @@ -74,7 +74,7 @@ ${getSharedToolUseSection()} ${getToolDescriptionsForMode( mode, cwd, - supportsComputerUse, + supportsBrowserUse, codeIndexManager, effectiveDiffStrategy, browserViewportSize, @@ -89,11 +89,11 @@ ${getToolUseGuidelinesSection(codeIndexManager)} ${mcpServersSection} -${getCapabilitiesSection(cwd, supportsComputerUse, mcpHub, effectiveDiffStrategy, codeIndexManager)} +${getCapabilitiesSection(cwd, supportsBrowserUse, mcpHub, effectiveDiffStrategy, codeIndexManager)} ${modesSection} -${getRulesSection(cwd, supportsComputerUse, effectiveDiffStrategy, codeIndexManager)} +${getRulesSection(cwd, supportsBrowserUse, effectiveDiffStrategy, codeIndexManager)} ${getSystemInfoSection(cwd)} @@ -107,7 +107,7 @@ ${await addCustomInstructions(baseInstructions, globalCustomInstructions || "", export const SYSTEM_PROMPT = async ( context: vscode.ExtensionContext, cwd: string, - supportsComputerUse: boolean, + supportsBrowserUse: boolean, mcpHub?: McpHub, diffStrategy?: DiffStrategy, browserViewportSize?: string, @@ -180,7 +180,7 @@ ${customInstructions}` return generatePrompt( context, cwd, - supportsComputerUse, + supportsBrowserUse, currentMode.slug, mcpHub, effectiveDiffStrategy, diff --git a/src/core/prompts/tools/__tests__/attempt-completion.spec.ts b/src/core/prompts/tools/__tests__/attempt-completion.spec.ts index 026d73789f..8b8be805e7 100644 --- a/src/core/prompts/tools/__tests__/attempt-completion.spec.ts +++ b/src/core/prompts/tools/__tests__/attempt-completion.spec.ts @@ -4,7 +4,7 @@ describe("getAttemptCompletionDescription", () => { it("should NOT include command parameter in the description", () => { const args = { cwd: "/test/path", - supportsComputerUse: false, + supportsBrowserUse: false, } const description = getAttemptCompletionDescription(args) @@ -41,7 +41,7 @@ describe("getAttemptCompletionDescription", () => { it("should show example without command", () => { const args = { cwd: "/test/path", - supportsComputerUse: false, + supportsBrowserUse: false, } const description = getAttemptCompletionDescription(args) diff --git a/src/core/prompts/tools/browser-action.ts b/src/core/prompts/tools/browser-action.ts index e1b33b9d7d..3e5b08a389 100644 --- a/src/core/prompts/tools/browser-action.ts +++ b/src/core/prompts/tools/browser-action.ts @@ -1,7 +1,7 @@ import { ToolArgs } from "./types" export function getBrowserActionDescription(args: ToolArgs): string | undefined { - if (!args.supportsComputerUse) { + if (!args.supportsBrowserUse) { return undefined } return `## browser_action diff --git a/src/core/prompts/tools/index.ts b/src/core/prompts/tools/index.ts index 736c716a27..86a7bc16c6 100644 --- a/src/core/prompts/tools/index.ts +++ b/src/core/prompts/tools/index.ts @@ -50,7 +50,7 @@ const toolDescriptionMap: Record string | undefined> export function getToolDescriptionsForMode( mode: Mode, cwd: string, - supportsComputerUse: boolean, + supportsBrowserUse: boolean, codeIndexManager?: CodeIndexManager, diffStrategy?: DiffStrategy, browserViewportSize?: string, @@ -63,7 +63,7 @@ export function getToolDescriptionsForMode( const config = getModeConfig(mode, customModes) const args: ToolArgs = { cwd, - supportsComputerUse, + supportsBrowserUse, diffStrategy, browserViewportSize, mcpHub, diff --git a/src/core/prompts/tools/types.ts b/src/core/prompts/tools/types.ts index 9471d100d7..8795540913 100644 --- a/src/core/prompts/tools/types.ts +++ b/src/core/prompts/tools/types.ts @@ -3,7 +3,7 @@ import { McpHub } from "../../../services/mcp/McpHub" export type ToolArgs = { cwd: string - supportsComputerUse: boolean + supportsBrowserUse: boolean diffStrategy?: DiffStrategy browserViewportSize?: string mcpHub?: McpHub diff --git a/src/core/task/Task.ts b/src/core/task/Task.ts index 46da7485ed..2cededce87 100644 --- a/src/core/task/Task.ts +++ b/src/core/task/Task.ts @@ -1612,7 +1612,7 @@ export class Task extends EventEmitter { return SYSTEM_PROMPT( provider.context, this.cwd, - (this.api.getModel().info.supportsComputerUse ?? false) && (browserToolEnabled ?? true), + (this.api.getModel().info.supportsBrowserUse ?? false) && (browserToolEnabled ?? true), mcpHub, this.diffStrategy, browserViewportSize, diff --git a/src/core/task/__tests__/Task.spec.ts b/src/core/task/__tests__/Task.spec.ts index 693f72d1c7..e10a8c6884 100644 --- a/src/core/task/__tests__/Task.spec.ts +++ b/src/core/task/__tests__/Task.spec.ts @@ -452,7 +452,7 @@ describe("Cline", () => { info: { supportsImages: true, supportsPromptCache: true, - supportsComputerUse: true, + supportsBrowserUse: true, contextWindow: 200000, maxTokens: 4096, inputPrice: 0.25, @@ -475,7 +475,7 @@ describe("Cline", () => { info: { supportsImages: false, supportsPromptCache: false, - supportsComputerUse: false, + supportsBrowserUse: false, contextWindow: 16000, maxTokens: 2048, inputPrice: 0.1, diff --git a/src/core/webview/__tests__/ClineProvider.spec.ts b/src/core/webview/__tests__/ClineProvider.spec.ts index fabb0aae60..9d85cffb4b 100644 --- a/src/core/webview/__tests__/ClineProvider.spec.ts +++ b/src/core/webview/__tests__/ClineProvider.spec.ts @@ -282,7 +282,7 @@ vi.mock("../../../api", () => ({ buildApiHandler: vi.fn().mockReturnValue({ getModel: vi.fn().mockReturnValue({ id: "claude-3-sonnet", - info: { supportsComputerUse: false }, + info: { supportsBrowserUse: false }, }), }), })) diff --git a/src/core/webview/__tests__/generateSystemPrompt.spec.ts b/src/core/webview/__tests__/generateSystemPrompt.spec.ts new file mode 100644 index 0000000000..8f4b1821ff --- /dev/null +++ b/src/core/webview/__tests__/generateSystemPrompt.spec.ts @@ -0,0 +1,357 @@ +import { describe, it, expect, vi, beforeEach, afterEach } from "vitest" +import type * as vscode from "vscode" + +import type { WebviewMessage } from "../../../shared/WebviewMessage" +import { generateSystemPrompt } from "../generateSystemPrompt" +import type { ClineProvider } from "../ClineProvider" +import { buildApiHandler } from "../../../api" +import { getModeBySlug } from "../../../shared/modes" +import { experiments as experimentsModule, EXPERIMENT_IDS } from "../../../shared/experiments" + +// Mock dependencies +vi.mock("../../../api", () => ({ + buildApiHandler: vi.fn(), +})) + +vi.mock("../../../shared/modes", () => ({ + defaultModeSlug: "code", + getModeBySlug: vi.fn(), + getGroupName: vi.fn((group) => (typeof group === "string" ? group : group[0])), +})) + +vi.mock("../../../shared/experiments", () => ({ + experiments: { + isEnabled: vi.fn(), + }, + EXPERIMENT_IDS: { + MULTI_FILE_APPLY_DIFF: "multi_file_apply_diff", + }, +})) + +vi.mock("../../../core/prompts/system", () => ({ + SYSTEM_PROMPT: vi.fn().mockResolvedValue("Generated system prompt"), +})) + +vi.mock("../../diff/strategies/multi-search-replace", () => { + const MockMultiSearchReplaceDiffStrategy = vi.fn() + MockMultiSearchReplaceDiffStrategy.mockImplementation(() => ({ + getName: () => "multi-search-replace", + })) + return { MultiSearchReplaceDiffStrategy: MockMultiSearchReplaceDiffStrategy } +}) + +vi.mock("../../diff/strategies/multi-file-search-replace", () => { + const MockMultiFileSearchReplaceDiffStrategy = vi.fn() + MockMultiFileSearchReplaceDiffStrategy.mockImplementation(() => ({ + getName: () => "multi-file-search-replace", + })) + return { MultiFileSearchReplaceDiffStrategy: MockMultiFileSearchReplaceDiffStrategy } +}) + +describe("generateSystemPrompt", () => { + let mockProvider: Partial + let mockBuildApiHandler: any + let mockGetModeBySlug: any + let mockIsEnabled: any + + beforeEach(() => { + // Reset all mocks + vi.clearAllMocks() + + // Setup mock provider + mockProvider = { + getState: vi.fn().mockResolvedValue({ + apiConfiguration: { apiProvider: "gemini" }, + customModePrompts: {}, + customInstructions: "", + browserViewportSize: "900x600", + diffEnabled: true, + mcpEnabled: false, + fuzzyMatchThreshold: 0.8, + experiments: {}, + enableMcpServerCreation: false, + browserToolEnabled: true, + language: "en", + maxReadFileLine: 1000, + maxConcurrentFileReads: 10, + }), + cwd: "/test/workspace", + customModesManager: { + getCustomModes: vi.fn().mockResolvedValue([]), + } as any, + getCurrentCline: vi.fn().mockReturnValue(null), + getMcpHub: vi.fn().mockReturnValue(null), + } + + // Setup mocked functions + mockBuildApiHandler = vi.mocked(buildApiHandler) + mockGetModeBySlug = vi.mocked(getModeBySlug) + mockIsEnabled = vi.mocked(experimentsModule.isEnabled) + + // Default mock implementations + mockIsEnabled.mockReturnValue(false) + }) + + afterEach(() => { + vi.restoreAllMocks() + }) + + describe("browser tool support", () => { + it("should enable browser tools when model supports images, mode includes browser group, and browserToolEnabled is true", async () => { + // Setup: Gemini model with supportsImages and supportsBrowserUse + mockBuildApiHandler.mockReturnValue({ + getModel: vi.fn().mockReturnValue({ + id: "gemini-2.0-flash", + info: { + supportsImages: true, + supportsBrowserUse: true, + }, + }), + }) + + // Setup: Code mode includes browser tool group + mockGetModeBySlug.mockReturnValue({ + slug: "code", + groups: ["read", "edit", "browser", "command", "mcp"], + }) + + const message: WebviewMessage = { type: "getSystemPrompt", mode: "code" } + const result = await generateSystemPrompt(mockProvider as ClineProvider, message) + + // Verify SYSTEM_PROMPT was called with canUseBrowserTool = true + const { SYSTEM_PROMPT } = await import("../../../core/prompts/system") + expect(SYSTEM_PROMPT).toHaveBeenCalled() + const callArgs = vi.mocked(SYSTEM_PROMPT).mock.calls[0] + expect(callArgs[2]).toBe(true) // canUseBrowserTool should be true + }) + + it("should disable browser tools when model does not support browser use", async () => { + // Setup: Model without supportsBrowserUse + mockBuildApiHandler.mockReturnValue({ + getModel: vi.fn().mockReturnValue({ + id: "claude-3-sonnet", + info: { + supportsImages: false, + supportsBrowserUse: false, + }, + }), + }) + + // Setup: Code mode includes browser tool group + mockGetModeBySlug.mockReturnValue({ + slug: "code", + groups: ["read", "edit", "browser", "command", "mcp"], + }) + + const message: WebviewMessage = { type: "getSystemPrompt", mode: "code" } + const result = await generateSystemPrompt(mockProvider as ClineProvider, message) + + // Verify SYSTEM_PROMPT was called with canUseBrowserTool = false + const { SYSTEM_PROMPT } = await import("../../../core/prompts/system") + expect(SYSTEM_PROMPT).toHaveBeenCalled() + const callArgs = vi.mocked(SYSTEM_PROMPT).mock.calls[0] + expect(callArgs[2]).toBe(false) // canUseBrowserTool should be false + }) + + it("should disable browser tools when mode does not include browser group", async () => { + // Setup: Gemini model with browser support + mockBuildApiHandler.mockReturnValue({ + getModel: vi.fn().mockReturnValue({ + id: "gemini-2.0-flash", + info: { + supportsImages: true, + supportsBrowserUse: true, + }, + }), + }) + + // Setup: Custom mode without browser tool group + mockGetModeBySlug.mockReturnValue({ + slug: "custom-mode", + groups: ["read", "edit"], // No browser group + }) + + const message: WebviewMessage = { type: "getSystemPrompt", mode: "custom-mode" } + const result = await generateSystemPrompt(mockProvider as ClineProvider, message) + + // Verify SYSTEM_PROMPT was called with canUseBrowserTool = false + const { SYSTEM_PROMPT } = await import("../../../core/prompts/system") + expect(SYSTEM_PROMPT).toHaveBeenCalled() + const callArgs = vi.mocked(SYSTEM_PROMPT).mock.calls[0] + expect(callArgs[2]).toBe(false) // canUseBrowserTool should be false + }) + + it("should disable browser tools when browserToolEnabled setting is false", async () => { + // Setup: Gemini model with browser support + mockBuildApiHandler.mockReturnValue({ + getModel: vi.fn().mockReturnValue({ + id: "gemini-2.0-flash", + info: { + supportsImages: true, + supportsBrowserUse: true, + }, + }), + }) + + // Setup: Code mode includes browser tool group + mockGetModeBySlug.mockReturnValue({ + slug: "code", + groups: ["read", "edit", "browser", "command", "mcp"], + }) + + // Override provider state to have browserToolEnabled = false + mockProvider.getState = vi.fn().mockResolvedValue({ + apiConfiguration: { apiProvider: "gemini" }, + customModePrompts: {}, + customInstructions: "", + browserViewportSize: "900x600", + diffEnabled: true, + mcpEnabled: false, + fuzzyMatchThreshold: 0.8, + experiments: {}, + enableMcpServerCreation: false, + browserToolEnabled: false, // Disabled by user + language: "en", + maxReadFileLine: 1000, + maxConcurrentFileReads: 10, + }) + + const message: WebviewMessage = { type: "getSystemPrompt", mode: "code" } + const result = await generateSystemPrompt(mockProvider as ClineProvider, message) + + // Verify SYSTEM_PROMPT was called with canUseBrowserTool = false + const { SYSTEM_PROMPT } = await import("../../../core/prompts/system") + expect(SYSTEM_PROMPT).toHaveBeenCalled() + const callArgs = vi.mocked(SYSTEM_PROMPT).mock.calls[0] + expect(callArgs[2]).toBe(false) // canUseBrowserTool should be false + }) + + it("should handle error when checking model support gracefully", async () => { + // Setup: buildApiHandler throws an error + mockBuildApiHandler.mockImplementation(() => { + throw new Error("API configuration error") + }) + + // Setup: Code mode includes browser tool group + mockGetModeBySlug.mockReturnValue({ + slug: "code", + groups: ["read", "edit", "browser", "command", "mcp"], + }) + + // Spy on console.error + const consoleErrorSpy = vi.spyOn(console, "error").mockImplementation(() => {}) + + const message: WebviewMessage = { type: "getSystemPrompt", mode: "code" } + const result = await generateSystemPrompt(mockProvider as ClineProvider, message) + + // Verify error was logged + expect(consoleErrorSpy).toHaveBeenCalledWith( + "Error checking if model supports browser use:", + expect.any(Error), + ) + + // Verify SYSTEM_PROMPT was called with canUseBrowserTool = false (fallback) + const { SYSTEM_PROMPT } = await import("../../../core/prompts/system") + expect(SYSTEM_PROMPT).toHaveBeenCalled() + const callArgs = vi.mocked(SYSTEM_PROMPT).mock.calls[0] + expect(callArgs[2]).toBe(false) // canUseBrowserTool should be false on error + + consoleErrorSpy.mockRestore() + }) + + it("should verify all Gemini models with supportsImages have supportsBrowserUse", async () => { + // This test verifies the specific requirement that Gemini models with supportsImages + // should also have supportsBrowserUse set to true + + const geminiModelsWithImages = [ + "gemini-2.5-flash-preview-04-17:thinking", + "gemini-2.5-flash-preview-04-17", + "gemini-2.5-flash", + "gemini-2.0-flash-001", + "gemini-1.5-flash-002", + ] + + for (const modelId of geminiModelsWithImages) { + // Setup: Gemini model + mockBuildApiHandler.mockReturnValue({ + getModel: vi.fn().mockReturnValue({ + id: modelId, + info: { + supportsImages: true, + supportsBrowserUse: true, // This should be true for all Gemini models with images + }, + }), + }) + + // Setup: Code mode includes browser tool group + mockGetModeBySlug.mockReturnValue({ + slug: "code", + groups: ["read", "edit", "browser", "command", "mcp"], + }) + + const message: WebviewMessage = { type: "getSystemPrompt", mode: "code" } + const result = await generateSystemPrompt(mockProvider as ClineProvider, message) + + // Verify SYSTEM_PROMPT was called with canUseBrowserTool = true + const { SYSTEM_PROMPT } = await import("../../../core/prompts/system") + expect(SYSTEM_PROMPT).toHaveBeenCalled() + const callArgs = vi.mocked(SYSTEM_PROMPT).mock.calls[0] + expect(callArgs[2]).toBe(true) // canUseBrowserTool should be true for Gemini models with images + + vi.clearAllMocks() + } + }) + }) + + describe("diff strategy selection", () => { + it("should use MultiFileSearchReplaceDiffStrategy when experiment is enabled", async () => { + // Enable the multi-file apply diff experiment + mockIsEnabled.mockReturnValue(true) + + mockBuildApiHandler.mockReturnValue({ + getModel: vi.fn().mockReturnValue({ + id: "test-model", + info: { supportsBrowserUse: false }, + }), + }) + + mockGetModeBySlug.mockReturnValue({ + slug: "code", + groups: ["read", "edit"], + }) + + const message: WebviewMessage = { type: "getSystemPrompt", mode: "code" } + await generateSystemPrompt(mockProvider as ClineProvider, message) + + // Verify the correct diff strategy was instantiated + const { MultiFileSearchReplaceDiffStrategy } = await import( + "../../diff/strategies/multi-file-search-replace" + ) + expect(MultiFileSearchReplaceDiffStrategy).toHaveBeenCalledWith(0.8) + }) + + it("should use MultiSearchReplaceDiffStrategy when experiment is disabled", async () => { + // Disable the multi-file apply diff experiment + mockIsEnabled.mockReturnValue(false) + + mockBuildApiHandler.mockReturnValue({ + getModel: vi.fn().mockReturnValue({ + id: "test-model", + info: { supportsBrowserUse: false }, + }), + }) + + mockGetModeBySlug.mockReturnValue({ + slug: "code", + groups: ["read", "edit"], + }) + + const message: WebviewMessage = { type: "getSystemPrompt", mode: "code" } + await generateSystemPrompt(mockProvider as ClineProvider, message) + + // Verify the correct diff strategy was instantiated + const { MultiSearchReplaceDiffStrategy } = await import("../../diff/strategies/multi-search-replace") + expect(MultiSearchReplaceDiffStrategy).toHaveBeenCalledWith(0.8) + }) + }) +}) diff --git a/src/core/webview/generateSystemPrompt.ts b/src/core/webview/generateSystemPrompt.ts index 2c88b98d2e..cf93215efe 100644 --- a/src/core/webview/generateSystemPrompt.ts +++ b/src/core/webview/generateSystemPrompt.ts @@ -44,15 +44,15 @@ export const generateSystemPrompt = async (provider: ClineProvider, message: Web const rooIgnoreInstructions = provider.getCurrentCline()?.rooIgnoreController?.getInstructions() // Determine if browser tools can be used based on model support, mode, and user settings - let modelSupportsComputerUse = false + let modelSupportsBrowserUse = false - // Create a temporary API handler to check if the model supports computer use + // Create a temporary API handler to check if the model supports browser use // This avoids relying on an active Cline instance which might not exist during preview try { const tempApiHandler = buildApiHandler(apiConfiguration) - modelSupportsComputerUse = tempApiHandler.getModel().info.supportsComputerUse ?? false + modelSupportsBrowserUse = tempApiHandler.getModel().info.supportsBrowserUse ?? false } catch (error) { - console.error("Error checking if model supports computer use:", error) + console.error("Error checking if model supports browser use:", error) } // Check if the current mode includes the browser tool group @@ -61,7 +61,7 @@ export const generateSystemPrompt = async (provider: ClineProvider, message: Web // Only enable browser tools if the model supports it, the mode includes browser tools, // and browser tools are enabled in settings - const canUseBrowserTool = modelSupportsComputerUse && modeSupportsBrowser && (browserToolEnabled ?? true) + const canUseBrowserTool = modelSupportsBrowserUse && modeSupportsBrowser && (browserToolEnabled ?? true) const systemPrompt = await SYSTEM_PROMPT( provider.context, diff --git a/webview-ui/src/components/settings/ModelInfoView.tsx b/webview-ui/src/components/settings/ModelInfoView.tsx index 8078b03acd..75a0821fc7 100644 --- a/webview-ui/src/components/settings/ModelInfoView.tsx +++ b/webview-ui/src/components/settings/ModelInfoView.tsx @@ -32,7 +32,7 @@ export const ModelInfoView = ({ doesNotSupportLabel={t("settings:modelInfo.noImages")} />, , diff --git a/webview-ui/src/components/settings/__tests__/ModelPicker.spec.tsx b/webview-ui/src/components/settings/__tests__/ModelPicker.spec.tsx index 38237dc0e3..c922a81c21 100644 --- a/webview-ui/src/components/settings/__tests__/ModelPicker.spec.tsx +++ b/webview-ui/src/components/settings/__tests__/ModelPicker.spec.tsx @@ -22,7 +22,7 @@ describe("ModelPicker", () => { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, diff --git a/webview-ui/src/components/settings/providers/OpenAICompatible.tsx b/webview-ui/src/components/settings/providers/OpenAICompatible.tsx index b5f7abc7d4..b3aaed6358 100644 --- a/webview-ui/src/components/settings/providers/OpenAICompatible.tsx +++ b/webview-ui/src/components/settings/providers/OpenAICompatible.tsx @@ -396,11 +396,11 @@ export const OpenAICompatible = ({
{ return { ...(apiConfiguration?.openAiCustomModelInfo || openAiModelInfoSaneDefaults), - supportsComputerUse: checked, + supportsBrowserUse: checked, } })}> {t("settings:providers.customModel.computerUse.label")} diff --git a/webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts b/webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts index 0d58268d14..327b36deec 100644 --- a/webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts +++ b/webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts @@ -142,7 +142,7 @@ describe("useSelectedModel", () => { contextWindow: 8192, supportsImages: false, supportsPromptCache: false, - supportsComputerUse: true, + supportsBrowserUse: true, cacheWritesPrice: 0.1, cacheReadsPrice: 0.01, } @@ -189,7 +189,7 @@ describe("useSelectedModel", () => { // Fields from base model that provider doesn't have contextWindow: 8192, // From base (provider doesn't override) supportsPromptCache: false, // From base (provider doesn't override) - supportsComputerUse: true, // From base (provider doesn't have) + supportsBrowserUse: true, // From base (provider doesn't have) cacheWritesPrice: 0.1, // From base (provider doesn't have) cacheReadsPrice: 0.01, // From base (provider doesn't have) @@ -251,7 +251,7 @@ describe("useSelectedModel", () => { maxTokens: 8192, contextWindow: 200_000, supportsImages: true, - supportsComputerUse: true, + supportsBrowserUse: true, supportsPromptCache: true, inputPrice: 3.0, outputPrice: 15.0, diff --git a/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts b/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts index dc50c0f6a6..f699c3bac2 100644 --- a/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts +++ b/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts @@ -75,7 +75,7 @@ async function getOpenRouterProvidersForModel(modelId: string) { // main models endpoint. switch (true) { case modelId.startsWith("anthropic/claude-3.7-sonnet"): - modelInfo.supportsComputerUse = true + modelInfo.supportsBrowserUse = true modelInfo.supportsPromptCache = true modelInfo.cacheWritesPrice = 3.75 modelInfo.cacheReadsPrice = 0.3 diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 011c8df2ef..9ea7457279 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -91,7 +91,7 @@ }, "browser": { "label": "Browser", - "description": "Automatically perform browser actions without requiring approval. Note: Only applies when the model supports computer use" + "description": "Automatically perform browser actions without requiring approval. Note: Only applies when the model supports browser use" }, "retry": { "label": "Retry", @@ -266,7 +266,7 @@ "description": "Is this model capable of processing and understanding images?" }, "computerUse": { - "label": "Computer Use", + "label": "Browser Use", "description": "Is this model capable of interacting with a browser? (e.g. Claude 3.7 Sonnet)." }, "promptCache": { @@ -308,7 +308,7 @@ "browser": { "enable": { "label": "Enable browser tool", - "description": "When enabled, Roo can use a browser to interact with websites when using models that support computer use. <0>Learn more" + "description": "When enabled, Roo can use a browser to interact with websites when using models that support browser use. <0>Learn more" }, "viewport": { "label": "Viewport size",