Skip to content

[Bug]: GPT-5 stopped giving json output #16813

@arushkumarsingh

Description

@arushkumarsingh

What happened?

response = litellm.completion(
model='gpt-5,
messages=messages,
response_format=AnalysisModel,
temperature=1,
)

Relevant log output

Error running structured completion: litellm.JSONSchemaValidationError: model=, returned an invalid response=1

[2 Items
0: {6 Items
id: "rs_0824027ffb43f3e000691d7e5cc7e081a0bc62f205311437e8"
summary: [0 Items
]
type: "reasoning"
content: null
encrypted_content: null
status: null
}
1: {5 Items
id: "msg_0824027ffb43f3e000691d7e8ce0a081a083c237da9e14c8d0"
content: [1 Items
0: {4 Items
annotations: [0 Items
]
text: "1. Summary
- Main theme: Reframe anxiety as a usable power and channel it into productivity through three practical techniques.
- Tone: friendly, energetic, professional
- Content type: tutorial
- Key topics:
  - Don’t fight anxiety; reframe it as information/power
  - Solution 1: Externalize thoughts—write them down and reality-check (“kya yeh 100% sach hai?”)
  - Solution 2: Body reset—fast walk, cold water sips, 10 deep breaths
  - Solution 3: Schedule worry time (e.g., 6:30 pm) and redirect

...expand (1453 more characters)
"
type: "output_text"
logprobs: [0 Items
]
}
]
role: "assistant"
status: "completed"
type: "message"
}
]

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.80.0

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions