Skip to content

Commit da429d4

Browse files
authored
Add Muse Wonder support to Meta Computer Use models (#140)
1 parent df69ca0 commit da429d4

5 files changed

Lines changed: 20 additions & 13 deletions

File tree

‎hyperbrowser/models/consts.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
"muse-spark-1.1",
138138
"muse-spark-1.2",
139139
"muse-spark-1.3",
140+
"muse-wonder-1.0",
140141
]
141142
MetaReasoningEffort = Literal[
142143
"minimal",

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "hyperbrowser"
3-
version = "1.11.0"
3+
version = "1.11.1"
44
description = "Python SDK for hyperbrowser"
55
authors = ["Nikhil Shahi <nshahi1998@gmail.com>"]
66
license = "MIT"

‎tests/test_meta_computer_use_models.py‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
import pytest
2+
13
from hyperbrowser.models.agents.meta_computer_use import MetaComputerUseTaskResponse
24

35

4-
def test_meta_computer_use_task_response_parses_responses_style_step_payload() -> None:
6+
@pytest.mark.parametrize("llm", ["muse-spark-1.3", "muse-wonder-1.0"])
7+
def test_meta_computer_use_task_response_parses_responses_style_step_payload(
8+
llm,
9+
) -> None:
510
payload = {
611
"jobId": "job-123",
712
"status": "completed",
@@ -12,13 +17,13 @@ def test_meta_computer_use_task_response_parses_responses_style_step_payload() -
1217
"completed_at": 1788743511,
1318
"output_text": (
1419
"Second sentence in the Ecology section "
15-
'(Population subsection) of the Dog Wikipedia page:\n\n'
20+
"(Population subsection) of the Dog Wikipedia page:\n\n"
1621
'"In 2020, the estimated global dog population was '
1722
'between 700 million and 1 billion."'
1823
),
1924
"error": None,
2025
"incomplete_details": None,
21-
"model": "muse-spark-1.3",
26+
"model": llm,
2227
"output": [
2328
{
2429
"type": "reasoning",
@@ -54,7 +59,7 @@ def test_meta_computer_use_task_response_parses_responses_style_step_payload() -
5459
"output_text": "",
5560
"error": {"code": "ERR", "message": "something failed"},
5661
"incomplete_details": {"reason": "timeout"},
57-
"model": "muse-spark-1.3",
62+
"model": llm,
5863
"output": [
5964
{
6065
"type": "function_call",
@@ -78,7 +83,7 @@ def test_meta_computer_use_task_response_parses_responses_style_step_payload() -
7883
assert final_step.completed_at == 1788743511
7984
assert final_step.error is None
8085
assert final_step.incomplete_details is None
81-
assert final_step.model == "muse-spark-1.3"
86+
assert final_step.model == llm
8287
assert final_step.reasoning is not None
8388
assert final_step.reasoning.effort == "medium"
8489
assert final_step.reasoning.summary == "concise"

‎tests/test_request_compat.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,19 @@ def test_claude_computer_use_serializes_reasoning_effort_for_mapping_and_legacy_
149149
}
150150

151151

152-
def test_meta_computer_use_serializes_for_mapping_and_legacy_model():
152+
@pytest.mark.parametrize("llm", ["muse-spark-1.3", "muse-wonder-1.0"])
153+
def test_meta_computer_use_serializes_for_mapping_and_legacy_model(llm):
153154
mapping = {
154155
"task": "Complete the task",
155-
"llm": "muse-spark-1.3",
156+
"llm": llm,
156157
"reasoning_effort": "max",
157158
"use_custom_api_keys": True,
158159
"api_keys": {"meta": "meta-key"},
159160
"use_computer_action": True,
160161
}
161162
legacy = StartMetaComputerUseTaskParams(
162163
task="Complete the task",
163-
llm="muse-spark-1.3",
164+
llm=llm,
164165
reasoning_effort="max",
165166
use_custom_api_keys=True,
166167
api_keys=MetaComputerUseApiKeys(meta="meta-key"),
@@ -173,7 +174,7 @@ def test_meta_computer_use_serializes_for_mapping_and_legacy_model():
173174
)
174175
assert dump_request(mapping, StartMetaComputerUseTaskParams) == {
175176
"task": "Complete the task",
176-
"llm": "muse-spark-1.3",
177+
"llm": llm,
177178
"reasoningEffort": "max",
178179
"useCustomApiKeys": True,
179180
"apiKeys": {"meta": "meta-key"},

‎tests/typecheck/valid_requests.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def valid_sync_requests(client: Hyperbrowser) -> None:
137137
client.agents.meta_computer_use.start(
138138
{
139139
"task": "Complete the task",
140-
"llm": "muse-spark-1.3",
140+
"llm": "muse-wonder-1.0",
141141
"reasoning_effort": "max",
142142
"use_custom_api_keys": True,
143143
"api_keys": {"meta": "meta-key"},
@@ -341,8 +341,8 @@ async def valid_async_requests(client: AsyncHyperbrowser) -> None:
341341
await client.agents.meta_computer_use.start(
342342
{
343343
"task": "Complete the task",
344-
"llm": "muse-spark-1.2",
345-
"reasoning_effort": "xhigh",
344+
"llm": "muse-wonder-1.0",
345+
"reasoning_effort": "max",
346346
}
347347
)
348348
await client.sandboxes.create(

0 commit comments

Comments
 (0)