<#1252 Route call_handler through Agent code mode>...
# flyte-github
a
#1252 Route call_handler through Agent code mode Pull request opened by cosmicBboy Summary • Wrap tools that define
call_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-sdk