Skip to content

Commit 0faf1df

Browse files
feat: [fix]: add useSearch & toolTimeout to stainless types
1 parent 21189cf commit 0faf1df

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 8
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-573d364768ac1902ee5ed8b2485d3b293bda0ea8ff7898aef1a3fd6be79b594a.yml
3-
openapi_spec_hash: 107ec840f4330885dd2232a05a66fed7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-4112eba8679ed34cc7c0e4b28ee3f1569cf47d6e4a8252c28b5ef2ee02a82b8c.yml
3+
openapi_spec_hash: b46202361a71845a51d26e880a444d0b
44
config_hash: 0209737a4ab2a71afececb0ff7459998

src/stagehand/types/session_execute_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ class ExecuteOptions(TypedDict, total=False):
7979
max_steps: Annotated[float, PropertyInfo(alias="maxSteps")]
8080
"""Maximum number of steps the agent can take"""
8181

82+
tool_timeout: Annotated[float, PropertyInfo(alias="toolTimeout")]
83+
"""Timeout in milliseconds for each agent tool call"""
84+
85+
use_search: Annotated[bool, PropertyInfo(alias="useSearch")]
86+
"""Whether to enable the web search tool powered by Browserbase Search API"""
87+
8288

8389
class SessionExecuteParamsNonStreaming(SessionExecuteParamsBase, total=False):
8490
stream_response: Annotated[Literal[False], PropertyInfo(alias="streamResponse")]

tests/api_resources/test_sessions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ def test_method_execute_with_all_params_overload_1(self, client: Stagehand) -> N
247247
"instruction": "Log in with username 'demo' and password 'test123', then navigate to settings",
248248
"highlight_cursor": True,
249249
"max_steps": 20,
250+
"tool_timeout": 30000,
251+
"use_search": True,
250252
},
251253
frame_id="frameId",
252254
should_cache=True,
@@ -343,6 +345,8 @@ def test_method_execute_with_all_params_overload_2(self, client: Stagehand) -> N
343345
"instruction": "Log in with username 'demo' and password 'test123', then navigate to settings",
344346
"highlight_cursor": True,
345347
"max_steps": 20,
348+
"tool_timeout": 30000,
349+
"use_search": True,
346350
},
347351
stream_response=True,
348352
frame_id="frameId",
@@ -1107,6 +1111,8 @@ async def test_method_execute_with_all_params_overload_1(self, async_client: Asy
11071111
"instruction": "Log in with username 'demo' and password 'test123', then navigate to settings",
11081112
"highlight_cursor": True,
11091113
"max_steps": 20,
1114+
"tool_timeout": 30000,
1115+
"use_search": True,
11101116
},
11111117
frame_id="frameId",
11121118
should_cache=True,
@@ -1203,6 +1209,8 @@ async def test_method_execute_with_all_params_overload_2(self, async_client: Asy
12031209
"instruction": "Log in with username 'demo' and password 'test123', then navigate to settings",
12041210
"highlight_cursor": True,
12051211
"max_steps": 20,
1212+
"tool_timeout": 30000,
1213+
"use_search": True,
12061214
},
12071215
stream_response=True,
12081216
frame_id="frameId",

0 commit comments

Comments
 (0)