Skip to content

Commit 2f03c9a

Browse files
committed
fix: use correct 'content' key in AgentEngineSandboxCodeExecutor input files
The AgentEngineSandboxCodeExecutor builds input file payloads with key 'contents' (plural), but the Vertex AI SDK reads 'content' (singular). This causes file.get('content', b'') to always return empty bytes — all input files are silently created as zero bytes in the sandbox with SUCCESS status returned. Fixes the same root cause as PR #5505 which fixed this in other files but missed agent_engine_sandbox_code_executor.py. Ref: #5500, #5505, #5824
1 parent 4006fe4 commit 2f03c9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/google/adk/code_executors/agent_engine_sandbox_code_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def execute_code(
180180
input_data['files'] = [
181181
{
182182
'name': f.name,
183-
'contents': f.content,
183+
'content': f.content,
184184
'mimeType': f.mime_type,
185185
}
186186
for f in code_execution_input.input_files

0 commit comments

Comments
 (0)