docs(sdk): clarify regional baseUrl usage and deprecate request region
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/baseUrlexamples to Go, Java, Python, and Ruby SDK docs - Add deprecation description + example for
regioninBrowserbaseSessionCreateParamsSchema - 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: truetoregionvia 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.
-
New Features
- SDK docs (Go, Java, Python, Ruby) now show
option.WithBaseURL(),baseUrl, andbase_urlexamples for regional endpoints. - OpenAPI servers include us-west-2 (default), us-east-1, eu-central-1, and ap-southeast-1 endpoints.
- SDK docs (Go, Java, Python, Ruby) now show
-
Migration
- Use the client
baseUrlto pick a region; stop relying on requestregion(deprecated and ignored on hosted Stagehand). - Endpoints: https://api.stagehand.browserbase.com (us-west-2), https://api.use1.stagehand.browserbase.com (us-east-1), https://api.euc1.stagehand.browserbase.com (eu-central-1), https://api.apse1.stagehand.browserbase.com (ap-southeast-1).
- Use the client