Skip to content

Commit eaded9f

Browse files
feat: add auto-bedrock support based on bedrock/provider.model-name
1 parent 879b799 commit eaded9f

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
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: 8
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-089c8670f1d7c2e9fa8e5c97010db7c24b8f162eb7cfe76ffa41d70fa46efe2f.yml
3-
openapi_spec_hash: 7a226aee8f3f2ab16febbe6bb35e1657
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-43e6dd4ce19381de488d296e9036fea15bfea9a6f946cf8ccf4e02aecc8fb765.yml
3+
openapi_spec_hash: f736e7a8acea0d73e1031c86ea803246
44
config_hash: 75b561cd2ba925e4f2a62ec2f1d13738

src/stagehand/types/session_execute_params.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ class SessionExecuteParamsBase(TypedDict, total=False):
3434

3535
class AgentConfig(TypedDict, total=False):
3636
cua: bool
37-
"""Enable Computer Use Agent mode"""
37+
"""Deprecated.
38+
39+
Use mode: 'cua' instead. If both are provided, mode takes precedence.
40+
"""
41+
42+
mode: Literal["dom", "hybrid", "cua"]
43+
"""Tool mode for the agent (dom, hybrid, cua). If set, overrides cua."""
3844

3945
model: ModelConfigParam
4046
"""

tests/api_resources/test_sessions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def test_method_execute_with_all_params_overload_1(self, client: Stagehand) -> N
225225
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
226226
agent_config={
227227
"cua": True,
228+
"mode": "cua",
228229
"model": {"model_name": "openai/gpt-5-nano"},
229230
"provider": "openai",
230231
"system_prompt": "systemPrompt",
@@ -307,6 +308,7 @@ def test_method_execute_with_all_params_overload_2(self, client: Stagehand) -> N
307308
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
308309
agent_config={
309310
"cua": True,
311+
"mode": "cua",
310312
"model": {"model_name": "openai/gpt-5-nano"},
311313
"provider": "openai",
312314
"system_prompt": "systemPrompt",
@@ -1056,6 +1058,7 @@ async def test_method_execute_with_all_params_overload_1(self, async_client: Asy
10561058
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
10571059
agent_config={
10581060
"cua": True,
1061+
"mode": "cua",
10591062
"model": {"model_name": "openai/gpt-5-nano"},
10601063
"provider": "openai",
10611064
"system_prompt": "systemPrompt",
@@ -1138,6 +1141,7 @@ async def test_method_execute_with_all_params_overload_2(self, async_client: Asy
11381141
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
11391142
agent_config={
11401143
"cua": True,
1144+
"mode": "cua",
11411145
"model": {"model_name": "openai/gpt-5-nano"},
11421146
"provider": "openai",
11431147
"system_prompt": "systemPrompt",

0 commit comments

Comments
 (0)