Skip to content

PyCharm Fails to Recognize Agent Constructor Arguments (v0.0.15) #712

Open
@masfernandez

Description

@masfernandez

Hi everyone,

I'm having an issue with PyCharm 2025.1.1 not correctly recognizing arguments for Agent when using openai-agents==0.0.15 on Python 3.13.3.

The Problem:
PyCharm flags valid parameters like name, instructions, model, tools, etc., with warnings (yellow squiggles) and doesn't provide any auto-suggestions or parameter info for them.

Key Details:

  • The code runs perfectly fine. This seems to be purely an IDE static analysis/code intelligence issue.
  • The problem persists even in a brand new, minimal project with only openai-agents installed.
  • Navigating to the Agent class (Ctrl+Click) works and shows it's a @DataClass.
  • PyCharm caches have been invalidated multiple times.

Environment:

  • openai-agents version: 0.0.15
  • Python version: 3.13.3
  • IDE: PyCharm 2025.1.1

Has anyone else experienced this or have any ideas what might be causing PyCharm to struggle with the Agent dataclass definition or how to get auto-suggestions working? Any tips would be appreciated!

Thanks!

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about using the SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions