Skip to content

Commit 1571286

Browse files
feat: [STG-1808] Deprecate Browserbase project ID
1 parent a9b327f commit 1571286

6 files changed

Lines changed: 23 additions & 18 deletions

File tree

.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/stagehand-7182c741edd5e22cda9bd855d31ca7e60a97a409222bb887edf87b9ce15dd493.yml
3-
openapi_spec_hash: 174581867a9191c491b22855b64c4f19
4-
config_hash: a962ae71493deb11a1c903256fb25386
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/stagehand-f10429ab9f004c9a7f9f362d7fa82915e0dc04b1ba08a7bc9fd442ed5854cc77.yml
3+
openapi_spec_hash: 818f2e6e7eb5eb6f21f346b0b9828dce
4+
config_hash: 1fb12ae9b478488bc1e56bfbdc210b01

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ See this table for the available options:
397397
| Property | Environment variable | Required | Default value |
398398
| ---------------------- | ------------------------ | -------- | ----------------------------------------- |
399399
| `BrowserbaseApiKey` | `BROWSERBASE_API_KEY` | true | - |
400-
| `BrowserbaseProjectID` | `BROWSERBASE_PROJECT_ID` | true | - |
400+
| `BrowserbaseProjectID` | `BROWSERBASE_PROJECT_ID` | false | - |
401401
| `ModelApiKey` | `MODEL_API_KEY` | true | - |
402402
| `BaseUrl` | `STAGEHAND_API_URL` | true | `"https://api.stagehand.browserbase.com"` |
403403

src/Stagehand/Core/ClientOptions.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,18 @@ public string BrowserbaseApiKey
107107
}
108108

109109
/// <summary>
110-
/// Your [Browserbase Project ID](https://www.browserbase.com/settings)
110+
/// Deprecated. Browserbase API keys are now project-scoped, so this value is
111+
/// no longer required.
111112
/// </summary>
112-
Lazy<string> _browserbaseProjectID = new(() =>
113+
Lazy<string?> _browserbaseProjectID = new(() =>
113114
Environment.GetEnvironmentVariable("BROWSERBASE_PROJECT_ID")
114-
?? throw new StagehandInvalidDataException(
115-
string.Format("{0} cannot be null", nameof(BrowserbaseProjectID)),
116-
new ArgumentNullException(nameof(BrowserbaseProjectID))
117-
)
118115
);
119116

120117
/// <summary>
121-
/// Your [Browserbase Project ID](https://www.browserbase.com/settings)
118+
/// Deprecated. Browserbase API keys are now project-scoped, so this value is
119+
/// no longer required.
122120
/// </summary>
123-
public string BrowserbaseProjectID
121+
public string? BrowserbaseProjectID
124122
{
125123
readonly get { return _browserbaseProjectID.Value; }
126124
set { _browserbaseProjectID = new(() => value); }

src/Stagehand/IStagehandClient.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ public interface IStagehandClient : IDisposable
4242
string BrowserbaseApiKey { get; init; }
4343

4444
/// <summary>
45-
/// Your [Browserbase Project ID](https://www.browserbase.com/settings)
45+
/// Deprecated. Browserbase API keys are now project-scoped, so this value is
46+
/// no longer required.
4647
/// </summary>
47-
string BrowserbaseProjectID { get; init; }
48+
string? BrowserbaseProjectID { get; init; }
4849

4950
/// <summary>
5051
/// Your LLM provider API key (e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)
@@ -93,9 +94,10 @@ public interface IStagehandClientWithRawResponse : IDisposable
9394
string BrowserbaseApiKey { get; init; }
9495

9596
/// <summary>
96-
/// Your [Browserbase Project ID](https://www.browserbase.com/settings)
97+
/// Deprecated. Browserbase API keys are now project-scoped, so this value is
98+
/// no longer required.
9799
/// </summary>
98-
string BrowserbaseProjectID { get; init; }
100+
string? BrowserbaseProjectID { get; init; }
99101

100102
/// <summary>
101103
/// Your LLM provider API key (e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)

src/Stagehand/Models/Sessions/SessionStartParams.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,11 @@ public bool? KeepAlive
14511451
}
14521452
}
14531453

1454+
/// <summary>
1455+
/// Deprecated. Browserbase API keys are now project-scoped, so this field is
1456+
/// no longer required.
1457+
/// </summary>
1458+
[System::Obsolete("deprecated")]
14541459
public string? ProjectID
14551460
{
14561461
get

src/Stagehand/StagehandClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public string BrowserbaseApiKey
5959
}
6060

6161
/// <inheritdoc/>
62-
public string BrowserbaseProjectID
62+
public string? BrowserbaseProjectID
6363
{
6464
get { return this._options.BrowserbaseProjectID; }
6565
init { this._options.BrowserbaseProjectID = value; }
@@ -168,7 +168,7 @@ public string BrowserbaseApiKey
168168
}
169169

170170
/// <inheritdoc/>
171-
public string BrowserbaseProjectID
171+
public string? BrowserbaseProjectID
172172
{
173173
get { return this._options.BrowserbaseProjectID; }
174174
init { this._options.BrowserbaseProjectID = value; }

0 commit comments

Comments
 (0)