[STG-1808] Deprecate Browserbase project ID

Merged
MO
7mo ago
+29-15

why

Browserbase API keys are project-scoped, so Stagehand should keep accepting project IDs without requiring them.

what changed

  • Mark browserbaseSessionCreateParams.projectId deprecated in Zod/OpenAPI.
  • Make BROWSERBASE_PROJECT_ID nullable/deprecated in Stainless config.
  • Use Browserbase-returned projectId in the local server instead of x-bb-project-id.
projectId: z.string().optional().meta({ deprecated: true })

test plan

  • pnpm --filter @browserbasehq/stagehand run lint
  • pnpm --filter @browserbasehq/stagehand-server-v3 run lint

Summary 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-id header, session projectId param, and BROWSERBASE_PROJECT_ID config are deprecated but remain optional for now.

  • Refactors

    • Marked projectId in session create params as deprecated in Zod/OpenAPI; updated security scheme descriptions to reflect deprecation of x-bb-project-id.
    • Made BROWSERBASE_PROJECT_ID nullable and marked deprecated in stainless.yml.
    • Server now resolves projectId from the retrieved/created Browserbase session; stops reading x-bb-project-id and adjusts validation messages.
  • Migration

    • Stop sending x-bb-project-id and remove BROWSERBASE_PROJECT_ID; they’re no longer needed.
    • Avoid passing projectId in session creation; it’s accepted but deprecated.