fix(constants): fix missing comma, wrong Azure costs, and duplicate constant

Three bugs in litellm/constants.py:

1. Missing comma between adjacent strings in clarifai_models causes
   implicit concatenation — "gpt-5-nano" model silently lost from the set

2. AZURE_COMPUTER_USE cost defaults are 1000x too large (3.0 and 12.0
   instead of 0.003 and 0.012 per 1K tokens) — overcharges cost tracking

3. MAX_SIZE_PER_ITEM_IN_MEMORY_CACHE_IN_KB defined twice (1024 at line 85,
   512 at line 391) — second definition silently overwrites the first.
   Removed the duplicate; the 1024 KB (1 MB) default is retained.

Fixes BerriAI/litellm#25140

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
rudra717 2026-04-04 17:00:37 -07:00
parent 8ecbf757b2
commit 64891067b3

View file

@ -307,12 +307,12 @@ AZURE_FILE_SEARCH_COST_PER_GB_PER_DAY = float(
)
AZURE_COMPUTER_USE_INPUT_COST_PER_1K_TOKENS = float(
os.getenv(
"AZURE_COMPUTER_USE_INPUT_COST_PER_1K_TOKENS", 3.0
"AZURE_COMPUTER_USE_INPUT_COST_PER_1K_TOKENS", 0.003
) # $0.003 USD per 1K Tokens
)
AZURE_COMPUTER_USE_OUTPUT_COST_PER_1K_TOKENS = float(
os.getenv(
"AZURE_COMPUTER_USE_OUTPUT_COST_PER_1K_TOKENS", 12.0
"AZURE_COMPUTER_USE_OUTPUT_COST_PER_1K_TOKENS", 0.012
) # $0.012 USD per 1K Tokens
)
AZURE_VECTOR_STORE_COST_PER_GB_PER_DAY = float(
@ -388,9 +388,6 @@ CACHED_STREAMING_CHUNK_DELAY = float(os.getenv("CACHED_STREAMING_CHUNK_DELAY", 0
AUDIO_SPEECH_CHUNK_SIZE = int(
os.getenv("AUDIO_SPEECH_CHUNK_SIZE", 8192)
) # chunk_size for audio speech streaming. Balance between latency and memory usage
MAX_SIZE_PER_ITEM_IN_MEMORY_CACHE_IN_KB = int(
os.getenv("MAX_SIZE_PER_ITEM_IN_MEMORY_CACHE_IN_KB", 512)
)
DEFAULT_MAX_TOKENS_FOR_TRITON = int(os.getenv("DEFAULT_MAX_TOKENS_FOR_TRITON", 2000))
#### Networking settings ####
request_timeout: float = float(os.getenv("REQUEST_TIMEOUT", 6000)) # time in seconds
@ -840,7 +837,7 @@ clarifai_models: set = set(
"clarifai/qwen.qwenLM.Qwen3-30B-A3B-Instruct-2507",
"clarifai/qwen.qwen3.qwen3-next-80B-A3B-Thinking",
"clarifai/openai.chat-completion.gpt-oss-120b",
"clarifai/qwen.qwenLM.Qwen3-30B-A3B-Thinking-2507"
"clarifai/qwen.qwenLM.Qwen3-30B-A3B-Thinking-2507",
"clarifai/openai.chat-completion.gpt-5-nano",
"clarifai/openai.chat-completion.gpt-4o",
"clarifai/gcp.generate.gemini-2_5-pro",