Apply patch [skip ci]

This commit is contained in:
open-swe[bot]
2025-08-11 20:17:18 +00:00
parent ebd88829b8
commit a69de5596d
@@ -599,15 +599,13 @@ def create_react_agent(
elif is_dynamic_model:
resolved_model = model(state, runtime) # type: ignore[operator]
if (
_should_bind_tools(
resolved_model, tool_classes, num_builtin=len(llm_builtin_tools)
) # type: ignore[arg-type]
_should_bind_tools(resolved_model, tool_classes, num_builtin=len(llm_builtin_tools)) # type: ignore[arg-type]
and len(tool_classes + llm_builtin_tools) > 0
):
resolved_model = cast(BaseChatModel, resolved_model).bind_tools(
tool_classes + llm_builtin_tools # type: ignore[operator]
)
return _get_prompt_runnable(prompt) | resolved_model
return _get_prompt_runnable(prompt) | resolved_model # type: ignore[operator]
else:
return static_model
@@ -1045,3 +1043,4 @@ __all__ = [