Conversation
🦋 Changeset detectedLatest commit: 870503e 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 |
✱ Stainless preview buildsThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ✅ stagehand-php studio · code · diff
✅ stagehand-openapi studio · code · diff
✅ stagehand-ruby studio · conflict
✅ stagehand-go studio · code · diff
✅ stagehand-java studio · code · diff
✅ stagehand-kotlin studio · code · diff
|
| 💡 Schema/DeprecatedWithoutMessage: Confirm schema is deprecated and add missing deprecation details if needed. |
⚠️ stagehand-typescript studio · code · diff
Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ⚠️→build ✅(prev:build ⏭️) →lint ❗(prev:lint ⏭️) →test ✅npm install https://pkg.stainless.com/s/stagehand-typescript/20c258d0827e550de23f76b26e3ce4d3d02903d3/dist.tar.gzNew diagnostics (1 note)
💡 Schema/DeprecatedWithoutMessage: Confirm schema is deprecated and add missing deprecation details if needed.
⚡ stagehand-python studio · conflict
Your SDK build resulted in a merge conflict between your custom code and the newly generated changes, which is a regression from the base state.
You don't need to resolve this conflict right now, but you will need to resolve it for your changes to be released to your users. Read more about why this happened here.
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-04-30 15:52:51 UTC
There was a problem hiding this comment.
No issues found across 6 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Client
participant Server as Stagehand Server (v3)
participant BB as Browserbase API
Note over Client,BB: Session Initialization Flow
Client->>Server: POST /v1/sessions/start
Note right of Client: Header: x-bb-api-key<br/>Optional: x-bb-project-id (DEPRECATED)
alt Session ID provided
Server->>BB: GET /sessions/{id}
BB-->>Server: Return Session Object (id, projectId, connectUrl)
Server->>Server: CHANGED: Extract projectId from BB response
else New Session
Server->>Server: Prepare Create Payload
Note right of Server: DEPRECATED: projectId from params/headers<br/>no longer prioritized
Server->>BB: POST /sessions (create)
BB-->>Server: Return Session Object (id, projectId, connectUrl)
Server->>Server: CHANGED: Extract projectId from BB response
end
alt Validation
Server->>Server: Ensure browserbaseApiKey & resolved projectId exist
else Missing Credentials
Server-->>Client: 400 Bad Request
end
Note over Server: Initialize streaming context with<br/>resolved browserbaseProjectId
Server-->>Client: 201 Created (Session Details)
Note over Client,BB: Streaming / Command Execution
Client->>Server: POST /v1/requests (stream)
Server->>Server: CHANGED: Use resolved projectId (not from headers)
Server->>BB: Connect to session via connectUrl
BB-->>Server: WebSocket / Stream data
Server-->>Client: Response Stream
why
Browserbase API keys are project-scoped, so Stagehand should keep accepting project IDs without requiring them.
what changed
browserbaseSessionCreateParams.projectIddeprecated in Zod/OpenAPI.BROWSERBASE_PROJECT_IDnullable/deprecated in Stainless config.projectIdin the local server instead ofx-bb-project-id.test plan
pnpm --filter @browserbasehq/stagehand run lintpnpm --filter @browserbasehq/stagehand-server-v3 run lintSummary by cubic
Deprecate Browserbase project ID per STG-1808; Stagehand now relies on project-scoped API keys and the project ID returned by Browserbase. The
x-bb-project-idheader, sessionprojectIdparam, andBROWSERBASE_PROJECT_IDconfig are deprecated but remain optional for now.Refactors
projectIdin session create params as deprecated in Zod/OpenAPI; updated security scheme descriptions to reflect deprecation ofx-bb-project-id.BROWSERBASE_PROJECT_IDnullable and marked deprecated instainless.yml.projectIdfrom the retrieved/created Browserbase session; stops readingx-bb-project-idand adjusts validation messages.Migration
x-bb-project-idand removeBROWSERBASE_PROJECT_ID; they’re no longer needed.projectIdin session creation; it’s accepted but deprecated.Written for commit 5ee90b8. Summary will update on new commits. Review in cubic