Files
George Weale c2249f390e feat: honor return_direct on Langchain tools wrapped by LangchainTool
Langchain tools created with @tool(return_direct=True) (and Tool /
StructuredTool instances that set the attribute) signal that their raw
result should be returned to the user without a further model
summarization turn. LangchainTool ignored this, so wrapped tools were
always summarized. Read the wrapped tool's return_direct attribute and,
when set, mark the tool context to skip summarization on run.

Close #2157

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 960591853
2026-08-06 17:28:49 -07:00
..