mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Merge pull request #3747 from BerriAI/litellm_standardize_slack_exception_msg_format
Standardize slack exception msg format
This commit is contained in:
commit
dd81ab4a61
3 changed files with 8 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue