Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
gpt-5-mini Returns Empty output_text with Responses API
Issue
When using gpt-5-mini with the Responses API, the returned output_text is frequently an empty string (""), even though the API call succeeds.
Expected Behavior
response.output_text should contain the model's generated response.
- Should behave like
gpt-4o-mini, which consistently returns text.
Actual Behavior
response.output_text is empty.
response.output contains only a ResponseReasoningItem of type "reasoning".
- No
ResponseOutputMessage with actual content.
Reproduction Code
from openai import AsyncOpenAI
client = AsyncOpenAI()
response = await client.responses.create(
model="gpt-5-mini",
input=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Say hello in one sentence."}
],
max_output_tokens=50,
)
print(f"output_text: '{response.output_text}'") # Empty!
print(f"output length: {len(response.output)}") # 1
print(f"output[0] type: {response.output[0].type}") # reasoning
### To Reproduce
-
### Code snippets
```Python
OS
Windows
Python version
Python 3.11
Library version
Latest
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
gpt-5-mini Returns Empty
output_textwith Responses APIIssue
When using
gpt-5-miniwith the Responses API, the returnedoutput_textis frequently an empty string (""), even though the API call succeeds.Expected Behavior
response.output_textshould contain the model's generated response.gpt-4o-mini, which consistently returns text.Actual Behavior
response.output_textis empty.response.outputcontains only aResponseReasoningItemof type"reasoning".ResponseOutputMessagewith actual content.Reproduction Code
OS
Windows
Python version
Python 3.11
Library version
Latest