Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions agentflow/core/graph/agent_internal/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,14 @@ async def execute(

is_stream = config.get("is_stream", False)

if state.context and state.context[-1].role == "tool":
response = await self._call_llm_with_retry(messages=messages, stream=is_stream)
else:
tools = await self._resolve_tools(container)
response = await self._call_llm_with_retry(
messages=messages,
tools=tools if tools else None,
stream=is_stream,
)
# Always resolve tools - even after tool results, the model may want to call
# additional tools (e.g., Gemini 2.5+ with sequential tool calls)
tools = await self._resolve_tools(container)
response = await self._call_llm_with_retry(
messages=messages,
tools=tools if tools else None,
stream=is_stream,
)

converter_key = self._get_converter_key()
return ModelResponseConverter(response, converter=converter_key)
Expand Down
3 changes: 1 addition & 2 deletions agentflow/runtime/protocols/a2a/_optional.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@


A2A_EXTRA_INSTALL_HINT = (
"Install it with 'pip install 10xscale-agentflow[a2a_sdk]' "
"or 'pip install a2a-sdk'."
"Install it with 'pip install 10xscale-agentflow[a2a_sdk]' " "or 'pip install a2a-sdk'."
)


Expand Down
Loading