Repository navigation
Make projectId optional for Browserbase sessions - #1800
Conversation
Browserbase no longer requires a projectId — only an API key. This stops Stagehand from throwing when BROWSERBASE_PROJECT_ID is not set, while still passing it through when provided.
🦋 Changeset detectedLatest commit: 522c663 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The requireBrowserbaseCreds() method was updated to make projectId optional, but a second guard immediately after still checked for it and threw. Remove the redundant check. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
2 issues found across 5 files
Confidence score: 2/5
- There is a high-confidence functional issue in
packages/core/lib/v3/v3.ts: the post-requireBrowserbaseCreds()guard still throws on missingprojectId(!apiKey || !projectId), which appears to negate the intended behavior change and is likely user-impacting. packages/core/lib/v3/api.tsintroduces a behavioral change (conditionalx-bb-project-idheader) without the requested integration coverage underpackages/server/test, so regression risk against the REST client/server contract remains.- Given one very severe, concrete logic problem plus an unverified API behavior change, this looks risky to merge until corrected and tested.
- Pay close attention to
packages/core/lib/v3/v3.ts,packages/core/lib/v3/api.ts, andpackages/server/test- credential guard logic and header-contract changes need validation with integration tests.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/core/lib/v3/api.ts">
<violation number="1" location="packages/core/lib/v3/api.ts:847">
P2: Custom agent: **Any breaking changes to Stagehand REST API client / server implementation must be covered by an integration test under packages/server/test**
The conditional `x-bb-project-id` header is a behavioral change to the API client's `request()` method, but no integration test in `packages/server/test/` covers the new code path where `projectId` is absent. The existing `start.test.ts` always asserts `BROWSERBASE_PROJECT_ID` is set and sends the header. Add a test that starts a session without `x-bb-project-id` to verify the server accepts requests when `projectId` is omitted.</violation>
</file>
<file name="packages/core/lib/v3/v3.ts">
<violation number="1" location="packages/core/lib/v3/v3.ts:915">
P0: The guard after `requireBrowserbaseCreds()` still throws when `projectId` is missing (`!apiKey || !projectId`), which completely defeats the purpose of this PR. Since `requireBrowserbaseCreds()` now handles the `apiKey` check internally, this entire guard block should be removed.</violation>
</file>
Architecture diagram
sequenceDiagram
participant Env as Environment/Process
participant V3 as V3 Orchestrator
participant Launch as Session Launcher
participant Client as Stagehand API Client
participant BB as Browserbase API
participant Super as Shutdown Supervisor
Note over Env,BB: Session Initialization & Credential Guard
V3->>Env: requireBrowserbaseCreds()
Env-->>V3: apiKey, projectId (optional)
alt apiKey missing
V3-->>V3: Throw MissingEnvironmentVariableError
else apiKey present
V3->>V3: CHANGED: Cache apiKey (and optional projectId)
end
Note over V3,BB: Session Creation Flow
V3->>Launch: createBrowserbaseSession(apiKey, projectId?)
Launch->>Launch: CHANGED: Build createPayload
opt projectId exists
Launch->>Launch: Set projectId in payload
end
Launch->>BB: bb.sessions.create(payload)
BB-->>Launch: sessionId, debugUrl, etc.
Launch-->>V3: session metadata
Note over V3,BB: Runtime API Communication
V3->>Client: Initialize with apiKey, projectId?
Client->>BB: performRequest()
Note right of Client: NEW: Conditional Header Logic
opt projectId is defined
Client->>BB: Add "x-bb-project-id" header
end
BB-->>Client: response
Note over V3,Super: Cleanup & Shutdown
V3->>Super: registerSession(sessionId, apiKey, projectId?)
Note over Super,BB: On Process Exit / Close
Super->>Super: CHANGED: Verify apiKey + sessionId exist
Super->>BB: bb.sessions.update(sessionId, { status: "REQUEST_RELEASE" })
Note right of Super: NEW: Includes projectId in update only if provided
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| const defaultHeaders: Record<string, string> = { | ||
| "x-bb-api-key": this.apiKey, | ||
| "x-bb-project-id": this.projectId, | ||
| ...(this.projectId ? { "x-bb-project-id": this.projectId } : {}), |
There was a problem hiding this comment.
P2: Custom agent: Any breaking changes to Stagehand REST API client / server implementation must be covered by an integration test under packages/server/test
The conditional x-bb-project-id header is a behavioral change to the API client's request() method, but no integration test in packages/server/test/ covers the new code path where projectId is absent. The existing start.test.ts always asserts BROWSERBASE_PROJECT_ID is set and sends the header. Add a test that starts a session without x-bb-project-id to verify the server accepts requests when projectId is omitted.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/core/lib/v3/api.ts, line 847:
<comment>The conditional `x-bb-project-id` header is a behavioral change to the API client's `request()` method, but no integration test in `packages/server/test/` covers the new code path where `projectId` is absent. The existing `start.test.ts` always asserts `BROWSERBASE_PROJECT_ID` is set and sends the header. Add a test that starts a session without `x-bb-project-id` to verify the server accepts requests when `projectId` is omitted.</comment>
<file context>
@@ -844,7 +844,7 @@ export class StagehandAPIClient {
const defaultHeaders: Record<string, string> = {
"x-bb-api-key": this.apiKey,
- "x-bb-project-id": this.projectId,
+ ...(this.projectId ? { "x-bb-project-id": this.projectId } : {}),
"x-bb-session-id": this.sessionId,
// we want real-time logs, so we stream the response
</file context>
Greptile SummaryThis PR makes Key finding:
The code changes to Confidence Score: 3/5
|
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Destructure projectId, browserSettings, and userMetadata out of effectiveSessionParams before spreading, matching the pattern in browserbase.ts. Prevents projectId: undefined from overwriting the resolved value. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Verify that a browserbase session can be started with only x-bb-api-key and no x-bb-project-id header. Also fix comment on existing test to reflect that only API key is required. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
… routes The server-side guard was still requiring both x-bb-api-key and x-bb-project-id headers, causing the integration test to fail. Now only x-bb-api-key is required, matching the client-side changes. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/server-v3/src/routes/v1/sessions/start.ts">
<violation number="1" location="packages/server-v3/src/routes/v1/sessions/start.ts:114">
P2: Error message says "Missing required headers" (plural) but now only `x-bb-api-key` is checked. Update the message to reflect the single required header so callers get actionable feedback.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
SessionCreateParams requires projectId, but it's now optional. Changed satisfies to as to allow the payload without projectId. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Keeps type safety on all other fields while allowing projectId to be optional, until the Browserbase SDK type is updated upstream. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
SDK 2.7.0 already has projectId as optional in SessionCreateParams, so we can use a clean satisfies instead of the Omit workaround. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…ojectId Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Only BROWSERBASE_API_KEY is required for remote mode, matching the core SDK changes in #1800. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
## Summary - Stacked on #1800 - Only `BROWSERBASE_API_KEY` is required for remote mode in the CLI - `BROWSERBASE_PROJECT_ID` is still passed through if set, but no longer checked ## Changes - `packages/cli/src/index.ts` — `hasBrowserbaseCredentials()` only checks for API key - `packages/cli/tests/mode.test.ts` — Updated test to match new error message - `packages/cli/README.md` — Updated docs to reflect optional project ID ## Test plan - [x] Existing mode test updated - [x] Manual: `browse env remote` with only `BROWSERBASE_API_KEY` set 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Make `BROWSERBASE_PROJECT_ID` optional in the CLI for remote mode, so only `BROWSERBASE_API_KEY` is required. The project ID is still forwarded when provided. - **Bug Fixes** - Updated remote mode check and error message to only require `BROWSERBASE_API_KEY`. - Autodetection now defaults to `remote` when the API key is set; otherwise `local`. - Updated tests and `@browserbasehq/browse-cli` README to match. <sup>Written for commit 99eb186. Summary will update on new commits. <a href="https://cubic.dev/pr/browserbase/stagehand/pull/1803">Review in cubic</a></sup> <!-- End of auto-generated description by cubic. --> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @browserbasehq/[email protected] ### Minor Changes - [#1816](#1816) [`687d54a`](687d54a) Thanks [@shrey150](https://github.com/shrey150)! - Add `--context-id` and `--persist` flags to `browse open` for loading and persisting Browserbase Contexts across sessions - [#1793](#1793) [`e38c13b`](e38c13b) Thanks [@shrey150](https://github.com/shrey150)! - Initial release of browse CLI - browser automation for AI agents ### Patch Changes - [#1806](#1806) [`f8c7738`](f8c7738) Thanks [@shrey150](https://github.com/shrey150)! - Fix `browse env` showing stale mode after `browse env remote` - Updated dependencies \[[`505e8c6`](505e8c6), [`2f43ffa`](2f43ffa), [`63ee247`](63ee247), [`7dc35f5`](7dc35f5), [`335cf47`](335cf47), [`6ba0a1d`](6ba0a1d), [`4ff3bb8`](4ff3bb8), [`c27054b`](c27054b), [`2abf5b9`](2abf5b9), [`7817fcc`](7817fcc), [`7390508`](7390508), [`611f43a`](611f43a), [`521a10e`](521a10e), [`2402a3c`](2402a3c)]: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Minor Changes - [#1779](#1779) [`2f43ffa`](2f43ffa) Thanks [@shrey150](https://github.com/shrey150)! - feat: add `cdpHeaders` option to `localBrowserLaunchOptions` for passing custom HTTP headers when connecting to an existing browser via CDP URL - [#1834](#1834) [`63ee247`](63ee247) Thanks [@tkattkat](https://github.com/tkattkat)! - Update stagehand agents search tool - [#1774](#1774) [`521a10e`](521a10e) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add new page.setExtraHTTPHeaders() method ### Patch Changes - [#1759](#1759) [`505e8c6`](505e8c6) Thanks [@shrey150](https://github.com/shrey150)! - Add bedrock to the provider enum in model configuration schemas and regenerate OpenAPI spec. - [#1814](#1814) [`7dc35f5`](7dc35f5) Thanks [@tkattkat](https://github.com/tkattkat)! - Change usage of openai provider in agent to default to store:false - [#1846](#1846) [`335cf47`](335cf47) Thanks [@aq17](https://github.com/aq17)! - Fix streaming finished event being silently dropped. The final SSE event containing the result payload (success status, message, actions, usage, and messages) was previously discarded instead of being yielded to the caller. - [#1764](#1764) [`6ba0a1d`](6ba0a1d) Thanks [@shrey150](https://github.com/shrey150)! - Expose `headers` in `GoogleVertexProviderSettings` so model configs can pass custom provider headers (for example `X-Goog-Priority`) without TypeScript errors. - [#1847](#1847) [`4ff3bb8`](4ff3bb8) Thanks [@miguelg719](https://github.com/miguelg719)! - Enable FlowLogger on BROWSERBASE_FLOW_LOGS=1 - [#1752](#1752) [`c27054b`](c27054b) Thanks [@derekmeegan](https://github.com/derekmeegan)! - fix: pause Browserbase agents while captcha solving is active and improve CUA recovery after the solve completes - [#1800](#1800) [`2abf5b9`](2abf5b9) Thanks [@shrey150](https://github.com/shrey150)! - Make projectId optional for Browserbase sessions — only BROWSERBASE_API_KEY is required - [#1766](#1766) [`7817fcc`](7817fcc) Thanks [@tkattkat](https://github.com/tkattkat)! - Add configurable timeout to tools in agent - [#1749](#1749) [`7390508`](7390508) Thanks [@pirate](https://github.com/pirate)! - When connecting to a browser session that has zero open tabs, Stagehand now automatically creates an initial `about:blank` tab so the connection can continue. - [#1761](#1761) [`611f43a`](611f43a) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - fix issue where handlePossibleNavigation was producing unnecessary error logs on clicks that trigger page close - [#1817](#1817) [`2402a3c`](2402a3c) Thanks [@tkattkat](https://github.com/tkattkat)! - Add support for passing custom headers in clientOptions ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies \[[`505e8c6`](505e8c6), [`2f43ffa`](2f43ffa), [`63ee247`](63ee247), [`7dc35f5`](7dc35f5), [`335cf47`](335cf47), [`6ba0a1d`](6ba0a1d), [`4ff3bb8`](4ff3bb8), [`c27054b`](c27054b), [`2abf5b9`](2abf5b9), [`7817fcc`](7817fcc), [`7390508`](7390508), [`611f43a`](611f43a), [`521a10e`](521a10e), [`2402a3c`](2402a3c)]: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - [#1759](#1759) [`505e8c6`](505e8c6) Thanks [@shrey150](https://github.com/shrey150)! - Add bedrock to the provider enum in model configuration schemas and regenerate OpenAPI spec. - Updated dependencies \[[`505e8c6`](505e8c6), [`2f43ffa`](2f43ffa), [`63ee247`](63ee247), [`7dc35f5`](7dc35f5), [`335cf47`](335cf47), [`6ba0a1d`](6ba0a1d), [`4ff3bb8`](4ff3bb8), [`c27054b`](c27054b), [`2abf5b9`](2abf5b9), [`7817fcc`](7817fcc), [`7390508`](7390508), [`611f43a`](611f43a), [`521a10e`](521a10e), [`2402a3c`](2402a3c)]: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies \[[`505e8c6`](505e8c6), [`2f43ffa`](2f43ffa), [`63ee247`](63ee247), [`7dc35f5`](7dc35f5), [`335cf47`](335cf47), [`6ba0a1d`](6ba0a1d), [`4ff3bb8`](4ff3bb8), [`c27054b`](c27054b), [`2abf5b9`](2abf5b9), [`7817fcc`](7817fcc), [`7390508`](7390508), [`611f43a`](611f43a), [`521a10e`](521a10e), [`2402a3c`](2402a3c)]: - @browserbasehq/[email protected] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## Summary - Stacked on browserbase#1800 - Only `BROWSERBASE_API_KEY` is required for remote mode in the CLI - `BROWSERBASE_PROJECT_ID` is still passed through if set, but no longer checked ## Changes - `packages/cli/src/index.ts` — `hasBrowserbaseCredentials()` only checks for API key - `packages/cli/tests/mode.test.ts` — Updated test to match new error message - `packages/cli/README.md` — Updated docs to reflect optional project ID ## Test plan - [x] Existing mode test updated - [x] Manual: `browse env remote` with only `BROWSERBASE_API_KEY` set 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Make `BROWSERBASE_PROJECT_ID` optional in the CLI for remote mode, so only `BROWSERBASE_API_KEY` is required. The project ID is still forwarded when provided. - **Bug Fixes** - Updated remote mode check and error message to only require `BROWSERBASE_API_KEY`. - Autodetection now defaults to `remote` when the API key is set; otherwise `local`. - Updated tests and `@browserbasehq/browse-cli` README to match. <sup>Written for commit 99eb186. Summary will update on new commits. <a href="https://cubic.dev/pr/browserbase/stagehand/pull/1803">Review in cubic</a></sup> <!-- End of auto-generated description by cubic. -->
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @browserbasehq/[email protected] ### Minor Changes - [browserbase#1816](browserbase#1816) [`687d54a`](browserbase@687d54a) Thanks [@shrey150](https://github.com/shrey150)! - Add `--context-id` and `--persist` flags to `browse open` for loading and persisting Browserbase Contexts across sessions - [browserbase#1793](browserbase#1793) [`e38c13b`](browserbase@e38c13b) Thanks [@shrey150](https://github.com/shrey150)! - Initial release of browse CLI - browser automation for AI agents ### Patch Changes - [browserbase#1806](browserbase#1806) [`f8c7738`](browserbase@f8c7738) Thanks [@shrey150](https://github.com/shrey150)! - Fix `browse env` showing stale mode after `browse env remote` - Updated dependencies \[[`505e8c6`](browserbase@505e8c6), [`2f43ffa`](browserbase@2f43ffa), [`63ee247`](browserbase@63ee247), [`7dc35f5`](browserbase@7dc35f5), [`335cf47`](browserbase@335cf47), [`6ba0a1d`](browserbase@6ba0a1d), [`4ff3bb8`](browserbase@4ff3bb8), [`c27054b`](browserbase@c27054b), [`2abf5b9`](browserbase@2abf5b9), [`7817fcc`](browserbase@7817fcc), [`7390508`](browserbase@7390508), [`611f43a`](browserbase@611f43a), [`521a10e`](browserbase@521a10e), [`2402a3c`](browserbase@2402a3c)]: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Minor Changes - [browserbase#1779](browserbase#1779) [`2f43ffa`](browserbase@2f43ffa) Thanks [@shrey150](https://github.com/shrey150)! - feat: add `cdpHeaders` option to `localBrowserLaunchOptions` for passing custom HTTP headers when connecting to an existing browser via CDP URL - [browserbase#1834](browserbase#1834) [`63ee247`](browserbase@63ee247) Thanks [@tkattkat](https://github.com/tkattkat)! - Update stagehand agents search tool - [browserbase#1774](browserbase#1774) [`521a10e`](browserbase@521a10e) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - add new page.setExtraHTTPHeaders() method ### Patch Changes - [browserbase#1759](browserbase#1759) [`505e8c6`](browserbase@505e8c6) Thanks [@shrey150](https://github.com/shrey150)! - Add bedrock to the provider enum in model configuration schemas and regenerate OpenAPI spec. - [browserbase#1814](browserbase#1814) [`7dc35f5`](browserbase@7dc35f5) Thanks [@tkattkat](https://github.com/tkattkat)! - Change usage of openai provider in agent to default to store:false - [browserbase#1846](browserbase#1846) [`335cf47`](browserbase@335cf47) Thanks [@aq17](https://github.com/aq17)! - Fix streaming finished event being silently dropped. The final SSE event containing the result payload (success status, message, actions, usage, and messages) was previously discarded instead of being yielded to the caller. - [browserbase#1764](browserbase#1764) [`6ba0a1d`](browserbase@6ba0a1d) Thanks [@shrey150](https://github.com/shrey150)! - Expose `headers` in `GoogleVertexProviderSettings` so model configs can pass custom provider headers (for example `X-Goog-Priority`) without TypeScript errors. - [browserbase#1847](browserbase#1847) [`4ff3bb8`](browserbase@4ff3bb8) Thanks [@miguelg719](https://github.com/miguelg719)! - Enable FlowLogger on BROWSERBASE_FLOW_LOGS=1 - [browserbase#1752](browserbase#1752) [`c27054b`](browserbase@c27054b) Thanks [@derekmeegan](https://github.com/derekmeegan)! - fix: pause Browserbase agents while captcha solving is active and improve CUA recovery after the solve completes - [browserbase#1800](browserbase#1800) [`2abf5b9`](browserbase@2abf5b9) Thanks [@shrey150](https://github.com/shrey150)! - Make projectId optional for Browserbase sessions — only BROWSERBASE_API_KEY is required - [browserbase#1766](browserbase#1766) [`7817fcc`](browserbase@7817fcc) Thanks [@tkattkat](https://github.com/tkattkat)! - Add configurable timeout to tools in agent - [browserbase#1749](browserbase#1749) [`7390508`](browserbase@7390508) Thanks [@pirate](https://github.com/pirate)! - When connecting to a browser session that has zero open tabs, Stagehand now automatically creates an initial `about:blank` tab so the connection can continue. - [browserbase#1761](browserbase#1761) [`611f43a`](browserbase@611f43a) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - fix issue where handlePossibleNavigation was producing unnecessary error logs on clicks that trigger page close - [browserbase#1817](browserbase#1817) [`2402a3c`](browserbase@2402a3c) Thanks [@tkattkat](https://github.com/tkattkat)! - Add support for passing custom headers in clientOptions ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies \[[`505e8c6`](browserbase@505e8c6), [`2f43ffa`](browserbase@2f43ffa), [`63ee247`](browserbase@63ee247), [`7dc35f5`](browserbase@7dc35f5), [`335cf47`](browserbase@335cf47), [`6ba0a1d`](browserbase@6ba0a1d), [`4ff3bb8`](browserbase@4ff3bb8), [`c27054b`](browserbase@c27054b), [`2abf5b9`](browserbase@2abf5b9), [`7817fcc`](browserbase@7817fcc), [`7390508`](browserbase@7390508), [`611f43a`](browserbase@611f43a), [`521a10e`](browserbase@521a10e), [`2402a3c`](browserbase@2402a3c)]: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - [browserbase#1759](browserbase#1759) [`505e8c6`](browserbase@505e8c6) Thanks [@shrey150](https://github.com/shrey150)! - Add bedrock to the provider enum in model configuration schemas and regenerate OpenAPI spec. - Updated dependencies \[[`505e8c6`](browserbase@505e8c6), [`2f43ffa`](browserbase@2f43ffa), [`63ee247`](browserbase@63ee247), [`7dc35f5`](browserbase@7dc35f5), [`335cf47`](browserbase@335cf47), [`6ba0a1d`](browserbase@6ba0a1d), [`4ff3bb8`](browserbase@4ff3bb8), [`c27054b`](browserbase@c27054b), [`2abf5b9`](browserbase@2abf5b9), [`7817fcc`](browserbase@7817fcc), [`7390508`](browserbase@7390508), [`611f43a`](browserbase@611f43a), [`521a10e`](browserbase@521a10e), [`2402a3c`](browserbase@2402a3c)]: - @browserbasehq/[email protected] ## @browserbasehq/[email protected] ### Patch Changes - Updated dependencies \[[`505e8c6`](browserbase@505e8c6), [`2f43ffa`](browserbase@2f43ffa), [`63ee247`](browserbase@63ee247), [`7dc35f5`](browserbase@7dc35f5), [`335cf47`](browserbase@335cf47), [`6ba0a1d`](browserbase@6ba0a1d), [`4ff3bb8`](browserbase@4ff3bb8), [`c27054b`](browserbase@c27054b), [`2abf5b9`](browserbase@2abf5b9), [`7817fcc`](browserbase@7817fcc), [`7390508`](browserbase@7390508), [`611f43a`](browserbase@611f43a), [`521a10e`](browserbase@521a10e), [`2402a3c`](browserbase@2402a3c)]: - @browserbasehq/[email protected]
Summary
projectId— only an API keyBROWSERBASE_PROJECT_IDis not set, while still passing it through when providedrequireBrowserbaseCreds(),createBrowserbaseSession(),StagehandAPIClient, and shutdown supervisorChanges
v3.ts—requireBrowserbaseCreds()only throws on missingapiKey, makesprojectIdoptional in return type; removed redundant guard that still checkedprojectIdlaunch/browserbase.ts—projectIdparameter made optional, conditionally included in create payloadapi.ts—projectIdoptional inStagehandAPIClient,x-bb-project-idheader only sent when setshutdown/supervisor.ts— cleanup no longer requiresprojectIdtypes/private/shutdown.ts—projectIdmade optional inShutdownSupervisorConfigTest plan
BROWSERBASE_API_KEYonly (noBROWSERBASE_PROJECT_ID) — succeeds, connects to Browserbase, page loadsv3.ts:889was blocking init — fixedprojectId🤖 Generated with Claude Code
Co-authored-by: Chris Read [email protected]