Skip to content

Commit e9a824c

Browse files
committed
feat: enable browser use for Gemini models with image support (#5003)
- Replace supportsComputerUse with supportsBrowserUse throughout codebase - Enable browser use for any model that supports images - Update Gemini models configuration to include supportsBrowserUse - Update UI labels from 'computer use' to 'browser use' - Add comprehensive tests for browser capability logic This change aligns with Cline's approach where browser interaction works through screenshot analysis rather than direct computer control.
1 parent 8eb1473 commit e9a824c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+519
-139
lines changed

packages/types/src/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const modelInfoSchema = z.object({
3232
maxThinkingTokens: z.number().nullish(),
3333
contextWindow: z.number(),
3434
supportsImages: z.boolean().optional(),
35-
supportsComputerUse: z.boolean().optional(),
35+
supportsBrowserUse: z.boolean().optional(),
3636
supportsPromptCache: z.boolean(),
3737
supportsReasoningBudget: z.boolean().optional(),
3838
requiredReasoningBudget: z.boolean().optional(),

packages/types/src/providers/anthropic.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const anthropicModels = {
1010
maxTokens: 64_000, // Overridden to 8k if `enableReasoningEffort` is false.
1111
contextWindow: 200_000,
1212
supportsImages: true,
13-
supportsComputerUse: true,
13+
supportsBrowserUse: true,
1414
supportsPromptCache: true,
1515
inputPrice: 3.0, // $3 per million input tokens
1616
outputPrice: 15.0, // $15 per million output tokens
@@ -22,7 +22,7 @@ export const anthropicModels = {
2222
maxTokens: 32_000, // Overridden to 8k if `enableReasoningEffort` is false.
2323
contextWindow: 200_000,
2424
supportsImages: true,
25-
supportsComputerUse: true,
25+
supportsBrowserUse: true,
2626
supportsPromptCache: true,
2727
inputPrice: 15.0, // $15 per million input tokens
2828
outputPrice: 75.0, // $75 per million output tokens
@@ -34,7 +34,7 @@ export const anthropicModels = {
3434
maxTokens: 128_000, // Unlocked by passing `beta` flag to the model. Otherwise, it's 64k.
3535
contextWindow: 200_000,
3636
supportsImages: true,
37-
supportsComputerUse: true,
37+
supportsBrowserUse: true,
3838
supportsPromptCache: true,
3939
inputPrice: 3.0, // $3 per million input tokens
4040
outputPrice: 15.0, // $15 per million output tokens
@@ -47,7 +47,7 @@ export const anthropicModels = {
4747
maxTokens: 8192, // Since we already have a `:thinking` virtual model we aren't setting `supportsReasoningBudget: true` here.
4848
contextWindow: 200_000,
4949
supportsImages: true,
50-
supportsComputerUse: true,
50+
supportsBrowserUse: true,
5151
supportsPromptCache: true,
5252
inputPrice: 3.0, // $3 per million input tokens
5353
outputPrice: 15.0, // $15 per million output tokens
@@ -58,7 +58,7 @@ export const anthropicModels = {
5858
maxTokens: 8192,
5959
contextWindow: 200_000,
6060
supportsImages: true,
61-
supportsComputerUse: true,
61+
supportsBrowserUse: true,
6262
supportsPromptCache: true,
6363
inputPrice: 3.0, // $3 per million input tokens
6464
outputPrice: 15.0, // $15 per million output tokens

packages/types/src/providers/bedrock.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const bedrockModels = {
1717
maxTokens: 5000,
1818
contextWindow: 300_000,
1919
supportsImages: true,
20-
supportsComputerUse: false,
20+
supportsBrowserUse: false,
2121
supportsPromptCache: true,
2222
inputPrice: 0.8,
2323
outputPrice: 3.2,
@@ -31,7 +31,7 @@ export const bedrockModels = {
3131
maxTokens: 5000,
3232
contextWindow: 300_000,
3333
supportsImages: true,
34-
supportsComputerUse: false,
34+
supportsBrowserUse: false,
3535
supportsPromptCache: false,
3636
inputPrice: 1.0,
3737
outputPrice: 4.0,
@@ -43,7 +43,7 @@ export const bedrockModels = {
4343
maxTokens: 5000,
4444
contextWindow: 300_000,
4545
supportsImages: true,
46-
supportsComputerUse: false,
46+
supportsBrowserUse: false,
4747
supportsPromptCache: true,
4848
inputPrice: 0.06,
4949
outputPrice: 0.24,
@@ -57,7 +57,7 @@ export const bedrockModels = {
5757
maxTokens: 5000,
5858
contextWindow: 128_000,
5959
supportsImages: false,
60-
supportsComputerUse: false,
60+
supportsBrowserUse: false,
6161
supportsPromptCache: true,
6262
inputPrice: 0.035,
6363
outputPrice: 0.14,
@@ -71,7 +71,7 @@ export const bedrockModels = {
7171
maxTokens: 8192,
7272
contextWindow: 200_000,
7373
supportsImages: true,
74-
supportsComputerUse: true,
74+
supportsBrowserUse: true,
7575
supportsPromptCache: true,
7676
supportsReasoningBudget: true,
7777
inputPrice: 3.0,
@@ -86,7 +86,7 @@ export const bedrockModels = {
8686
maxTokens: 8192,
8787
contextWindow: 200_000,
8888
supportsImages: true,
89-
supportsComputerUse: true,
89+
supportsBrowserUse: true,
9090
supportsPromptCache: true,
9191
supportsReasoningBudget: true,
9292
inputPrice: 15.0,
@@ -101,7 +101,7 @@ export const bedrockModels = {
101101
maxTokens: 8192,
102102
contextWindow: 200_000,
103103
supportsImages: true,
104-
supportsComputerUse: true,
104+
supportsBrowserUse: true,
105105
supportsPromptCache: true,
106106
supportsReasoningBudget: true,
107107
inputPrice: 3.0,
@@ -116,7 +116,7 @@ export const bedrockModels = {
116116
maxTokens: 8192,
117117
contextWindow: 200_000,
118118
supportsImages: true,
119-
supportsComputerUse: true,
119+
supportsBrowserUse: true,
120120
supportsPromptCache: true,
121121
inputPrice: 3.0,
122122
outputPrice: 15.0,
@@ -210,7 +210,7 @@ export const bedrockModels = {
210210
maxTokens: 8192,
211211
contextWindow: 128_000,
212212
supportsImages: false,
213-
supportsComputerUse: false,
213+
supportsBrowserUse: false,
214214
supportsPromptCache: false,
215215
inputPrice: 0.72,
216216
outputPrice: 0.72,
@@ -220,7 +220,7 @@ export const bedrockModels = {
220220
maxTokens: 8192,
221221
contextWindow: 128_000,
222222
supportsImages: true,
223-
supportsComputerUse: false,
223+
supportsBrowserUse: false,
224224
supportsPromptCache: false,
225225
inputPrice: 0.72,
226226
outputPrice: 0.72,
@@ -230,7 +230,7 @@ export const bedrockModels = {
230230
maxTokens: 8192,
231231
contextWindow: 128_000,
232232
supportsImages: true,
233-
supportsComputerUse: false,
233+
supportsBrowserUse: false,
234234
supportsPromptCache: false,
235235
inputPrice: 0.16,
236236
outputPrice: 0.16,
@@ -240,7 +240,7 @@ export const bedrockModels = {
240240
maxTokens: 8192,
241241
contextWindow: 128_000,
242242
supportsImages: false,
243-
supportsComputerUse: false,
243+
supportsBrowserUse: false,
244244
supportsPromptCache: false,
245245
inputPrice: 0.15,
246246
outputPrice: 0.15,
@@ -250,7 +250,7 @@ export const bedrockModels = {
250250
maxTokens: 8192,
251251
contextWindow: 128_000,
252252
supportsImages: false,
253-
supportsComputerUse: false,
253+
supportsBrowserUse: false,
254254
supportsPromptCache: false,
255255
inputPrice: 0.1,
256256
outputPrice: 0.1,
@@ -260,7 +260,7 @@ export const bedrockModels = {
260260
maxTokens: 8192,
261261
contextWindow: 128_000,
262262
supportsImages: false,
263-
supportsComputerUse: false,
263+
supportsBrowserUse: false,
264264
supportsPromptCache: false,
265265
inputPrice: 2.4,
266266
outputPrice: 2.4,
@@ -270,7 +270,7 @@ export const bedrockModels = {
270270
maxTokens: 8192,
271271
contextWindow: 128_000,
272272
supportsImages: false,
273-
supportsComputerUse: false,
273+
supportsBrowserUse: false,
274274
supportsPromptCache: false,
275275
inputPrice: 0.72,
276276
outputPrice: 0.72,
@@ -280,7 +280,7 @@ export const bedrockModels = {
280280
maxTokens: 8192,
281281
contextWindow: 128_000,
282282
supportsImages: false,
283-
supportsComputerUse: false,
283+
supportsBrowserUse: false,
284284
supportsPromptCache: false,
285285
inputPrice: 0.9,
286286
outputPrice: 0.9,
@@ -290,7 +290,7 @@ export const bedrockModels = {
290290
maxTokens: 8192,
291291
contextWindow: 8_000,
292292
supportsImages: false,
293-
supportsComputerUse: false,
293+
supportsBrowserUse: false,
294294
supportsPromptCache: false,
295295
inputPrice: 0.22,
296296
outputPrice: 0.22,
@@ -300,7 +300,7 @@ export const bedrockModels = {
300300
maxTokens: 2048,
301301
contextWindow: 8_000,
302302
supportsImages: false,
303-
supportsComputerUse: false,
303+
supportsBrowserUse: false,
304304
supportsPromptCache: false,
305305
inputPrice: 2.65,
306306
outputPrice: 3.5,
@@ -309,7 +309,7 @@ export const bedrockModels = {
309309
maxTokens: 2048,
310310
contextWindow: 4_000,
311311
supportsImages: false,
312-
supportsComputerUse: false,
312+
supportsBrowserUse: false,
313313
supportsPromptCache: false,
314314
inputPrice: 0.3,
315315
outputPrice: 0.6,
@@ -318,7 +318,7 @@ export const bedrockModels = {
318318
maxTokens: 4096,
319319
contextWindow: 8_000,
320320
supportsImages: false,
321-
supportsComputerUse: false,
321+
supportsBrowserUse: false,
322322
supportsPromptCache: false,
323323
inputPrice: 0.15,
324324
outputPrice: 0.2,
@@ -328,7 +328,7 @@ export const bedrockModels = {
328328
maxTokens: 4096,
329329
contextWindow: 8_000,
330330
supportsImages: false,
331-
supportsComputerUse: false,
331+
supportsBrowserUse: false,
332332
supportsPromptCache: false,
333333
inputPrice: 0.2,
334334
outputPrice: 0.6,
@@ -338,7 +338,7 @@ export const bedrockModels = {
338338
maxTokens: 8192,
339339
contextWindow: 8_000,
340340
supportsImages: false,
341-
supportsComputerUse: false,
341+
supportsBrowserUse: false,
342342
supportsPromptCache: false,
343343
inputPrice: 0.1,
344344
description: "Amazon Titan Text Embeddings",
@@ -347,7 +347,7 @@ export const bedrockModels = {
347347
maxTokens: 8192,
348348
contextWindow: 8_000,
349349
supportsImages: false,
350-
supportsComputerUse: false,
350+
supportsBrowserUse: false,
351351
supportsPromptCache: false,
352352
inputPrice: 0.02,
353353
description: "Amazon Titan Text Embeddings V2",

0 commit comments

Comments
 (0)