Conversation
🦋 Changeset detectedLatest commit: ddf5930 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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-ruby studio · code · diff
✅ stagehand-typescript studio · code · diff
✅ stagehand-openapi studio · code · diff
✅ stagehand-csharp studio · code · diff
✅ stagehand-java studio · code · diff
✅ stagehand-kotlin studio · code · diff
✅ stagehand-python studio · code · diff
✅ stagehand-go studio · code · diff
✅ stagehand-php 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.
1 issue found across 4 files
Confidence score: 4/5
- In
packages/server-v3/openapi.v3.yaml, the top-level SSE description currently suggests body-only streaming, which can mislead API consumers and generated clients for GET/header-only streaming endpoints; merging as-is risks integration mistakes rather than runtime breakage — update the SSE description to explicitly cover header-only streaming paths before merging.
Architecture diagram
sequenceDiagram
participant Dev as Developer
participant SDK as Python SDK Client
participant API as API Route (/v1/sessions/{id}/act)
participant OpenAPI as OpenAPI Spec
participant Docs as Documentation
Note over Dev,Docs: SSE Streaming Configuration Flow
Dev->>Docs: Read streaming docs
Docs-->>Dev: NEW: stream_response=True usage only
Dev->>SDK: Configure SSE stream
SDK->>API: POST /v1/sessions/{id}/act
Note over SDK,API: Body: { stream_response: true }
API->>API: NEW: Detect streamResponse field in body
alt streamResponse = true
API->>API: Enable SSE streaming mode
API-->>SDK: SSE event stream
SDK-->>Dev: StreamEvent objects
else streamResponse = false/missing
API-->>SDK: Single response object
SDK-->>Dev: Normal response
end
Note over Dev,OpenAPI: Documentation Consistency
OpenAPI->>OpenAPI: Update description
Note over OpenAPI: "x-stream-response header" → "streamResponse field"
API->>Docs: Regenerate examples
Docs->>Docs: Apply stainless.yml override
Note over Docs: sessions.act Python snippet shows streaming iteration
Dev->>SDK: Review example
SDK-->>Dev: Stream iteration pattern with for loop
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Fix SSE streaming examples to prefer stream_response/streamResponse over the legacy header.
Summary by cubic
Fixes SSE streaming docs and API copy to use
stream_response/streamResponseinstead of legacy headers, and adds a changeset to publish patches for@browserbasehq/stagehand-server-v3and@browserbasehq/stagehand-docs. Addresses Linear STG-1784 so users can stream events reliably.stream_response=Trueonly; removedx_stream_response="true"from examples and guidance.streamResponse: truein the request body, and note legacyx-stream-response: truesupport for legacy/no-body clients.stainless.ymloverrides thesessions.actPython snippet to iterate over the SSE stream.Written for commit ddf5930. Summary will update on new commits.