Conversation
|
✱ Stainless preview buildsThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ✅ stagehand-typescript studio · code · diff
✅ stagehand-openapi studio · code · diff
✅ stagehand-php studio · code · diff
✅ stagehand-kotlin studio · code · diff
✅ stagehand-java studio · code · diff
✅ stagehand-csharp studio · code · diff
✅ stagehand-python studio · code · diff
✅ stagehand-ruby studio · code · diff
✅ stagehand-go studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
3 issues found across 10 files
Confidence score: 4/5
- This PR is likely safe to merge, but there is a standards/completeness gap:
regionis described as deprecated without using the formal schema flag (deprecated: true), which reduces accuracy in generated API docs and client tooling. - The most impactful issue is in
packages/server-v4/openapi.v4.yaml(and matching output schema): without explicit deprecation metadata, consumers may not see deprecation warnings even though STG-1443 expects them. - The same deprecation-marker mismatch appears in
packages/server-v3/openapi.v3.yamlandpackages/core/lib/v3/types/public/api.ts, so behavior is consistent but still not fully aligned with the requested spec contract. - Pay close attention to
packages/server-v4/openapi.v4.yaml,packages/server-v3/openapi.v3.yaml, andpackages/core/lib/v3/types/public/api.ts- ensureregionis formally marked withdeprecated: truein request/output schemas and generated spec sources.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/server-v4/openapi.v4.yaml">
<violation number="1" location="packages/server-v4/openapi.v4.yaml:401">
P2: According to linked Linear issue STG-1443, this field needs a formal deprecation marker in the spec/docs. Add `deprecated: true` on this `region` property (and the matching output schema property), not just deprecation text in `description`.</violation>
</file>
<file name="packages/core/lib/v3/types/public/api.ts">
<violation number="1" location="packages/core/lib/v3/types/public/api.ts:292">
P2: According to linked Linear issue STG-1443, this field should be explicitly marked deprecated in the generated spec/docs; description text alone is not a schema deprecation flag.</violation>
</file>
<file name="packages/server-v3/openapi.v3.yaml">
<violation number="1" location="packages/server-v3/openapi.v3.yaml:401">
P2: According to linked Linear issue STG-1443, this field needs to be marked deprecated in generated spec/docs, but this change only adds descriptive text. Add `deprecated: true` for `region` (request and output schemas) so generators emit actual deprecation metadata.</violation>
</file>
Architecture diagram
sequenceDiagram
participant Client as SDK Client (Go/Py/Java/Ruby)
participant API as Regional API Endpoint
participant Server as Hosted Stagehand Server
participant BB as Browserbase Infra
Note over Client,API: User selects region via baseUrl (e.g., EU-Central-1)
Client->>API: NEW: Request with baseUrl: 'https://api.euc1...'
Note right of Client: Request may still contain<br/>deprecated 'region' field
API->>Server: Route to regional instance
Server->>Server: NEW: Resolve region from AWS_REGION env
Note right of Server: CHANGED: Server overrides any<br/>provided 'region' parameter
Server->>BB: Create session in resolved region
BB-->>Server: Session metadata (ID, Region)
Server-->>API: Session Details
API-->>Client: 201 Created
Note over Client,Server: 'browserbaseSessionCreateParams.region' is now deprecated
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
1 issue found across 4 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/docs/v3/sdk/python.mdx">
<violation number="1" location="packages/docs/v3/sdk/python.mdx:245">
P2: According to linked Linear issue STG-1443, this section should explicitly mark `browserbaseSessionCreateParams.region` as deprecated; the new text only says it is retained for compatibility.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
What
Add clearer documentation for using
baseUrl/base_urlto select a regional Stagehand API endpoint in generated SDK docs. Also markbrowserbaseSessionCreateParams.regionas deprecated in the generated spec/docs.Note that our bugbots are complaining about not using zod meta for
deprecatedfield but they are inaccurate - I tried this.Why
For hosted Stagehand, the API endpoint the client calls is what determines the pod region. In the hosted server, any client-provided
browserbaseSessionCreateParams.regionis overridden to the API instance'sAWS_REGION, sobaseUrlis the correct user-facing mechanism to document.Testing