Skip to content

Conversation

@stainless-app
Copy link
Contributor

@stainless-app stainless-app bot commented Jan 27, 2026

Automated Release PR

3.4.8 (2026-01-27)

Full Changelog: v3.4.7...v3.4.8

Chores


This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions


Summary by cubic

Release 3.4.8 adds session replay and per-execute caching, simplifies session params, and adds raw binary/streaming request support. It also refreshes CI workflows.

  • New Features

    • Execute: added should_cache option and cacheEntry in SessionExecuteResponse.
    • Session replay: new SessionReplayResponse for retrieving replay data.
    • Client: supports raw binary and streaming bodies (BinaryTypes/AsyncBinaryTypes); safer request logging.
    • Params: frameId is now optional across act/execute/extract/observe/navigate.
  • Migration

    • Install from PyPI as stagehand; project is now MIT licensed.
    • sessions.end(id) no longer accepts a body; remove any SessionEndParams usage.
    • Remove x_sent_at from requests; it’s no longer accepted.
    • Handle optional cacheEntry in execute responses if should_cache is true.

Written for commit 7914f28. Summary will update on new commits. Review in cubic

@stainless-app
Copy link
Contributor Author

stainless-app bot commented Jan 27, 2026

🧪 Testing

To try out this version of the SDK, run:

pip install 'https://pkg.stainless.com/s/stagehand-python/efaf774f0dbd93db8e15e5c3800d62dd7670006c/stagehand_alpha-3.4.7-py3-none-any.whl'

Expires at: Thu, 26 Feb 2026 17:38:59 GMT
Updated at: Tue, 27 Jan 2026 17:38:59 GMT

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 30 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant User as Client Code
    participant SDK as Stagehand SDK
    participant API as Backend API

    Note over User, API: 1. NEW: Binary/Streaming Request Support
    User->>SDK: client.post(..., content=bytes_or_iter)
    
    alt NEW: 'content' parameter usage
        SDK->>SDK: Validate 'body' (JSON) is not set
        SDK->>SDK: Pass raw content to underlying httpx transport
    else Deprecated: 'body' with bytes
        SDK->>SDK: Emit DeprecationWarning
        SDK->>SDK: Treat as content
    end
    
    SDK->>API: POST /endpoint (Raw Binary Stream)
    API-->>SDK: 200 OK
    SDK-->>User: Response

    Note over User, API: 2. UPDATED: Session Execution & Caching
    User->>SDK: sessions.execute(..., should_cache=True)
    
    SDK->>SDK: CHANGED: 'x-sent-at' header removed
    
    SDK->>API: POST /v1/sessions/{id}/agentExecute
    Note right of SDK: Payload includes {"shouldCache": true}
    
    alt Success with Cache
        API-->>SDK: 200 OK
        Note left of API: Response includes 'cacheEntry' object
        SDK-->>User: SessionExecuteResponse (w/ cache_entry)
    else Standard Execution
        API-->>SDK: 200 OK
        SDK-->>User: SessionExecuteResponse
    end

    Note over User, API: 3. NEW: Session Replay
    User->>SDK: sessions.replay(id)
    SDK->>API: NEW: GET /v1/sessions/{id}/replay
    API-->>SDK: 200 OK (JSON)
    Note left of API: Returns actions, token usage, timestamps
    SDK-->>User: SessionReplayResponse
Loading

Copy link
Contributor

@shrey150 shrey150 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-approving

pyproject.toml Outdated
[project]
name = "stagehand"
version = "3.4.7"
name = "stagehand-alpha"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this rename intentional?

Comment on lines +74 to +77
class DataCacheEntry(BaseModel):
cache_key: str = FieldInfo(alias="cacheKey")
"""Opaque cache identifier computed from instruction, URL, options, and config"""

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking that this caching functionality should be exposed right now

@monadoid monadoid merged commit 5954b85 into main Jan 27, 2026
5 of 7 checks passed
@stainless-app
Copy link
Contributor Author

stainless-app bot commented Jan 27, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants