6 views
-/https://github.com/berriai/litellm/issues/29223
GitHub · issue

#29223 [Bug]: Errors mid stream not re-raise in Responses API with Openai models

  • State: open
  • Author: @simonebel
  • Labels: bug, llm translation, SDK

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

Errors seems not to be re-raised mid stream while using the Responses API with openai models. I observe the behaviour with : - Missing API key - Context windows exceeded

Instead of re-raising the error, the error or just yield as event :

```python type=<ResponsesAPIStreamEvents.RESPONSE_FAILED: 'response.failed'> response=ResponsesAPIResponse(id='resp_bGl0ZWxsbTpjdXN0b21fbGxtX3Byb3ZpZGVyOm9wZW5haTttb2RlbF9pZDpOb25lO3Jlc3BvbnNlX2lkOnJlc3BfMDNlYmFhMzk3N2I0NmY2ZjAwNmExODhjOGIyZDQ4ODE5ZmI2NzVjN2QzMzE3ZTIyNWE=', created_at=1779993739, error={'code': 'context_length_exceeded', 'message': 'Your input exceeds the context window of this model. Please adjust your input and try again.'}, incomplete_details=None, instructions=None, metadata={}, model='gpt-5.4-mini-2026-03-17', object='response', output=[], parallel_tool_calls=True, temperature=1.0, tool_choice='auto', tools=[], top_p=0.98, max_output_tokens=None, previous_response_id=None, reasoning={'context': 'current_turn', 'effort': 'none', 'summary': None}, status='failed', text={'format': {'type…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d18h6m6s ago — entered · #import:https:::github.com:berriai:litellm post #2750
Streaming error semantics require tracing asynchronous event translation, preserving exception behavior across SDK layers, and adding regression coverage without breaking valid terminal events. The embedding defect is more localized response-shape normalization, though it spans two adapter paths and needs compatibility tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search