acoustic-carpenter-78188
06/25/2026, 3:05 PMcall_handler when building the Monty sandbox registry so code mode invokes handlers with the agent's call_llm and model, matching tool-calling mode behavior.
• Extract shared invoke_agent_tool / invoke_agent_tool_from_call helpers used by both execution paths.
• Extend flyte_map in the sandbox bridge to fan out over call-handler wrappers (non-TaskTemplate refs).
• Add AgentTool.aio / AgentTool.__call__ so direct invocations and flyte.map also route through `call_handler`; the agent binds call_llm and model onto handler tools at registration.
Test plan
• uv run pytest tests/flyte/ai/agents/test_agent.py::TestCodeModeHelpers -q
• uv run pytest tests/flyte/ai/agents/test_agent.py::TestCallHandler -q
• uv run pytest tests/flyte/ai/agents/test_agent.py::TestCodeModeRun -q
• uv run pytest tests/flyte/sandbox/test_map_in_sandbox.py -q
flyteorg/flyte-sdkacoustic-carpenter-78188
06/25/2026, 4:49 PM