Skip to content

fix: use correct 'content' key in sandbox code executor input files#5505

Open
weiguangli-io wants to merge 2 commits intogoogle:mainfrom
weiguangli-io:fix/sandbox-content-key-5500
Open

fix: use correct 'content' key in sandbox code executor input files#5505
weiguangli-io wants to merge 2 commits intogoogle:mainfrom
weiguangli-io:fix/sandbox-content-key-5500

Conversation

@weiguangli-io
Copy link
Copy Markdown
Contributor

Fixes #5500

Root Cause

AgentEngineSandboxCodeExecutor builds the input file payload with key 'contents' (plural), but the Vertex AI SDK (vertexai/_genai/sandboxes.py) reads 'content' (singular). This causes file.get("content", b"") to always return the default empty bytes, so uploaded input files silently arrive as zero bytes in the sandbox.

Fix

One-character change: 'contents''content' at line 177.

Fixes google#5500. The input file payload used 'contents' (plural) but the
Vertex AI SDK reads 'content' (singular), causing uploaded files to
arrive as zero bytes in the sandbox with no error raised.
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Apr 27, 2026

Response from ADK Triaging Agent

Hello @weiguangli-io, thank you for creating this PR!

This PR is a bug fix, could you please include a testing plan section in your PR to describe how you will test?

In addition, could you please provide logs or screenshot after the fix is applied?

This information will help reviewers to review your PR more efficiently. Thanks!

@adk-bot adk-bot added the core [Component] This issue is related to the core interface and implementation label Apr 27, 2026
@rohityan rohityan self-assigned this Apr 27, 2026
@rohityan
Copy link
Copy Markdown
Collaborator

rohityan commented Apr 27, 2026

Hi @weiguangli-io , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Your PR has been received by the team and is currently under review. We will provide feedback as soon as we have an update to share.

@rohityan rohityan added the needs review [Status] The PR/issue is awaiting review from the maintainer label Apr 27, 2026
@rohityan
Copy link
Copy Markdown
Collaborator

Hi @sasha-gitg , can you please review this.

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

Labels

core [Component] This issue is related to the core interface and implementation needs review [Status] The PR/issue is awaiting review from the maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AgentEngineSandboxCodeExecutor sends 'contents' but Vertex SDK reads 'content' — input file payload silently dropped

3 participants