c2249f390e
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