You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Changes
Reuse the previous full PAGE_STATE prompt when URL + cleaned LLM-facing DOM are unchanged.
Append a small PAGE_STATE_UNCHANGED marker instead of resending another screenshot/DOM blob, allowing provider prompt caching to reuse the retained full state.
Force a full refresh after 3 reused steps by default.
Add state_cache_max_reuse_steps, BROWSER_USE_RS_STATE_CACHE_MAX_REUSE_STEPS, and BU_RS_STATE_CACHE_MAX_REUSE_STEPS; set to 0 to disable.
Add prompt metadata for page-state bytes, page-state image bytes, reuse marker count, and reuse count.
Notes
The cache key uses cleaned browser state: URL + rendered LLM DOM. It does not use raw DOM, and it ignores exact screenshot bytes to avoid animation/ad churn defeating cache reuse.
Full PAGE_STATE is not reused when the retained full state contained transient <read_state>.