CompressionManager incompatible with OpenAIResponses - _format_tool_params receives Function objects instead of dicts

Description:

When using CompressionManager with a Team or Agent that uses OpenAIResponses as the model, the _format_tool_params method crashes because it receives Function objects but expects dictionaries.


Environment:

  • Agno version: 2.3.x

  • OpenAI SDK: 2.x

  • Python: 3.10/3.11

Steps to reproduce:

from agno.team.team import Team
from agno.models.openai.responses import OpenAIResponses
from agno.models.openai import OpenAIChat
from agno.compression.manager import CompressionManager
from agno.tools.reasoning import ReasoningTools

compression_mgr = CompressionManager(
model=OpenAIChat(id=“gpt-4o-mini”),
compress_token_limit=60000,
)

team = Team(
model=OpenAIResponses(id=“gpt-4o”),  # Using OpenAIResponses
tools=[ReasoningTools(enable_think=True)],
compress_tool_results=True,
compression_manager=compression_mgr,
)

team.print_response(“Hello”)  # Crashes

Hi @shubham, thank you for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all queries one by one and will get back to you soon. If it’s urgent, please let us know. We appreciate your patience!

Hi @yuvi ,

Awaiting reply from the team.

Hey @shubham, thanks for reporting this!

We were indeed not handling the OpenAIResponse types properly. We have a fix and we are aiming to release it as part of our next release in the following days.

1 Like

Thankyou. Please let me know once this is released.