litellm - 💡(How to fix) Fix chatgpt/gpt-5.4 returns empty output=[] with status='completed' via litellm.responses() [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#26179Fetched 2026-04-22 07:45:58
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Error Message

import litellm

This returns output=[] with status='completed'

response = litellm.responses( model='chatgpt/gpt-5.4', input=[{'type': 'message', 'role': 'user', 'content': 'hi'}] ) print(response.output) # [] print(response.status) # completed

This crashes entirely

import litellm response = litellm.completion( model='chatgpt/gpt-5.4', messages=[{'role': 'user', 'content': 'hi'}] )

ValueError: Unknown items in responses API response: []

Root Cause

Root cause (suspected) Debug logs confirm ChatGPT returns a proper SSE stream with response.output_item.added events. LiteLLM's streaming parser does not handle this event type for the chatgpt provider and silently drops all output items, resulting in an empty output list. Relevant SSE events received from ChatGPT but not parsed:

Fix Action

Fix / Workaround

LiteLLM version: 1.83.10 Python version: 3.11 Platform: macOS Darwin arm64 Model: chatgpt/gpt-5.4 Auth: OAuth device flow (token stored in ~/.config/litellm/chatgpt/) Workaround None found. The chatgpt provider is currently unusable through LiteLLM proxy or SDK.

Code Example

import litellm

# This returns output=[] with status='completed'
response = litellm.responses(
    model='chatgpt/gpt-5.4',
    input=[{'type': 'message', 'role': 'user', 'content': 'hi'}]
)
print(response.output)  # []
print(response.status)  # completed

# This crashes entirely
import litellm
response = litellm.completion(
    model='chatgpt/gpt-5.4',
    messages=[{'role': 'user', 'content': 'hi'}]
)
# ValueError: Unknown items in responses API response: []

---

event: response.output_item.added
event: response.content_part.added  
event: response.output_text.delta
RAW_BUFFERClick to expand / collapse

What happened?

When calling litellm.responses() with chatgpt/gpt-5.4, the response returns output=[] with status='completed', meaning the model ran successfully but no output was captured.

Debug logs show that ChatGPT returns a proper SSE stream including response.output_item.added events, but LiteLLM fails to parse them and crashes with ValueError: Unknown items in responses API response: [] when called via litellm.completion().

Steps to reproduce

import litellm

# This returns output=[] with status='completed'
response = litellm.responses(
    model='chatgpt/gpt-5.4',
    input=[{'type': 'message', 'role': 'user', 'content': 'hi'}]
)
print(response.output)  # []
print(response.status)  # completed

# This crashes entirely
import litellm
response = litellm.completion(
    model='chatgpt/gpt-5.4',
    messages=[{'role': 'user', 'content': 'hi'}]
)
# ValueError: Unknown items in responses API response: []

Expected behavior output should contain the model's response text. litellm.completion() should not crash. Actual behavior

litellm.responses() returns output=[] despite status='completed' and non-zero usage.output_tokens=12 litellm.completion() raises ValueError: Unknown items in responses API response: []

Root cause (suspected) Debug logs confirm ChatGPT returns a proper SSE stream with response.output_item.added events. LiteLLM's streaming parser does not handle this event type for the chatgpt provider and silently drops all output items, resulting in an empty output list. Relevant SSE events received from ChatGPT but not parsed:

event: response.output_item.added
event: response.content_part.added  
event: response.output_text.delta

LiteLLM version: 1.83.10 Python version: 3.11 Platform: macOS Darwin arm64 Model: chatgpt/gpt-5.4 Auth: OAuth device flow (token stored in ~/.config/litellm/chatgpt/) Workaround None found. The chatgpt provider is currently unusable through LiteLLM proxy or SDK.

extent analysis

TL;DR

The issue can be addressed by updating LiteLLM to handle the response.output_item.added event type for the chatgpt provider, which is currently not parsed, resulting in empty output.

Guidance

  • Verify that the issue is specific to the chatgpt/gpt-5.4 model by testing with other models to confirm if the problem is model-specific.
  • Check the LiteLLM documentation or source code to see if there are any plans or existing fixes for handling the response.output_item.added event type.
  • Consider reaching out to the LiteLLM development team or community for assistance, as the issue seems to be related to a missing feature or bug in the library.
  • Review the debug logs to ensure that the SSE events are being received correctly and that the issue is indeed with the parsing of these events.

Example

No code example is provided as the issue seems to be related to a missing feature or bug in the LiteLLM library, and any code changes would require more information about the library's internal workings.

Notes

The issue seems to be specific to the chatgpt/gpt-5.4 model and the LiteLLM library's handling of SSE events. Without more information about the library's internal workings or access to the library's source code, it is difficult to provide a more detailed solution.

Recommendation

Apply workaround: Reach out to the LiteLLM development team or community for assistance, as the issue seems to be related to a missing feature or bug in the library. This is the most viable option given the current information, as updating the library to handle the response.output_item.added event type may require changes to the library's source code.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix chatgpt/gpt-5.4 returns empty output=[] with status='completed' via litellm.responses() [1 participants]