Closed
Description
Describe the bug
I get this warning using HostedMCPTool
in an agent
Unexpected output type, ignoring: <class 'openai.types.responses.response_output_item.McpCall'>
A clear and concise description of what the bug is.
Debug information
- Agents SDK version: 0.0.16
- Python version: 3.13.3
Repro steps
OPENAI_API_KEY=sk-nottellin uv run -q main.py
main.py
# /// script
# requires-python = ">=3.13"
# dependencies = ["openai-agents~=0.0.16"]
# ///
import asyncio
from agents import Agent, HostedMCPTool, Runner
async def main():
agent = Agent(
name="Assistant",
tools=[
HostedMCPTool(
tool_config={
"type": "mcp",
"server_label": "gitmcp",
"server_url": "https://gitmcp.io/elastic/elasticsearch",
"require_approval": "never",
}
)
],
)
res = await Runner.run(agent, "Which language is this repo written in?")
print(res.final_output)
if __name__ == "__main__":
asyncio.run(main())
Expected behavior
expect no warnings