From 4fb92ddc2b0230c9c3e480946aa0c6deb22f9050 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Fri, 6 Feb 2026 14:03:39 -0800 Subject: [PATCH] init MIN_MODEL_COST_MAP_ENTRIES --- litellm/constants.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litellm/constants.py b/litellm/constants.py index 25decd363a6..27b08b937f1 100644 --- a/litellm/constants.py +++ b/litellm/constants.py @@ -174,6 +174,10 @@ DEFAULT_SSL_CIPHERS = os.getenv( "AES128-GCM-SHA256", # Last resort (maximum compatibility) ) +#### Model Cost Map Validation #### +# The real map has ~2500+ entries. This catches corrupted/truncated/empty responses. +MIN_MODEL_COST_MAP_ENTRIES = 100 + ########### v2 Architecture constants for managing writing updates to the database ########### REDIS_UPDATE_BUFFER_KEY = "litellm_spend_update_buffer" REDIS_DAILY_SPEND_UPDATE_BUFFER_KEY = "litellm_daily_spend_update_buffer"