Skip to content

feat(provider): upload screenshots once before gateway serialization - #169

Merged
sarath-menon merged 3 commits into
mainfrom
screenshot-file-refs
Oct 1, 2026
Merged

sarath-menon merged 3 commits into
mainfrom
screenshot-file-refs

Conversation

@sarath-menon

@sarath-menon sarath-menon commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Upload repeated screenshots once before agent requests reach the Cloud gateway, then reuse run/account-scoped provider file references. Bound the cache and uploads, preserve conversation history and beta flags, and delete files during disposal. This supports verified direct OpenAI Responses and direct Anthropic routes; Bedrock and other unsupported routes keep their existing behavior. BrowserCode #170 is required to cover the configuration-only OpenAI default selector discovered in shared staging.

How we tested in staging

We deployed the gateway first, then the released BrowserCode worker through the normal staging workflow; read-only AWS checks confirmed the matching image and READY runtime. The full existing API suite passed all 61 checks.

Two owned browser tasks used direct OpenAI gpt-6.1-sol and direct Anthropic claude-fable-5. Each took one screenshot, made three separate text-only tool turns, and returned the expected earlier image details. Each had four later model requests with one file reference and zero inline images. Datadog lifecycle logs record one upload and one successful deletion per task; test sessions, browsers, and workspaces were cleaned up.

OpenAI run: eab3ef01-5d4d-4245-9949-63699149fc82. Anthropic run: b57f33c0-8f24-4fa4-8daf-7246c2c6d302. These are shared-staging results, not production savings.

The original screenshot-files.1 binary passed direct Anthropic but failed OpenAI's file-reference assertion. The final checks above use screenshot-files.2, including #170, pinned by browser-use/cloud#6269 with gateway browser-use/cloud#6266. The label covers that corrected combined deployment. No production deployment was performed.

exe.dev user added 3 commits October 1, 2026 08:00
Externalize Cloud Responses images before gateway JSON serialization, preserving tool history with bounded run caches, expiry recovery, ownership proofs and disposal cleanup.
@sarath-menon
sarath-menon merged commit fa8b091 into main Oct 1, 2026
3 checks passed
@sarath-menon sarath-menon added the tested-in-staging Verified in shared staging with recorded evidence label Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tested-in-staging Verified in shared staging with recorded evidence

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant