mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix - log api_base in errors
This commit is contained in:
parent
06804bc70a
commit
ee2a2ce559
3 changed files with 7 additions and 0 deletions
|
@ -1239,6 +1239,9 @@ async def _PROXY_failure_handler(
|
|||
_litellm_params = kwargs.get("litellm_params", {}) or {}
|
||||
_metadata = _litellm_params.get("metadata", {}) or {}
|
||||
_model_id = _metadata.get("model_info", {}).get("id", None)
|
||||
|
||||
api_base = litellm.get_api_base(model=_model, optional_params=_litellm_params)
|
||||
|
||||
verbose_proxy_logger.debug(
|
||||
"\nexception_type",
|
||||
_exception_type,
|
||||
|
@ -1252,8 +1255,10 @@ async def _PROXY_failure_handler(
|
|||
traceback,
|
||||
)
|
||||
error_log = LiteLLM_ErrorLogs(
|
||||
request_id=str(uuid.uuid4()),
|
||||
model_name=_model,
|
||||
model_id=_model_id,
|
||||
api_base=api_base,
|
||||
exception_type=_exception_type,
|
||||
status_code=_status_code,
|
||||
exception_string=str(_exception),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue