docs(sdk): clarify regional baseUrl usage and deprecate request region

BA
5mo ago
+148-3

What

Adds clearer documentation for using baseUrl / base_url / option.WithBaseURL() to select a regional Stagehand API endpoint in the generated Go, Java, Python, and Ruby SDK docs. Marks browserbaseSessionCreateParams.region as deprecated in the generated OpenAPI spec.

Why

For hosted Stagehand, the API endpoint the client calls is what determines the pod region. The hosted server overrides any client-provided browserbaseSessionCreateParams.region with the API instance's AWS_REGION, so baseUrl is the correct user-facing mechanism to document.

Changes

  • Add Client configuration / baseUrl examples to Go, Java, Python, and Ruby SDK docs
  • Add deprecation description + example for region in BrowserbaseSessionCreateParamsSchema
  • Add the four regional Stagehand API endpoints to OpenAPI servers (us-west-2 default, us-east-1, eu-central-1, ap-southeast-1) for both server-v3 and server-v4
  • Apply deprecated: true to region via Stainless patches so generated SDKs reflect the deprecation

Note

This is a revive of #1820 by @monadoid. Original PR was approved but went stale and conflicts with main. Rebased onto current main and resolved conflicts in packages/server-v4/openapi.v4.yaml (the schema layout shifted but the region field changes apply cleanly to both BrowserbaseSessionCreateParams and BrowserbaseSessionCreateParamsOutput).

Authorship preserved via git commit --author.


Summary by cubic

Clarifies how to choose a Stagehand region via the client baseUrl and deprecates the request-level region for Browserbase sessions. OpenAPI now lists regional endpoints so generated SDKs and docs reflect endpoint-based routing.