-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
Description
Please read this first
- Have you read the docs?Agents SDK docs [yes]
- Have you searched for related issues? Others may have had similar requests [yes]
Describe the feature
Currently, Agent.as_tool supports custom_output_extractor to optimize the tool's output before passing it to the next LLM call. However, FunctionTool lacks this functionality. This leads to inefficiency in my application: the tool's output often contains front-end presentation data (e.g., image URLs, timestamps), which is irrelevant to LLM. Forcing the entire output into the LLM context results in unnecessary token consumption and increased costs. To address this issue, I recommend extending the custom_output_extractor functionality or a similar mechanism to FunctionTool.