Skip to content

responses.parse() fails with GPT-5 reasoning/verbosity parameters #2532

@oxynad

Description

@oxynad

Description

The responses.parse() method throws an error when combining Pydantic structured outputs with GPT-5's
new reasoning and text parameters.

Environment

  • openai-python: 1.99.3 (AsyncOpenAI and OpenAI)
  • Model: gpt-5

Minimal reproduction

  from pydantic import BaseModel
  from openai import AsyncOpenAI

  class BookSummary(BaseModel):
      title: str
      summary: str
      rating: int

  client = AsyncOpenAI()

This fails

  response = await client.responses.parse(
      model="gpt-5",
      input=[
          {"role": "user", "content": "Summarize this book..."}
      ],
      text_format=BookSummary,
      reasoning={"effort": "minimal"},
      text={"verbosity": "medium"}
  )

Error

Error code: 400 - {'error': {'message': "Unsupported parameter: 'reasoning.effort' is not supported
with this model.", 'type': 'invalid_request_error', 'param': 'reasoning.effort'}}

Expected behavior

responses.parse() should support GPT-5's reasoning/verbosity parameters alongside Pydantic models.

Impact

Cannot use structured outputs with GPT-5's performance optimization features, forcing a choice between
type safety or the new model capabilities.

To Reproduce

  client = AsyncOpenAI()
  from pydantic import BaseModel
  from openai import AsyncOpenAI

  class BookSummary(BaseModel):
      title: str
      summary: str
      rating: int
  response = await client.responses.parse(
      model="gpt-5",
      input=[
          {"role": "user", "content": "Summarize this book..."}
      ],
      text_format=BookSummary,
      reasoning={"effort": "minimal"},
      text={"verbosity": "medium"}
  )

OS

macOS Sequoia 15.5

Python version

Python v3.13.5

Library version

openai v1.99.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions