mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +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:
parent
ef9cc33ee3
commit
3ff4ac3de3
1 changed files with 3 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue