Skip to content

Commit fd7bffe

Browse files
release: 3.5.0 (#303)
* Removal of x-sent-at from manually maintained helpers, and cleanup of modelconfig string * Fixed tests * chore: update SDK settings * feat: add auto-bedrock support based on bedrock/provider.model-name * chore(internal): version bump * fix(docs): fix mcp installation instructions for remote servers * feat: Update stainless.yml for project and publish settings * release: 3.5.0 --------- Co-authored-by: monadoid <sam.finton@gmail.com> Co-authored-by: Sam F <43347795+monadoid@users.noreply.github.com> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 5954b85 commit fd7bffe

File tree

15 files changed

+77
-51
lines changed

15 files changed

+77
-51
lines changed

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release Doctor
22
on:
33
pull_request:
44
branches:
5-
- stainless
5+
- main
66
workflow_dispatch:
77

88
jobs:

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.4.8"
2+
".": "3.5.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 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
4-
config_hash: 242651c4871c2869ba3c2e3d337505b9
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-43e6dd4ce19381de488d296e9036fea15bfea9a6f946cf8ccf4e02aecc8fb765.yml
3+
openapi_spec_hash: f736e7a8acea0d73e1031c86ea803246
4+
config_hash: b375728ccf7d33287335852f4f59c293

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## 3.5.0 (2026-01-29)
4+
5+
Full Changelog: [v3.4.8...v3.5.0](https://github.com/browserbase/stagehand-python/compare/v3.4.8...v3.5.0)
6+
7+
### Features
8+
9+
* add auto-bedrock support based on bedrock/provider.model-name ([eaded9f](https://github.com/browserbase/stagehand-python/commit/eaded9ffb050c297b86223c333044d8c22dd3cf4))
10+
* Update stainless.yml for project and publish settings ([f90c553](https://github.com/browserbase/stagehand-python/commit/f90c55378c03c18215d1cdc153f84d587e5048b0))
11+
12+
13+
### Bug Fixes
14+
15+
* **docs:** fix mcp installation instructions for remote servers ([85f8584](https://github.com/browserbase/stagehand-python/commit/85f85840c9e9de4c0c1b07ec1ef41936788ea88b))
16+
17+
18+
### Chores
19+
20+
* **internal:** version bump ([d227b02](https://github.com/browserbase/stagehand-python/commit/d227b0213aa729243fbc56d818a808536b98b191))
21+
* update SDK settings ([879b799](https://github.com/browserbase/stagehand-python/commit/879b7990e8095ca106bf9553159d6c7a01936ec9))
22+
323
## 3.4.8 (2026-01-27)
424

525
Full Changelog: [v3.4.7...v3.4.8](https://github.com/browserbase/stagehand-python/compare/v3.4.7...v3.4.8)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,9 @@ session = response.parse() # get the object that `sessions.start()` would have
606606
print(session.data)
607607
```
608608

609-
These methods return an [`APIResponse`](https://github.com/browserbase/stagehand-python/tree/stainless/src/stagehand/_response.py) object.
609+
These methods return an [`APIResponse`](https://github.com/browserbase/stagehand-python/tree/main/src/stagehand/_response.py) object.
610610

611-
The async client returns an [`AsyncAPIResponse`](https://github.com/browserbase/stagehand-python/tree/stainless/src/stagehand/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
611+
The async client returns an [`AsyncAPIResponse`](https://github.com/browserbase/stagehand-python/tree/main/src/stagehand/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
612612

613613
#### `.with_streaming_response`
614614

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "stagehand"
3-
version = "3.4.8"
3+
version = "3.5.0"
44
description = "The official Python library for the stagehand API"
55
dynamic = ["readme"]
66
license = "MIT"
@@ -122,7 +122,7 @@ path = "README.md"
122122
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
123123
# replace relative links with absolute links
124124
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
125-
replacement = '[\1](https://github.com/browserbase/stagehand-python/tree/stainless/\g<2>)'
125+
replacement = '[\1](https://github.com/browserbase/stagehand-python/tree/main/\g<2>)'
126126

127127
[tool.pytest.ini_options]
128128
testpaths = ["tests"]

src/stagehand/_client.py

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

55
import os
6-
import datetime
76
from typing import TYPE_CHECKING, Any, Mapping
87
from typing_extensions import Self, Literal, override
98

@@ -220,7 +219,6 @@ def default_headers(self) -> dict[str, str | Omit]:
220219
**super().default_headers,
221220
"x-language": "python",
222221
"x-sdk-version": __version__,
223-
"x-sent-at": datetime.datetime.now(datetime.timezone.utc).isoformat().replace("+00:00", "Z"),
224222
"X-Stainless-Async": "false",
225223
**self._custom_headers,
226224
}
@@ -236,6 +234,7 @@ def copy(
236234
local_host: str | None = None,
237235
local_port: int | None = None,
238236
local_headless: bool | None = None,
237+
local_chrome_path: str | None = None,
239238
local_ready_timeout_s: float | None = None,
240239
local_openai_api_key: str | None = None,
241240
local_shutdown_on_close: bool | None = None,
@@ -280,6 +279,7 @@ def copy(
280279
local_host=local_host or self._local_host,
281280
local_port=local_port if local_port is not None else self._local_port,
282281
local_headless=local_headless if local_headless is not None else self._local_headless,
282+
local_chrome_path=local_chrome_path if local_chrome_path is not None else self._local_chrome_path,
283283
local_ready_timeout_s=local_ready_timeout_s
284284
if local_ready_timeout_s is not None
285285
else self._local_ready_timeout_s,
@@ -506,7 +506,6 @@ def default_headers(self) -> dict[str, str | Omit]:
506506
**super().default_headers,
507507
"x-language": "python",
508508
"x-sdk-version": __version__,
509-
"x-sent-at": datetime.datetime.now(datetime.timezone.utc).isoformat().replace("+00:00", "Z"),
510509
"X-Stainless-Async": f"async:{get_async_library()}",
511510
**self._custom_headers,
512511
}
@@ -522,6 +521,7 @@ def copy(
522521
local_host: str | None = None,
523522
local_port: int | None = None,
524523
local_headless: bool | None = None,
524+
local_chrome_path: str | None = None,
525525
local_ready_timeout_s: float | None = None,
526526
local_openai_api_key: str | None = None,
527527
local_shutdown_on_close: bool | None = None,
@@ -566,6 +566,7 @@ def copy(
566566
local_host=local_host or self._local_host,
567567
local_port=local_port if local_port is not None else self._local_port,
568568
local_headless=local_headless if local_headless is not None else self._local_headless,
569+
local_chrome_path=local_chrome_path if local_chrome_path is not None else self._local_chrome_path,
569570
local_ready_timeout_s=local_ready_timeout_s
570571
if local_ready_timeout_s is not None
571572
else self._local_ready_timeout_s,

src/stagehand/_models.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -857,12 +857,15 @@ def construct( # type: ignore
857857
_fields_set: set[str] | None = None,
858858
**values: Unpack[FinalRequestOptionsInput],
859859
) -> FinalRequestOptions:
860-
kwargs: dict[str, Any] = {
860+
kwargs: dict[str, Any] = {}
861+
for key, value in values.items():
862+
if key == "headers" and is_mapping(value):
863+
# Preserve Omit() for headers so callers can explicitly remove defaults.
864+
kwargs[key] = {k: v for k, v in value.items() if not isinstance(v, NotGiven)}
865+
continue
861866
# we unconditionally call `strip_not_given` on any value
862867
# as it will just ignore any non-mapping types
863-
key: strip_not_given(value)
864-
for key, value in values.items()
865-
}
868+
kwargs[key] = strip_not_given(value)
866869
if PYDANTIC_V1:
867870
return cast(FinalRequestOptions, super().construct(_fields_set, **kwargs)) # pyright: ignore[reportDeprecated]
868871
return super().model_construct(_fields_set, **kwargs)

src/stagehand/_streaming.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __stream__(self) -> Iterator[_T]:
5656

5757
try:
5858
for sse in iterator:
59-
if sse.data.startswith("finished"):
59+
if sse.data.startswith('{"data":{"status":"finished"'):
6060
break
6161

6262
if sse.data.startswith("error"):
@@ -139,7 +139,7 @@ async def __stream__(self) -> AsyncIterator[_T]:
139139

140140
try:
141141
async for sse in iterator:
142-
if sse.data.startswith("finished"):
142+
if sse.data.startswith('{"data":{"status":"finished"'):
143143
break
144144

145145
if sse.data.startswith("error"):

src/stagehand/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "stagehand"
4-
__version__ = "3.4.8" # x-release-please-version
4+
__version__ = "3.5.0" # x-release-please-version

0 commit comments

Comments
 (0)