From e4593b62a56258406d2d0467a157f7719142ae2f Mon Sep 17 00:00:00 2001 From: weiguangli-io Date: Mon, 27 Apr 2026 17:47:26 +0800 Subject: [PATCH] fix: use correct 'content' key in sandbox code executor input files Fixes #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/code_executors/agent_engine_sandbox_code_executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/adk/code_executors/agent_engine_sandbox_code_executor.py b/src/google/adk/code_executors/agent_engine_sandbox_code_executor.py index 6634847271..e4bdbc3e03 100644 --- a/src/google/adk/code_executors/agent_engine_sandbox_code_executor.py +++ b/src/google/adk/code_executors/agent_engine_sandbox_code_executor.py @@ -174,7 +174,7 @@ def execute_code( input_data['files'] = [ { 'name': f.name, - 'contents': f.content, + 'content': f.content, 'mimeType': f.mime_type, } for f in code_execution_input.input_files