Skip to content

Commit fcf7666

Browse files
feat(api): manual updates
1 parent 8590a04 commit fcf7666

File tree

10 files changed

+37
-19
lines changed

10 files changed

+37
-19
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: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-d571232203ef4e00986a3245224267db6f8aaffdad57780f712e0694dc8d9e37.yml
3-
openapi_spec_hash: d5d635dd7b24a2e1255c6f2a895253ff
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-817d1d4e845b1946dac8ee10fd34b3f533aa36f74ac598582ffb1b0399a5a932.yml
3+
openapi_spec_hash: 9d856db62b34909fec94743235b3d7be
44
config_hash: 88e87ba7021be93d267ecfc8f5e6b891

src/stagehand/resources/sessions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def start(
498498
experimental: bool | Omit = omit,
499499
self_heal: bool | Omit = omit,
500500
system_prompt: str | Omit = omit,
501-
verbose: int | Omit = omit,
501+
verbose: Literal[0, 1, 2] | Omit = omit,
502502
wait_for_captcha_solves: bool | Omit = omit,
503503
x_language: Literal["typescript", "python", "playground"] | Omit = omit,
504504
x_sdk_version: str | Omit = omit,
@@ -1044,7 +1044,7 @@ async def start(
10441044
experimental: bool | Omit = omit,
10451045
self_heal: bool | Omit = omit,
10461046
system_prompt: str | Omit = omit,
1047-
verbose: int | Omit = omit,
1047+
verbose: Literal[0, 1, 2] | Omit = omit,
10481048
wait_for_captcha_solves: bool | Omit = omit,
10491049
x_language: Literal["typescript", "python", "playground"] | Omit = omit,
10501050
x_sdk_version: str | Omit = omit,

src/stagehand/types/model_config_param.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77

88
from .._utils import PropertyInfo
99

10-
__all__ = ["ModelConfigParam", "UnionMember1"]
10+
__all__ = ["ModelConfigParam", "ModelConfigObject"]
1111

1212

13-
class UnionMember1(TypedDict, total=False):
13+
class ModelConfigObject(TypedDict, total=False):
1414
model_name: Required[Annotated[str, PropertyInfo(alias="modelName")]]
15+
"""Model name string without prefix (e.g., 'gpt-5-nano', 'claude-4.5-opus')"""
1516

1617
api_key: Annotated[str, PropertyInfo(alias="apiKey")]
18+
"""API key for the model provider"""
1719

1820
base_url: Annotated[str, PropertyInfo(alias="baseURL")]
21+
"""Base URL for the model provider"""
1922

2023

21-
ModelConfigParam: TypeAlias = Union[str, UnionMember1]
24+
ModelConfigParam: TypeAlias = Union[str, ModelConfigObject]

src/stagehand/types/session_act_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ class InputActionInput(TypedDict, total=False):
5656

5757
class Options(TypedDict, total=False):
5858
model: ModelConfigParam
59+
"""
60+
Model name string with provider prefix (e.g., 'openai/gpt-5-nano',
61+
'anthropic/claude-4.5-opus')
62+
"""
5963

6064
timeout: float
6165
"""Timeout in ms for the action"""
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing_extensions import Literal
4-
53
from .._models import BaseModel
64

75
__all__ = ["SessionEndResponse"]
86

97

108
class SessionEndResponse(BaseModel):
11-
success: Literal[True]
9+
success: bool
10+
"""Indicates whether the request was successful"""

src/stagehand/types/session_execute_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ class AgentConfig(TypedDict, total=False):
3838
"""Enable Computer Use Agent mode"""
3939

4040
model: ModelConfigParam
41+
"""
42+
Model name string with provider prefix (e.g., 'openai/gpt-5-nano',
43+
'anthropic/claude-4.5-opus')
44+
"""
4145

4246
system_prompt: Annotated[str, PropertyInfo(alias="systemPrompt")]
4347
"""Custom system prompt for the agent"""

src/stagehand/types/session_extract_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ class SessionExtractParams(TypedDict, total=False):
3939

4040
class Options(TypedDict, total=False):
4141
model: ModelConfigParam
42+
"""
43+
Model name string with provider prefix (e.g., 'openai/gpt-5-nano',
44+
'anthropic/claude-4.5-opus')
45+
"""
4246

4347
selector: str
4448
"""CSS selector to scope extraction to a specific element"""

src/stagehand/types/session_observe_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class SessionObserveParams(TypedDict, total=False):
3636

3737
class Options(TypedDict, total=False):
3838
model: ModelConfigParam
39+
"""
40+
Model name string with provider prefix (e.g., 'openai/gpt-5-nano',
41+
'anthropic/claude-4.5-opus')
42+
"""
3943

4044
selector: str
4145
"""CSS selector to scope observation to a specific element"""

src/stagehand/types/session_start_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class SessionStartParams(TypedDict, total=False):
5757
system_prompt: Annotated[str, PropertyInfo(alias="systemPrompt")]
5858
"""Custom system prompt for AI operations"""
5959

60-
verbose: int
60+
verbose: Literal[0, 1, 2]
6161
"""Logging verbosity level (0=quiet, 1=normal, 2=debug)"""
6262

6363
wait_for_captcha_solves: Annotated[bool, PropertyInfo(alias="waitForCaptchaSolves")]

tests/api_resources/test_sessions.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_method_act_with_all_params(self, client: Stagehand) -> None:
4343
input="Click the login button",
4444
frame_id="frameId",
4545
options={
46-
"model": "string",
46+
"model": "openai/gpt-5-nano",
4747
"timeout": 30000,
4848
"variables": {"username": "john_doe"},
4949
},
@@ -164,7 +164,7 @@ def test_method_execute_with_all_params(self, client: Stagehand) -> None:
164164
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
165165
agent_config={
166166
"cua": True,
167-
"model": "string",
167+
"model": "openai/gpt-5-nano",
168168
"system_prompt": "systemPrompt",
169169
},
170170
execute_options={
@@ -242,7 +242,7 @@ def test_method_extract_with_all_params(self, client: Stagehand) -> None:
242242
frame_id="frameId",
243243
instruction="Extract all product names and prices from the page",
244244
options={
245-
"model": "string",
245+
"model": "openai/gpt-5-nano",
246246
"selector": "#main-content",
247247
"timeout": 30000,
248248
},
@@ -369,7 +369,7 @@ def test_method_observe_with_all_params(self, client: Stagehand) -> None:
369369
frame_id="frameId",
370370
instruction="Find all clickable navigation links",
371371
options={
372-
"model": "string",
372+
"model": "openai/gpt-5-nano",
373373
"selector": "nav",
374374
"timeout": 30000,
375375
},
@@ -562,7 +562,7 @@ async def test_method_act_with_all_params(self, async_client: AsyncStagehand) ->
562562
input="Click the login button",
563563
frame_id="frameId",
564564
options={
565-
"model": "string",
565+
"model": "openai/gpt-5-nano",
566566
"timeout": 30000,
567567
"variables": {"username": "john_doe"},
568568
},
@@ -683,7 +683,7 @@ async def test_method_execute_with_all_params(self, async_client: AsyncStagehand
683683
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
684684
agent_config={
685685
"cua": True,
686-
"model": "string",
686+
"model": "openai/gpt-5-nano",
687687
"system_prompt": "systemPrompt",
688688
},
689689
execute_options={
@@ -761,7 +761,7 @@ async def test_method_extract_with_all_params(self, async_client: AsyncStagehand
761761
frame_id="frameId",
762762
instruction="Extract all product names and prices from the page",
763763
options={
764-
"model": "string",
764+
"model": "openai/gpt-5-nano",
765765
"selector": "#main-content",
766766
"timeout": 30000,
767767
},
@@ -888,7 +888,7 @@ async def test_method_observe_with_all_params(self, async_client: AsyncStagehand
888888
frame_id="frameId",
889889
instruction="Find all clickable navigation links",
890890
options={
891-
"model": "string",
891+
"model": "openai/gpt-5-nano",
892892
"selector": "nav",
893893
"timeout": 30000,
894894
},

0 commit comments

Comments
 (0)