diff --git a/hyperbrowser/models/consts.py b/hyperbrowser/models/consts.py index c77f63d3..a95d5fcf 100644 --- a/hyperbrowser/models/consts.py +++ b/hyperbrowser/models/consts.py @@ -57,6 +57,7 @@ "gemini-3.8-flash", ] HyperAgentLlm = Literal[ + "gpt-6.1-terra", "gpt-6-luna", "gpt-5.6-luna", "gpt-5.5", diff --git a/pyproject.toml b/pyproject.toml index 68d23222..14df01cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "hyperbrowser" -version = "1.15.1" +version = "1.15.2" description = "Python SDK for hyperbrowser" authors = ["Nikhil Shahi "] license = "MIT" diff --git a/tests/test_hyper_agent_models.py b/tests/test_hyper_agent_models.py new file mode 100644 index 00000000..28cca730 --- /dev/null +++ b/tests/test_hyper_agent_models.py @@ -0,0 +1,20 @@ +import pytest +from pydantic import ValidationError + +from hyperbrowser.client._request import dump_request +from hyperbrowser.models.agents.hyper_agent import StartHyperAgentTaskParams + + +@pytest.mark.parametrize("llm", ["gpt-6.1-terra", "gpt-6-luna"]) +def test_start_hyper_agent_accepts_gpt6_models(llm: str) -> None: + dumped = dump_request( + {"task": "Inspect the page", "llm": llm, "version": "1.1.0"}, + StartHyperAgentTaskParams, + ) + assert dumped["llm"] == llm + assert StartHyperAgentTaskParams(task="Inspect the page", llm=llm).llm == llm + + +def test_start_hyper_agent_rejects_unknown_model() -> None: + with pytest.raises(ValidationError): + StartHyperAgentTaskParams(task="Inspect the page", llm="gpt-6-orbit")