Skip to content

Commit 1ff82f3

Browse files
release: 3.20.0
1 parent 41dbb0e commit 1ff82f3

53 files changed

Lines changed: 2516 additions & 181 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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.19.3"
2+
".": "3.20.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-b969ce378479c79ee64c05127c0ed6c6ce2edbee017ecd037242fb618a5ebc9f.yml
3-
openapi_spec_hash: a24aabaa5214effb679808b7f2be0ad4
4-
config_hash: a962ae71493deb11a1c903256fb25386
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/stagehand-6f6bfb81d092f30a5e2005328c97d61b9ea36132bb19e9e79e55294b9534ce20.yml
3+
openapi_spec_hash: f3fc1e3688a38dc2c28f7178f7d534e5
4+
config_hash: 1fb12ae9b478488bc1e56bfbdc210b01

CHANGELOG.md

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

3+
## 3.20.0 (2026-05-06)
4+
5+
Full Changelog: [v3.19.3...v3.20.0](https://github.com/browserbase/stagehand-java/compare/v3.19.3...v3.20.0)
6+
7+
### Features
8+
9+
* [feat]: add `ignoreSelectors` to `extract()` ([ab25ab1](https://github.com/browserbase/stagehand-java/commit/ab25ab1c249cb689ea39cb2e3970927d616ddefd))
10+
* [STG-1798] feat: support Browserbase verified sessions ([59ee151](https://github.com/browserbase/stagehand-java/commit/59ee1516eb17d6b8474b12d2722ff4627fa2557c))
11+
* [STG-1808] Deprecate Browserbase project ID ([4700262](https://github.com/browserbase/stagehand-java/commit/47002629082ee0a602b2b4739be7b7b605337040))
12+
* Bedrock auth passthrough ([7d5037a](https://github.com/browserbase/stagehand-java/commit/7d5037abacedbee829f0fe238565ed81c211eba9))
13+
* **client:** more robust error parsing ([c7d063a](https://github.com/browserbase/stagehand-java/commit/c7d063aa513f6b62ca7e95d0031a5018516a114f))
14+
* **client:** support proxy authentication ([7572751](https://github.com/browserbase/stagehand-java/commit/7572751215d53839a93f8d0fc1dd303994813aca))
15+
* remove experimental requirement on agent variables ([#2079](https://github.com/browserbase/stagehand-java/issues/2079)) ([1a0a44c](https://github.com/browserbase/stagehand-java/commit/1a0a44c9d3d95f32df91a72ee3d1f42c7634aa6e))
16+
* Revert "[STG-1573] Add providerOptions for extensible model auth ([#1822](https://github.com/browserbase/stagehand-java/issues/1822))" ([c337e61](https://github.com/browserbase/stagehand-java/commit/c337e61dd9b2cc366bceec0e7119874acdc3b069))
17+
* support setting headers via env ([ab67768](https://github.com/browserbase/stagehand-java/commit/ab677681d664219c7f006c72b49b723922280a26))
18+
19+
20+
### Performance Improvements
21+
22+
* **client:** create one json mapper ([5f27b6b](https://github.com/browserbase/stagehand-java/commit/5f27b6bdce009ea88970dea1ce52cd1d29169c98))
23+
24+
25+
### Chores
26+
27+
* remove duplicated dokka setup ([25bb04d](https://github.com/browserbase/stagehand-java/commit/25bb04d02c26e2929adf6b2e1ea0d37b2843880f))
28+
29+
30+
### Documentation
31+
32+
* clarify forwards compat behavior ([0463c65](https://github.com/browserbase/stagehand-java/commit/0463c65a44d0b165f9a6f850d0096cb6af207b97))
33+
* remove bad semicolon ([b3e9df1](https://github.com/browserbase/stagehand-java/commit/b3e9df1d14045e2a4ebc18bb16b75453856e6311))
34+
335
## 3.19.3 (2026-04-03)
436

537
Full Changelog: [v3.18.0...v3.19.3](https://github.com/browserbase/stagehand-java/compare/v3.18.0...v3.19.3)

README.md

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![Maven Central](https://img.shields.io/maven-central/v/com.browserbase.api/stagehand-java)](https://central.sonatype.com/artifact/com.browserbase.api/stagehand-java/3.19.3)
6-
[![javadoc](https://javadoc.io/badge2/com.browserbase.api/stagehand-java/3.19.3/javadoc.svg)](https://javadoc.io/doc/com.browserbase.api/stagehand-java/3.19.3)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.browserbase.api/stagehand-java)](https://central.sonatype.com/artifact/com.browserbase.api/stagehand-java/3.20.0)
6+
[![javadoc](https://javadoc.io/badge2/com.browserbase.api/stagehand-java/3.20.0/javadoc.svg)](https://javadoc.io/doc/com.browserbase.api/stagehand-java/3.20.0)
77

88
<!-- x-release-please-end -->
99

@@ -85,7 +85,7 @@ Most existing browser automation tools either require you to write low-level cod
8585
### Gradle
8686

8787
```kotlin
88-
implementation("com.browserbase.api:stagehand-java:3.19.3")
88+
implementation("com.browserbase.api:stagehand-java:3.20.0")
8989
```
9090

9191
### Maven
@@ -94,7 +94,7 @@ implementation("com.browserbase.api:stagehand-java:3.19.3")
9494
<dependency>
9595
<groupId>com.browserbase.api</groupId>
9696
<artifactId>stagehand-java</artifactId>
97-
<version>3.19.3</version>
97+
<version>3.20.0</version>
9898
</dependency>
9999
```
100100

@@ -115,10 +115,8 @@ Multiregion support: see `stagehand-java-example/src/main/java/com/stagehand/api
115115

116116
Set your environment variables (from `examples/.env.example`):
117117

118-
- `STAGEHAND_API_URL`
119118
- `MODEL_API_KEY`
120119
- `BROWSERBASE_API_KEY`
121-
- `BROWSERBASE_PROJECT_ID`
122120

123121
```bash
124122
cp examples/.env.example examples/.env
@@ -258,8 +256,8 @@ Configure the client using system properties or environment variables:
258256
import com.browserbase.api.client.StagehandClient;
259257
import com.browserbase.api.client.okhttp.StagehandOkHttpClient;
260258

261-
// Configures using the `stagehand.browserbaseApiKey`, `stagehand.browserbaseProjectId`, `stagehand.modelApiKey` and `stagehand.baseUrl` system properties
262-
// Or configures using the `BROWSERBASE_API_KEY`, `BROWSERBASE_PROJECT_ID`, `MODEL_API_KEY` and `STAGEHAND_BASE_URL` environment variables
259+
// Configures using the `stagehand.browserbaseApiKey`, `stagehand.modelApiKey` and `stagehand.baseUrl` system properties
260+
// Or configures using the `BROWSERBASE_API_KEY`, `MODEL_API_KEY` and `STAGEHAND_API_URL` environment variables
263261
StagehandClient client = StagehandOkHttpClient.fromEnv();
264262
```
265263

@@ -271,7 +269,6 @@ import com.browserbase.api.client.okhttp.StagehandOkHttpClient;
271269

272270
StagehandClient client = StagehandOkHttpClient.builder()
273271
.browserbaseApiKey("My Browserbase API Key")
274-
.browserbaseProjectId("My Browserbase Project ID")
275272
.modelApiKey("My Model API Key")
276273
.build();
277274
```
@@ -283,8 +280,8 @@ import com.browserbase.api.client.StagehandClient;
283280
import com.browserbase.api.client.okhttp.StagehandOkHttpClient;
284281

285282
StagehandClient client = StagehandOkHttpClient.builder()
286-
// Configures using the `stagehand.browserbaseApiKey`, `stagehand.browserbaseProjectId`, `stagehand.modelApiKey` and `stagehand.baseUrl` system properties
287-
// Or configures using the `BROWSERBASE_API_KEY`, `BROWSERBASE_PROJECT_ID`, `MODEL_API_KEY` and `STAGEHAND_BASE_URL` environment variables
283+
// Configures using the `stagehand.browserbaseApiKey`, `stagehand.modelApiKey` and `stagehand.baseUrl` system properties
284+
// Or configures using the `BROWSERBASE_API_KEY`, `MODEL_API_KEY` and `STAGEHAND_API_URL` environment variables
288285
.fromEnv()
289286
.browserbaseApiKey("My Browserbase API Key")
290287
.build();
@@ -295,9 +292,10 @@ See this table for the available options:
295292
| Setter | System property | Environment variable | Required | Default value |
296293
| ---------------------- | -------------------------------- | ------------------------ | -------- | ----------------------------------------- |
297294
| `browserbaseApiKey` | `stagehand.browserbaseApiKey` | `BROWSERBASE_API_KEY` | true | - |
298-
| `browserbaseProjectId` | `stagehand.browserbaseProjectId` | `BROWSERBASE_PROJECT_ID` | true | - |
299295
| `modelApiKey` | `stagehand.modelApiKey` | `MODEL_API_KEY` | true | - |
300-
| `baseUrl` | `stagehand.baseUrl` | `STAGEHAND_BASE_URL` | true | `"https://api.stagehand.browserbase.com"` |
296+
| `baseUrl` | `stagehand.baseUrl` | `STAGEHAND_API_URL` | false | `"https://api.stagehand.browserbase.com"` |
297+
298+
`browserbaseProjectId` is deprecated, accepted for backwards compatibility, and ignored. `STAGEHAND_BASE_URL` remains supported as a deprecated fallback when `STAGEHAND_API_URL` is unset.
301299

302300
System properties take precedence over environment variables.
303301

@@ -345,8 +343,8 @@ import com.browserbase.api.models.sessions.SessionActParams;
345343
import com.browserbase.api.models.sessions.SessionActResponse;
346344
import java.util.concurrent.CompletableFuture;
347345

348-
// Configures using the `stagehand.browserbaseApiKey`, `stagehand.browserbaseProjectId`, `stagehand.modelApiKey` and `stagehand.baseUrl` system properties
349-
// Or configures using the `BROWSERBASE_API_KEY`, `BROWSERBASE_PROJECT_ID`, `MODEL_API_KEY` and `STAGEHAND_BASE_URL` environment variables
346+
// Configures using the `stagehand.browserbaseApiKey`, `stagehand.modelApiKey` and `stagehand.baseUrl` system properties
347+
// Or configures using the `BROWSERBASE_API_KEY`, `MODEL_API_KEY` and `STAGEHAND_API_URL` environment variables
350348
StagehandClient client = StagehandOkHttpClient.fromEnv();
351349

352350
SessionActParams params = SessionActParams.builder()
@@ -365,8 +363,8 @@ import com.browserbase.api.models.sessions.SessionActParams;
365363
import com.browserbase.api.models.sessions.SessionActResponse;
366364
import java.util.concurrent.CompletableFuture;
367365

368-
// Configures using the `stagehand.browserbaseApiKey`, `stagehand.browserbaseProjectId`, `stagehand.modelApiKey` and `stagehand.baseUrl` system properties
369-
// Or configures using the `BROWSERBASE_API_KEY`, `BROWSERBASE_PROJECT_ID`, `MODEL_API_KEY` and `STAGEHAND_BASE_URL` environment variables
366+
// Configures using the `stagehand.browserbaseApiKey`, `stagehand.modelApiKey` and `stagehand.baseUrl` system properties
367+
// Or configures using the `BROWSERBASE_API_KEY`, `MODEL_API_KEY` and `STAGEHAND_API_URL` environment variables
370368
StagehandClientAsync client = StagehandOkHttpClientAsync.fromEnv();
371369

372370
SessionActParams params = SessionActParams.builder()
@@ -432,7 +430,7 @@ client.async().sessions().actStreaming(params)
432430
.subscribe(chunk -> {
433431
System.out.println(chunk);
434432
})
435-
.onCompleteFuture();
433+
.onCompleteFuture()
436434
.whenComplete((unused, error) -> {
437435
if (error != null) {
438436
System.out.println("Something went wrong!");
@@ -636,6 +634,21 @@ StagehandClient client = StagehandOkHttpClient.builder()
636634
.build();
637635
```
638636

637+
If the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:
638+
639+
```java
640+
import com.browserbase.api.client.StagehandClient;
641+
import com.browserbase.api.client.okhttp.StagehandOkHttpClient;
642+
import com.browserbase.api.core.http.ProxyAuthenticator;
643+
644+
StagehandClient client = StagehandOkHttpClient.builder()
645+
.fromEnv()
646+
.proxy(...)
647+
// Or a custom implementation of `ProxyAuthenticator`.
648+
.proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))
649+
.build();
650+
```
651+
639652
### Connection pooling
640653

641654
To customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:
@@ -873,7 +886,9 @@ In rare cases, the API may return a response that doesn't match the expected typ
873886

874887
By default, the SDK will not throw an exception in this case. It will throw [`StagehandInvalidDataException`](stagehand-java-core/src/main/kotlin/com/browserbase/api/errors/StagehandInvalidDataException.kt) only if you directly access the property.
875888

876-
If you would prefer to check that the response is completely well-typed upfront, then either call `validate()`:
889+
Validating the response is _not_ forwards compatible with new types from the API for existing fields.
890+
891+
If you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:
877892

878893
```java
879894
import com.browserbase.api.models.sessions.SessionActResponse;

build.gradle.kts

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

99
allprojects {
1010
group = "com.browserbase.api"
11-
version = "3.19.3" // x-release-please-version
11+
version = "3.20.0" // x-release-please-version
1212
}
1313

1414
subprojects {
@@ -21,7 +21,6 @@ subprojects {
2121
group = "Verification"
2222
description = "Verifies all source files are formatted."
2323
}
24-
apply(plugin = "org.jetbrains.dokka")
2524
}
2625

2726
subprojects {

examples/.env.example

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
STAGEHAND_API_URL=https://api.stagehand.browserbase.com
21
MODEL_API_KEY=sk-proj-your-llm-api-key-here
32
BROWSERBASE_API_KEY=bb_live_your_api_key_here
4-
BROWSERBASE_PROJECT_ID=your-bb-project-uuid-here

0 commit comments

Comments
 (0)