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
7 changes: 6 additions & 1 deletion hyperbrowser/models/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"claude-3-5-haiku-20241022",
"gemini-2.0-flash",
"gemini-2.5-flash",
"gemini-4-hydrogen",
"gemini-3.8-flash",
]
HyperAgentLlm = Literal[
Expand All @@ -76,6 +77,7 @@
# Deprecated: retires November 30, 2026. Use "claude-sonnet-5".
"claude-sonnet-4-5",
"gemini-2.5-flash",
"gemini-4-hydrogen",
"gemini-3.8-flash",
"gemini-3.7-flash",
"gemini-3-flash-preview",
Expand Down Expand Up @@ -132,6 +134,7 @@
"max",
]
GeminiComputerUseLlm = Literal[
"gemini-4-hydrogen",
"gemini-4-carbon",
"gemini-4-argon",
"gemini-3.8-flash",
Expand All @@ -142,12 +145,14 @@
"gemini-3-flash-preview",
"gemini-2.5-computer-use-preview-10-2025",
]
# Gemini 4 Carbon, Gemini 4 Argon, 3.8 Flash, and 3.7 Flash do not support "minimal".
# Gemini 4 Hydrogen, Gemini 4 Carbon, Gemini 4 Argon, 3.8 Flash, and 3.7 Flash do not support "minimal".
# Only Gemini 4 Hydrogen supports "xhigh".
GeminiComputerUseReasoningEffort = Literal[
"minimal",
"low",
"medium",
"high",
"xhigh",
]
GrokComputerUseLlm = Literal[
"grok-4.7",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hyperbrowser"
version = "1.15.2"
version = "1.15.3"
description = "Python SDK for hyperbrowser"
authors = ["Nikhil Shahi <nshahi1998@gmail.com>"]
license = "MIT"
Expand Down
16 changes: 12 additions & 4 deletions tests/test_request_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,29 @@ def test_claude_computer_use_serializes_reasoning_effort_for_mapping_and_legacy_
}


@pytest.mark.parametrize("llm", ["gemini-4-carbon", "gemini-4-argon"])
@pytest.mark.parametrize(
("llm", "reasoning_effort"),
[
("gemini-4-hydrogen", "xhigh"),
("gemini-4-carbon", "high"),
("gemini-4-argon", "high"),
],
)
def test_gemini_computer_use_serializes_gemini_4_reasoning_effort_for_mapping_and_legacy_model(
llm,
reasoning_effort,
):
mapping = {
"task": "Complete the task",
"llm": llm,
"reasoning_effort": "high",
"reasoning_effort": reasoning_effort,
"use_custom_api_keys": True,
"api_keys": {"google": "google-key"},
}
legacy = StartGeminiComputerUseTaskParams(
task="Complete the task",
llm=llm,
reasoning_effort="high",
reasoning_effort=reasoning_effort,
use_custom_api_keys=True,
api_keys=GeminiComputerUseApiKeys(google="google-key"),
)
Expand All @@ -177,7 +185,7 @@ def test_gemini_computer_use_serializes_gemini_4_reasoning_effort_for_mapping_an
assert dump_request(mapping, StartGeminiComputerUseTaskParams) == {
"task": "Complete the task",
"llm": llm,
"reasoningEffort": "high",
"reasoningEffort": reasoning_effort,
"useCustomApiKeys": True,
"apiKeys": {"google": "google-key"},
}
Expand Down
2 changes: 1 addition & 1 deletion tests/typecheck/invalid_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def invalid_sync_requests(client: Hyperbrowser) -> None:
{ # P
"task": "Complete the task",
"llm": "gemini-4-argon",
"reasoning_effort": "xhigh", # M
"reasoning_effort": "max", # M
}
)
WebsiteExtractTool.runnable(
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 @@ -140,6 +140,13 @@ def valid_sync_requests(client: Hyperbrowser) -> None:
"reasoning_effort": "low",
}
)
client.agents.gemini_computer_use.start(
{
"task": "Complete the task",
"llm": "gemini-4-hydrogen",
"reasoning_effort": "xhigh",
}
)
client.agents.jev_computer_use.start(
{
"task": "Find the order",
Expand Down