From a3dfdb19819f8fec1e265ca041ed3c3da52c39e1 Mon Sep 17 00:00:00 2001 From: Shubham Naik Date: Mon, 24 Nov 2025 16:44:01 -0800 Subject: [PATCH] feat: e2e test for injected keys (#6196) * feat: e2e test for injected keys * chore: update errors * chore: always log * chore: log step orchestrator * chore: add endpoint --------- Co-authored-by: Shubham Naik --- letta/services/tool_executor/sandbox_tool_executor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/letta/services/tool_executor/sandbox_tool_executor.py b/letta/services/tool_executor/sandbox_tool_executor.py index 656d4dc7..500b3eb2 100644 --- a/letta/services/tool_executor/sandbox_tool_executor.py +++ b/letta/services/tool_executor/sandbox_tool_executor.py @@ -53,6 +53,11 @@ class SandboxToolExecutor(ToolExecutor): # Merge fetched credentials with provided sandbox_env_vars if sandbox_env_vars is None: sandbox_env_vars = {} + + # inject some extra env such as PROJECT_ID from agent_state + if agent_state and agent_state.project_id: + fetched_credentials["PROJECT_ID"] = agent_state.project_id + sandbox_env_vars = {**fetched_credentials, **sandbox_env_vars} try: