From 2c5455b6ec15322162ef4896d0b9a0a644ce99e0 Mon Sep 17 00:00:00 2001 From: danielnyari-seon Date: Fri, 16 Jan 2026 09:19:46 +0100 Subject: [PATCH] additional params --- litellm/integrations/SlackAlerting/slack_alerting.py | 7 +++++++ litellm/types/integrations/slack_alerting.py | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/litellm/integrations/SlackAlerting/slack_alerting.py b/litellm/integrations/SlackAlerting/slack_alerting.py index 0c36e15db01..9af86d81dbf 100644 --- a/litellm/integrations/SlackAlerting/slack_alerting.py +++ b/litellm/integrations/SlackAlerting/slack_alerting.py @@ -1417,6 +1417,13 @@ Model Info: if kwargs: for key, value in kwargs.items(): formatted_message += f"\n\n{key}: `{value}`\n\n" + + if self.alerting_args.default_alerting_metadata: + alerting_metadata = { + **self.alerting_args.default_alerting_metadata, + **(alerting_metadata or {}), + } + if alerting_metadata: for key, value in alerting_metadata.items(): formatted_message += f"\n\n*Alerting Metadata*: \n{key}: `{value}`\n\n" diff --git a/litellm/types/integrations/slack_alerting.py b/litellm/types/integrations/slack_alerting.py index 856640638c2..a210aae3e8e 100644 --- a/litellm/types/integrations/slack_alerting.py +++ b/litellm/types/integrations/slack_alerting.py @@ -88,6 +88,10 @@ class SlackAlertingArgs(LiteLLMPydanticObjectBase): default=False, description="If true, the alerting payload will be printed to the console.", ) + default_alerting_metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Default metadata to append to every alert. Gets merged with per-request alerting_metadata.", + ) class DeploymentMetrics(LiteLLMPydanticObjectBase):