fix(constants): correct Azure cost constants, clarify models, remove duplicate cache size

This commit is contained in:
Mukesh Kumar Shah 2026-04-06 17:48:35 +05:30
parent d251238bd7
commit 0df2b0d096
3 changed files with 8 additions and 8 deletions

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(
@ -840,7 +840,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",

View file

@ -201,6 +201,6 @@ class TestAzureAssistantCostTracking:
azure_container_info = litellm.model_cost.get("azure/container", {})
assert azure_container_info.get("code_interpreter_cost_per_session") == 0.03
assert AZURE_COMPUTER_USE_INPUT_COST_PER_1K_TOKENS == 3.0
assert AZURE_COMPUTER_USE_OUTPUT_COST_PER_1K_TOKENS == 12.0
assert AZURE_COMPUTER_USE_INPUT_COST_PER_1K_TOKENS == 0.003
assert AZURE_COMPUTER_USE_OUTPUT_COST_PER_1K_TOKENS == 0.012
assert AZURE_VECTOR_STORE_COST_PER_GB_PER_DAY == 0.1

View file

@ -251,10 +251,10 @@ def test_azure_assistant_features_integrated_cost_tracking():
# Should calculate costs for:
# - Vector store: 1.0 * 10 * 0.1 = $1.00
# - Computer use: (1000/1000 * 3.0) + (500/1000 * 12.0) = $9.00
# - Computer use: (1000/1000 * 0.003) + (500/1000 * 0.012) = $0.009
# - Code interpreter: 2 * 0.03 = $0.06
# Total: $10.06
expected_cost = 1.0 + 9.0 + 0.06
# Total: $1.069
expected_cost = 1.0 + 0.009 + 0.06
assert abs(cost - expected_cost) < 0.01, f"Expected ~{expected_cost}, got {cost}"