Skip to content

Unexpected output type, ignoring: <class 'openai.types.responses.response_output_item.McpCall'> #777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
codefromthecrypt opened this issue May 28, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@codefromthecrypt
Copy link
Contributor

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

@codefromthecrypt codefromthecrypt added the bug Something isn't working label May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant