BerriAI/litellm · error · ValueError
responses_api_provider_config is required to process live st
Error message
responses_api_provider_config is required to process live streaming chunks
What it means
Guard in the live responses streaming chunk processor: responses_api_provider_config is None, so provider-specific chunk transformation cannot run; the streaming path was entered without a resolved provider config.
Source
Thrown at litellm/responses/streaming_iterator.py:236
# ``_strip_sse_data_from_chunk`` on it — doing so would incorrectly mangle
# payloads whose actual JSON value happens to start with ``data:``.
# Handle "[DONE]" marker
if chunk == STREAM_SSE_DONE_STRING:
self.finished = True
return None
if self.logging_obj.completion_start_time is None:
self.logging_obj._update_completion_start_time(completion_start_time=datetime.now())
try:
# Parse the JSON chunk
parsed_chunk: Final = json.loads(chunk)
# Format as ResponsesAPIStreamingResponse
if isinstance(parsed_chunk, dict):
if self.responses_api_provider_config is None:
raise ValueError("responses_api_provider_config is required to process live streaming chunks")
openai_responses_api_chunk: Final = self.responses_api_provider_config.transform_streaming_response(
model=self.model,
parsed_chunk=parsed_chunk,
logging_obj=self.logging_obj,
)
# Only when the SSE JSON carries a response body (delta events do not).
# Using getattr(..., "response") alone is unsafe with Mocks: they synthesize a
# truthy child Mock for any attribute, which breaks tests and is wrong on stream.
if "response" in parsed_chunk:
response_object: Final[ResponsesAPIResponse | None] = getattr(
openai_responses_api_chunk, "response", None
)
if response_object is not None:
response: Final = ResponsesAPIRequestUtils._update_responses_api_response_id_with_model_id(
responses_api_response=response_object,
litellm_metadata=self.litellm_metadata,
custom_llm_provider=self.custom_llm_provider,View on GitHub (pinned to 77b7c6c40c)
Solutions
- Provide responses_api_provider_config when processing live streaming chunks.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/responses/streaming_iterator.py:236 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/a983180a12400e8b.
Report an issue: GitHub.