[STG-2014] fix: mark project id optional in docs#2119
Conversation
🦋 Changeset detectedLatest commit: 32a13f1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 builds for stagehandThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ⚡ stagehand-typescript studio · conflict
⚡ stagehand-kotlin studio · conflict
⚡ stagehand-java studio · conflict
⚡ stagehand-go studio · conflict
⚡ stagehand-php studio · conflict
⚡ stagehand-python studio · conflict
✅ stagehand-csharp studio · code · diff
⚡ stagehand-ruby studio · conflict
✅ stagehand-openapi studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Client as SDK Client
participant Stainless as Stainless Codegen
participant Fastify as Fastify Server (v3)
participant OpenAPI as OpenAPI Spec
participant Docs as Generated API Docs
Note over Client,Docs: Project ID Auth Flow (Deprecated Path)
Client->>Stainless: Configure client (stainless.yml)
alt x-bb-project-id provided
Client->>Fastify: NEW: Send optional x-bb-project-id header
Fastify->>Fastify: Accept deprecated header value
end
Note over Client,Fastify: Header is no longer required for authentication
Stainless->>OpenAPI: Generate openapi.v3.yaml
OpenAPI->>Fastify: Load security schemes
Note over OpenAPI,Fastify: BBProjectIdAuth removed from required security list
Fastify->>Fastify: Validate request against security schemes
Note over Fastify: Only BrowserbaseApiKey is now required
OpenAPI->>Docs: Generate API documentation
Note over Docs: Project ID marked as deprecated optional header
Docs->>Docs: Display x-bb-project-id as nullable, not required
Note over Client,Docs: Happy Path (No Project ID)
Client->>Stainless: Initialize without x-bb-project-id
Stainless->>Fastify: Send API request (only x-bb-api-key)
Fastify->>Fastify: Authenticate via BrowserbaseApiKey only
Fastify-->>Client: 200 Success
Note over Client,Docs: Deprecated Path (With Project ID)
Client->>Stainless: Initialize with optional x-bb-project-id
Stainless->>Fastify: Send request (x-bb-api-key + x-bb-project-id)
Fastify->>Fastify: Authenticate via BrowserbaseApiKey
Note over Fastify: x-bb-project-id accepted but ignored for auth
Fastify-->>Client: 200 Success (backward compatible)
Summary
Linear: https://linear.app/browserbase/issue/STG-2014/mark-project-id-optional-in-stagehand-api-docs
Verification
Summary by cubic
Make Browserbase project ID optional in Stagehand v3 API docs and security. Removes it from required auth in OpenAPI/Stainless and keeps
x-bb-project-idas a deprecated optional header. Aligns with Linear STG-2014.x-bb-project-idheader; it’s still accepted but deprecated.Written for commit 32a13f1. Summary will update on new commits.