mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-05 00:25:35 +00:00
Capture incomplete terminal error in background streaming
Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
This commit is contained in:
@@ -258,8 +258,8 @@ async def background_streaming_task( # noqa: PLR0915
|
||||
),
|
||||
)
|
||||
|
||||
# Extract error for failed responses
|
||||
if event_type == "response.failed":
|
||||
# Extract error for failed and incomplete responses
|
||||
if event_type == "response.failed" or event_type == "response.incomplete":
|
||||
terminal_error = response_data.get("error")
|
||||
|
||||
# Core response fields
|
||||
@@ -337,7 +337,7 @@ async def background_streaming_task( # noqa: PLR0915
|
||||
)
|
||||
|
||||
verbose_proxy_logger.info(
|
||||
f"Finished background streaming for {polling_id}, status={final_status}, output_items={len(output_items)}"
|
||||
f"Finished background streaming for {polling_id}, status={final_status}, error={terminal_error}, output_items={len(output_items)}"
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user