mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
fix(proxy): attach litellm_call_id to client disconnect log record
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
0a8eb56ba4
commit
1b474b075f
2 changed files with 4 additions and 1 deletions
|
|
@ -1457,6 +1457,7 @@ def _log_llm_api_exception(e: Exception, litellm_call_id: str | None) -> None:
|
|||
"litellm.proxy.proxy_server._handle_llm_api_exception(): client disconnected, "
|
||||
"upstream LLM request cancelled - litellm_call_id=%s",
|
||||
litellm_call_id,
|
||||
extra=MappingProxyType({"litellm_call_id": litellm_call_id}),
|
||||
)
|
||||
return
|
||||
log_fn: Final = (
|
||||
|
|
|
|||
|
|
@ -8741,4 +8741,6 @@ class TestErrorLogCarriesCallId:
|
|||
finally:
|
||||
verbose_proxy_logger.propagate = False
|
||||
|
||||
assert call_id in caplog.records[-1].getMessage()
|
||||
record: Final = caplog.records[-1]
|
||||
assert record.litellm_call_id == call_id
|
||||
assert call_id in record.getMessage()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue