Skip to content

Commit 07142aa

Browse files
authored
Add gemini-4-carbon to Gemini Computer Use models (#153)
* Add gemini-4-carbon to Gemini Computer Use * Revert version bump
1 parent e90e191 commit 07142aa

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

‎hyperbrowser/models/consts.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
"max",
132132
]
133133
GeminiComputerUseLlm = Literal[
134+
"gemini-4-carbon",
134135
"gemini-4-argon",
135136
"gemini-3.8-flash",
136137
"gemini-3.7-flash",
@@ -140,7 +141,7 @@
140141
"gemini-3-flash-preview",
141142
"gemini-2.5-computer-use-preview-10-2025",
142143
]
143-
# Gemini 4 Argon, 3.8 Flash, and 3.7 Flash do not support "minimal".
144+
# Gemini 4 Carbon, Gemini 4 Argon, 3.8 Flash, and 3.7 Flash do not support "minimal".
144145
GeminiComputerUseReasoningEffort = Literal[
145146
"minimal",
146147
"low",

‎tests/test_request_compat.py‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,20 @@ def test_claude_computer_use_serializes_reasoning_effort_for_mapping_and_legacy_
151151
}
152152

153153

154-
def test_gemini_computer_use_serializes_argon_reasoning_effort_for_mapping_and_legacy_model():
154+
@pytest.mark.parametrize("llm", ["gemini-4-carbon", "gemini-4-argon"])
155+
def test_gemini_computer_use_serializes_gemini_4_reasoning_effort_for_mapping_and_legacy_model(
156+
llm,
157+
):
155158
mapping = {
156159
"task": "Complete the task",
157-
"llm": "gemini-4-argon",
160+
"llm": llm,
158161
"reasoning_effort": "high",
159162
"use_custom_api_keys": True,
160163
"api_keys": {"google": "google-key"},
161164
}
162165
legacy = StartGeminiComputerUseTaskParams(
163166
task="Complete the task",
164-
llm="gemini-4-argon",
167+
llm=llm,
165168
reasoning_effort="high",
166169
use_custom_api_keys=True,
167170
api_keys=GeminiComputerUseApiKeys(google="google-key"),
@@ -173,7 +176,7 @@ def test_gemini_computer_use_serializes_argon_reasoning_effort_for_mapping_and_l
173176
)
174177
assert dump_request(mapping, StartGeminiComputerUseTaskParams) == {
175178
"task": "Complete the task",
176-
"llm": "gemini-4-argon",
179+
"llm": llm,
177180
"reasoningEffort": "high",
178181
"useCustomApiKeys": True,
179182
"apiKeys": {"google": "google-key"},

‎tests/typecheck/valid_requests.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ def valid_sync_requests(client: Hyperbrowser) -> None:
133133
"reasoning_effort": "high",
134134
}
135135
)
136+
client.agents.gemini_computer_use.start(
137+
{
138+
"task": "Complete the task",
139+
"llm": "gemini-4-carbon",
140+
"reasoning_effort": "low",
141+
}
142+
)
136143
client.agents.jev_computer_use.start(
137144
{
138145
"task": "Find the order",

0 commit comments

Comments
 (0)