diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 1bafdd89e34..6b52eaddc6a 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -442,7 +442,7 @@ class ProxyLogging: asyncio.create_task( self.alerting_handler( - message=f"LLM API call failed: {exception_str}", + message=f"LLM API call failed: `{exception_str}`", level="High", alert_type="llm_exceptions", request_data=request_data, diff --git a/litellm/router.py b/litellm/router.py index 80f1f900c72..f022a1f14c5 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -3803,7 +3803,7 @@ class Router: ) asyncio.create_task( proxy_logging_obj.slack_alerting_instance.send_alert( - message=f"Router: Cooling down Deployment:\nModel Name: `{_model_name}`\nAPI Base: `{_api_base}`\nCooldown Time: `{cooldown_time} seconds`\nGot exception: `{str(exception_status)}`\nChange 'cooldown_time' + 'allowed_fails' under 'Router Settings' on proxy UI, or via config - https://docs.litellm.ai/docs/proxy/reliability#fallbacks--retries--timeouts--cooldowns", + message=f"Router: Cooling down Deployment:\nModel Name: `{_model_name}`\nAPI Base: `{_api_base}`\nCooldown Time: `{cooldown_time} seconds`\nException Status Code: `{str(exception_status)}`\n\nChange 'cooldown_time' + 'allowed_fails' under 'Router Settings' on proxy UI, or via config - https://docs.litellm.ai/docs/proxy/reliability#fallbacks--retries--timeouts--cooldowns", alert_type="cooldown_deployment", level="Low", ) diff --git a/litellm/utils.py b/litellm/utils.py index 86c36045857..a265dbce431 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -8322,18 +8322,18 @@ def exception_type( _deployment = _metadata.get("deployment") extra_information = f"\nModel: {model}" if _api_base: - extra_information += f"\nAPI Base: {_api_base}" + extra_information += f"\nAPI Base: `{_api_base}`" if messages and len(messages) > 0: - extra_information += f"\nMessages: {messages}" + extra_information += f"\nMessages: `{messages}`" if _model_group is not None: - extra_information += f"\nmodel_group: {_model_group}\n" + extra_information += f"\nmodel_group: `{_model_group}`\n" if _deployment is not None: - extra_information += f"\ndeployment: {_deployment}\n" + extra_information += f"\ndeployment: `{_deployment}`\n" if _vertex_project is not None: - extra_information += f"\nvertex_project: {_vertex_project}\n" + extra_information += f"\nvertex_project: `{_vertex_project}`\n" if _vertex_location is not None: - extra_information += f"\nvertex_location: {_vertex_location}\n" + extra_information += f"\nvertex_location: `{_vertex_location}`\n" # on litellm proxy add key name + team to exceptions extra_information = _add_key_name_and_team_to_alert(