Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hyperbrowser/models/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"max",
]
GeminiComputerUseLlm = Literal[
"gemini-4-carbon",
"gemini-4-argon",
"gemini-3.8-flash",
"gemini-3.7-flash",
Expand All @@ -140,7 +141,7 @@
"gemini-3-flash-preview",
"gemini-2.5-computer-use-preview-10-2025",
]
# Gemini 4 Argon, 3.8 Flash, and 3.7 Flash do not support "minimal".
# Gemini 4 Carbon, Gemini 4 Argon, 3.8 Flash, and 3.7 Flash do not support "minimal".
GeminiComputerUseReasoningEffort = Literal[
"minimal",
"low",
Expand Down
11 changes: 7 additions & 4 deletions tests/test_request_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,20 @@ def test_claude_computer_use_serializes_reasoning_effort_for_mapping_and_legacy_
}


def test_gemini_computer_use_serializes_argon_reasoning_effort_for_mapping_and_legacy_model():
@pytest.mark.parametrize("llm", ["gemini-4-carbon", "gemini-4-argon"])
def test_gemini_computer_use_serializes_gemini_4_reasoning_effort_for_mapping_and_legacy_model(
llm,
):
mapping = {
"task": "Complete the task",
"llm": "gemini-4-argon",
"llm": llm,
"reasoning_effort": "high",
"use_custom_api_keys": True,
"api_keys": {"google": "google-key"},
}
legacy = StartGeminiComputerUseTaskParams(
task="Complete the task",
llm="gemini-4-argon",
llm=llm,
reasoning_effort="high",
use_custom_api_keys=True,
api_keys=GeminiComputerUseApiKeys(google="google-key"),
Expand All @@ -173,7 +176,7 @@ def test_gemini_computer_use_serializes_argon_reasoning_effort_for_mapping_and_l
)
assert dump_request(mapping, StartGeminiComputerUseTaskParams) == {
"task": "Complete the task",
"llm": "gemini-4-argon",
"llm": llm,
"reasoningEffort": "high",
"useCustomApiKeys": True,
"apiKeys": {"google": "google-key"},
Expand Down
7 changes: 7 additions & 0 deletions tests/typecheck/valid_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ def valid_sync_requests(client: Hyperbrowser) -> None:
"reasoning_effort": "high",
}
)
client.agents.gemini_computer_use.start(
{
"task": "Complete the task",
"llm": "gemini-4-carbon",
"reasoning_effort": "low",
}
)
client.agents.jev_computer_use.start(
{
"task": "Find the order",
Expand Down