From c2c2f8285de72fb818056490f60253ad2910e41d Mon Sep 17 00:00:00 2001 From: imviky-ctrl <272028991+imviky-ctrl@users.noreply.github.com> Date: Tue, 5 May 2026 15:34:15 +0530 Subject: [PATCH] style: apply Black formatting to tickerr.py --- litellm/integrations/tickerr.py | 48 +++++++++++++++++---------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/litellm/integrations/tickerr.py b/litellm/integrations/tickerr.py index 810cea13aa1..72538580d7e 100644 --- a/litellm/integrations/tickerr.py +++ b/litellm/integrations/tickerr.py @@ -32,29 +32,29 @@ _inflight = threading.Semaphore(_MAX_INFLIGHT) # Map litellm custom_llm_provider → Tickerr provider slug _PROVIDER_MAP: Dict[str, str] = { - "openai": "openai", - "anthropic": "anthropic", - "google": "google", - "vertex_ai": "google", - "gemini": "google", - "cohere": "cohere", - "mistral": "mistral", - "groq": "groq", - "together_ai": "together", - "huggingface": "huggingface", - "replicate": "replicate", - "deepinfra": "deepinfra", - "perplexity": "perplexity", + "openai": "openai", + "anthropic": "anthropic", + "google": "google", + "vertex_ai": "google", + "gemini": "google", + "cohere": "cohere", + "mistral": "mistral", + "groq": "groq", + "together_ai": "together", + "huggingface": "huggingface", + "replicate": "replicate", + "deepinfra": "deepinfra", + "perplexity": "perplexity", "fireworks_ai": "fireworks", - "openrouter": "openrouter", - "azure": "azure", - "bedrock": "aws", - "ai21": "ai21", - "cerebras": "cerebras", - "xai": "xai", - "deepseek": "deepseek", - "ollama": "ollama", - "nlp_cloud": "nlp_cloud", + "openrouter": "openrouter", + "azure": "azure", + "bedrock": "aws", + "ai21": "ai21", + "cerebras": "cerebras", + "xai": "xai", + "deepseek": "deepseek", + "ollama": "ollama", + "nlp_cloud": "nlp_cloud", } # Only map codes that unambiguously indicate the specific error type. @@ -211,7 +211,9 @@ class TickerrLogger(CustomLogger): provider = _normalize_provider(model, kwargs) status_code = _extract_status_code(exception) # Only set error_type for codes we can classify with confidence - error_type: Optional[str] = _ERROR_TYPE_MAP.get(status_code) if status_code is not None else None + error_type: Optional[str] = ( + _ERROR_TYPE_MAP.get(status_code) if status_code is not None else None + ) # Strip provider prefix: "anthropic/claude-3-5-haiku" → "claude-3-5-haiku" model_clean = model.split("/", 1)[-1] if "/" in model else model