Skip to content

ImportError: cannot import name 'Reasoning' from 'openai.types.responses.response_output_item' #30

@jfduque

Description

@jfduque
openai==1.66.2
openai-agents==0.0.2

from openai.types.responses.response_output_item import Reasoning

I get this when trying sample code in https://openai.github.io/openai-agents-python/quickstart/

Traceback (most recent call last):
  File "/tmp/agent.py", line 1, in <module>
    from agents import Agent, InputGuardrail, GuardrailFunctionOutput, Runner
  File "/tmp/venv/lib/python3.13/site-packages/agents/__init__.py", line 8, in <module>
    from .agent import Agent
  File "/tmp/venv/lib/python3.13/site-packages/agents/agent.py", line 11, in <module>
    from .guardrail import InputGuardrail, OutputGuardrail
  File "/tmp/venv/lib/python3.13/site-packages/agents/guardrail.py", line 12, in <module>
    from .items import TResponseInputItem
  File "/tmp/venv/lib/python3.13/site-packages/agents/items.py", line 22, in <module>
    from openai.types.responses.response_output_item import Reasoning
ImportError: cannot import name 'Reasoning' from 'openai.types.responses.response_output_item' (/tmp/venv/lib/python3.13/site-packages/openai/types/responses/response_output_item.py)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions