---
type: email
from: holmbuar <notifications@github.com>
subject: [openai/openai-agents-python] Model settings with GPT-5 breaks

 structured output (Issue #1536)
received: 2026-03-05 10:12:01
date_header: Tue, 19 Aug 2025 21:45:50 -0700
priority: normal
status: awaiting_approval
uid: 28136
---

## Email Content

**From:** holmbuar <notifications@github.com>
**Subject:** [openai/openai-agents-python] Model settings with GPT-5 breaks

 structured output (Issue #1536)
**Date:** Tue, 19 Aug 2025 21:45:50 -0700

### Body (preview)

holmbuar created an issue (openai/openai-agents-python#1536)



Sorry for not providing a reproducible example, but just for illustration, in my test code running the `agent` will obey the structured output fields, while `agent2` will make up extra JSON fields in the `final_output`, triggering various Pydantic JSON validation errors.  Am I using `ModelSettings` correctly?



```

openai                    1.100.2

openai-agents             0.2.8

```



```

from pydantic import BaseModel

from agents import Agent





class CalendarEvent(BaseModel):

    name: str

    date: str

    participants: list[str]



agent = Agent(

    name="Calendar extractor",

    instructions="Extract calendar events from text",

    output_type=CalendarEvent,

    model="gpt-5"

)



agent2 = Agent(

    name="Calendar extractor 2",

    instructions="Extract calendar events from text",

    output_type=CalendarEvent,

    model="gpt-5",

    model_settings=ModelSettings(

         reasoning={"effort":"low"},

         extra_body={"text":{"verbosity":"low"}}

     ),

)

```



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/issues/1536

You are receiving this because you are subscribed to this thread.



Message ID: <openai/openai-agents-python/issues/1536@github.com>

---

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Escalate
