Skip to content

Commit 0f5930a

Browse files
feat: LLM key strings over LLM model enum
1 parent 5a08993 commit 0f5930a

File tree

8 files changed

+20
-35
lines changed

8 files changed

+20
-35
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 26
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browser-use%2Fbrowser-use-ce018db4d6891d645cfb220c86d17ac1d431e1ba2f604e8015876b17a5a11149.yml
3-
openapi_spec_hash: e9a00924682ab214ca5d8b6b5c84430e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browser-use%2Fbrowser-use-814bdd9f98b750d42a2b713a0a12b14fc5a0241ff820b2fbc7666ab2e9a5443f.yml
3+
openapi_spec_hash: 0dae4d4d33a3ec93e470f9546e43fad3
44
config_hash: dd3e22b635fa0eb9a7c741a8aaca2a7f

api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Types:
3131
```python
3232
from browser_use_sdk.types import (
3333
FileView,
34-
LlmModel,
3534
TaskItemView,
3635
TaskStatus,
3736
TaskStepView,

src/browser_use_sdk/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
from .file_view import FileView as FileView
6-
from .llm_model import LlmModel as LlmModel
76
from .task_view import TaskView as TaskView
87
from .task_status import TaskStatus as TaskStatus
98
from .session_view import SessionView as SessionView

src/browser_use_sdk/types/llm_model.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/browser_use_sdk/types/task_create_params.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
from __future__ import annotations
44

55
from typing import Dict, List, Optional
6-
from typing_extensions import Required, Annotated, TypedDict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
77

88
from .._utils import PropertyInfo
9-
from .llm_model import LlmModel
109

1110
__all__ = ["TaskCreateParams", "AgentSettings", "BrowserSettings"]
1211

@@ -40,7 +39,19 @@ class TaskCreateParams(TypedDict, total=False):
4039

4140

4241
class AgentSettings(TypedDict, total=False):
43-
llm: LlmModel
42+
llm: Literal[
43+
"gpt-4.1",
44+
"gpt-4.1-mini",
45+
"o4-mini",
46+
"o3",
47+
"gemini-2.5-flash",
48+
"gemini-2.5-pro",
49+
"claude-sonnet-4-20250514",
50+
"gpt-4o",
51+
"gpt-4o-mini",
52+
"llama-4-maverick-17b-128e-instruct",
53+
"claude-3-7-sonnet-20250219",
54+
]
4455

4556
profile_id: Annotated[Optional[str], PropertyInfo(alias="profileId")]
4657

src/browser_use_sdk/types/task_item_view.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from pydantic import Field as FieldInfo
77

88
from .._models import BaseModel
9-
from .llm_model import LlmModel
109
from .task_status import TaskStatus
1110

1211
__all__ = ["TaskItemView"]
@@ -17,7 +16,7 @@ class TaskItemView(BaseModel):
1716

1817
is_scheduled: bool = FieldInfo(alias="isScheduled")
1918

20-
llm: LlmModel
19+
llm: str
2120

2221
session_id: str = FieldInfo(alias="sessionId")
2322

src/browser_use_sdk/types/task_view.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from .._models import BaseModel
1010
from .file_view import FileView
11-
from .llm_model import LlmModel
1211
from .task_status import TaskStatus
1312
from .task_step_view import TaskStepView
1413

@@ -37,7 +36,7 @@ class TaskView(BaseModel):
3736

3837
is_scheduled: bool = FieldInfo(alias="isScheduled")
3938

40-
llm: LlmModel
39+
llm: str
4140

4241
output_files: List[FileView] = FieldInfo(alias="outputFiles")
4342

tests/api_resources/test_tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: BrowserUse) -> None:
3939
task = client.tasks.create(
4040
task="x",
4141
agent_settings={
42-
"llm": "gpt-4o",
42+
"llm": "gpt-4.1",
4343
"profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
4444
"start_url": "startUrl",
4545
},
@@ -375,7 +375,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBrowserUse
375375
task = await async_client.tasks.create(
376376
task="x",
377377
agent_settings={
378-
"llm": "gpt-4o",
378+
"llm": "gpt-4.1",
379379
"profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
380380
"start_url": "startUrl",
381381
},

0 commit comments

Comments
 (0)