fix(utils): unify claude-fable-5 min tokens and backfill 29 missing Anthropic caches

This commit is contained in:
Felix Mathew 2026-07-30 14:55:37 -05:00
parent 3c2264cfac
commit 79bd26e231
4 changed files with 434 additions and 148 deletions

View file

@ -1392,7 +1392,7 @@
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true,
"prompt_cache_min_tokens": 1024
"prompt_cache_min_tokens": 512
},
"global.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.25e-05,
@ -1428,7 +1428,7 @@
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true,
"prompt_cache_min_tokens": 1024
"prompt_cache_min_tokens": 512
},
"us.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.375e-05,
@ -1464,7 +1464,7 @@
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true,
"prompt_cache_min_tokens": 1024
"prompt_cache_min_tokens": 512
},
"eu.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.375e-05,
@ -1500,7 +1500,7 @@
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true,
"prompt_cache_min_tokens": 1024
"prompt_cache_min_tokens": 512
},
"anthropic.claude-opus-5": {
"bedrock_converse_supports_strict_tools": false,
@ -2858,7 +2858,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"azure_ai/claude-opus-4-5": {
"cache_creation_input_token_cost": 6.25e-06,
@ -2880,7 +2881,8 @@
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"azure_ai/claude-opus-4-6": {
"supports_adaptive_thinking": true,
@ -2909,7 +2911,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 4096
},
"azure_ai/claude-opus-4-7": {
"supports_adaptive_thinking": true,
@ -2939,7 +2942,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 2048
},
"azure_ai/claude-fable-5": {
"supports_mid_conversation_system": true,
@ -2970,7 +2974,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 512
},
"azure_ai/claude-opus-5": {
"supports_mid_conversation_system": true,
@ -3033,7 +3038,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 1024
},
"azure_ai/claude-opus-4-1": {
"cache_creation_input_token_cost": 1.875e-05,
@ -3054,7 +3060,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"azure_ai/claude-sonnet-4-5": {
"cache_creation_input_token_cost": 3.75e-06,
@ -3075,7 +3082,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"azure_ai/claude-sonnet-5": {
"supports_mid_conversation_system": true,
@ -3106,7 +3114,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 1024
},
"azure_ai/claude-sonnet-4-6": {
"supports_adaptive_thinking": true,
@ -3130,7 +3139,8 @@
"supports_max_reasoning_effort": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 1024
},
"azure/computer-use-preview": {
"input_cost_per_token": 3e-06,
@ -17696,6 +17706,46 @@
"tpm": 8000000,
"supports_image_size": false
},
"gemini-3-pro-image": {
"input_cost_per_image": 0.0011,
"input_cost_per_token": 2e-06,
"input_cost_per_token_batches": 1e-06,
"litellm_provider": "vertex_ai-language-models",
"max_input_tokens": 65536,
"max_output_tokens": 32768,
"max_tokens": 32768,
"mode": "image_generation",
"output_cost_per_image": 0.134,
"output_cost_per_image_token": 0.00012,
"output_cost_per_token": 1.2e-05,
"output_cost_per_token_batches": 6e-06,
"source": "https://ai.google.dev/gemini-api/docs/pricing#gemini-3-pro-image",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/completions",
"/v1/batch"
],
"supported_modalities": [
"text",
"image"
],
"supported_output_modalities": [
"text",
"image"
],
"supports_function_calling": false,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_system_messages": true,
"supports_vision": true,
"supports_web_search": true,
"search_context_cost_per_query": {
"search_context_size_low": 0.014,
"search_context_size_medium": 0.014,
"search_context_size_high": 0.014
},
"web_search_billing_unit": "per_query"
},
"gemini-3-pro-image-preview": {
"input_cost_per_image": 0.0011,
"input_cost_per_token": 2e-06,
@ -17736,6 +17786,44 @@
},
"web_search_billing_unit": "per_query"
},
"gemini-3.1-flash-image": {
"input_cost_per_image": 0.00056,
"input_cost_per_token": 5e-07,
"litellm_provider": "vertex_ai-language-models",
"max_input_tokens": 65536,
"max_output_tokens": 32768,
"max_tokens": 32768,
"mode": "image_generation",
"output_cost_per_image": 0.0672,
"output_cost_per_image_token": 6e-05,
"output_cost_per_token": 3e-06,
"source": "https://cloud.google.com/vertex-ai/generative-ai/pricing#gemini-models",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/completions",
"/v1/batch"
],
"supported_modalities": [
"text",
"image"
],
"supported_output_modalities": [
"text",
"image"
],
"supports_function_calling": false,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_system_messages": true,
"supports_vision": true,
"supports_web_search": true,
"search_context_cost_per_query": {
"search_context_size_low": 0.014,
"search_context_size_medium": 0.014,
"search_context_size_high": 0.014
},
"web_search_billing_unit": "per_query"
},
"gemini-3.1-flash-image-preview": {
"input_cost_per_image": 0.00056,
"input_cost_per_token": 5e-07,
@ -19290,7 +19378,6 @@
],
"supports_function_calling": false,
"supports_prompt_caching": true,
"supports_reasoning": false,
"supports_response_schema": true,
"supports_system_messages": true,
"supports_vision": true,
@ -19300,7 +19387,8 @@
"search_context_size_medium": 0.014,
"search_context_size_high": 0.014
},
"web_search_billing_unit": "per_query"
"web_search_billing_unit": "per_query",
"supports_reasoning": false
},
"gemini/gemini-3-pro-image-preview": {
"input_cost_per_image": 0.0011,
@ -20905,12 +20993,12 @@
"max_tokens": 16000,
"mode": "chat",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/messages"
"/v1/chat/completions"
],
"supports_function_calling": true,
"supports_parallel_function_calling": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"github_copilot/claude-opus-4.5": {
"litellm_provider": "github_copilot",
@ -20919,13 +21007,13 @@
"max_tokens": 16000,
"mode": "chat",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/messages"
"/v1/chat/completions"
],
"supports_function_calling": true,
"supports_parallel_function_calling": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"github_copilot/claude-opus-4.6-fast": {
"supports_adaptive_thinking": true,
@ -20972,12 +21060,12 @@
"max_tokens": 16000,
"mode": "chat",
"supported_endpoints": [
"/v1/chat/completions",
"/v1/messages"
"/v1/chat/completions"
],
"supports_function_calling": true,
"supports_parallel_function_calling": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"github_copilot/gemini-2.5-pro": {
"litellm_provider": "github_copilot",
@ -21473,7 +21561,8 @@
"output_cost_per_token": 2.5e-05,
"supports_function_calling": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"gmi/anthropic/claude-sonnet-4.5": {
"input_cost_per_token": 3e-06,
@ -21484,7 +21573,8 @@
"mode": "chat",
"output_cost_per_token": 1.5e-05,
"supports_function_calling": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"gmi/anthropic/claude-sonnet-4": {
"input_cost_per_token": 3e-06,
@ -24281,7 +24371,7 @@
"input_cost_per_token_batches": 3.75e-07,
"input_cost_per_token_priority": 1.5e-06,
"litellm_provider": "openai",
"max_input_tokens": 272000,
"max_input_tokens": 1050000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
@ -24327,7 +24417,7 @@
"input_cost_per_token_batches": 3.75e-07,
"input_cost_per_token_priority": 1.5e-06,
"litellm_provider": "openai",
"max_input_tokens": 272000,
"max_input_tokens": 1050000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
@ -24371,7 +24461,7 @@
"input_cost_per_token_flex": 1e-07,
"input_cost_per_token_batches": 1e-07,
"litellm_provider": "openai",
"max_input_tokens": 272000,
"max_input_tokens": 1050000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
@ -24414,7 +24504,7 @@
"input_cost_per_token_flex": 1e-07,
"input_cost_per_token_batches": 1e-07,
"litellm_provider": "openai",
"max_input_tokens": 272000,
"max_input_tokens": 1050000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
@ -24454,9 +24544,9 @@
"input_cost_per_token": 1.5e-05,
"input_cost_per_token_batches": 7.5e-06,
"litellm_provider": "openai",
"max_input_tokens": 128000,
"max_output_tokens": 272000,
"max_tokens": 272000,
"max_input_tokens": 400000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "responses",
"output_cost_per_token": 0.00012,
"output_cost_per_token_batches": 6e-05,
@ -24490,9 +24580,9 @@
"input_cost_per_token": 1.5e-05,
"input_cost_per_token_batches": 7.5e-06,
"litellm_provider": "openai",
"max_input_tokens": 128000,
"max_output_tokens": 272000,
"max_tokens": 272000,
"max_input_tokens": 400000,
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "responses",
"output_cost_per_token": 0.00012,
"output_cost_per_token_batches": 6e-05,
@ -30470,7 +30560,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"openrouter/anthropic/claude-sonnet-4": {
"input_cost_per_image": 0.0048,
@ -30493,7 +30584,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"openrouter/anthropic/claude-sonnet-4.6": {
"supports_adaptive_thinking": true,
@ -30518,7 +30610,8 @@
"supports_reasoning": true,
"supports_max_reasoning_effort": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"openrouter/anthropic/claude-opus-4.5": {
"cache_creation_input_token_cost": 6.25e-06,
@ -30537,7 +30630,8 @@
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"openrouter/anthropic/claude-opus-4.6": {
"supports_adaptive_thinking": true,
@ -30557,7 +30651,8 @@
"supports_reasoning": true,
"supports_max_reasoning_effort": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"openrouter/anthropic/claude-sonnet-4.5": {
"input_cost_per_image": 0.0048,
@ -30580,7 +30675,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"openrouter/anthropic/claude-haiku-4.5": {
"cache_creation_input_token_cost": 1.25e-06,
@ -30598,7 +30694,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"openrouter/anthropic/claude-opus-4.7": {
"supports_adaptive_thinking": true,
@ -30621,7 +30718,8 @@
"supports_max_reasoning_effort": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true
"supports_xhigh_reasoning_effort": true,
"prompt_cache_min_tokens": 2048
},
"openrouter/bytedance/ui-tars-1.5-7b": {
"input_cost_per_token": 1e-07,
@ -31855,6 +31953,22 @@
"supports_reasoning": true,
"supports_tool_choice": true
},
"openrouter/z-ai/glm-5.1": {
"input_cost_per_token": 1.05e-06,
"output_cost_per_token": 3.5e-06,
"cache_read_input_token_cost": 5.25e-07,
"cache_creation_input_token_cost": 0.0,
"litellm_provider": "openrouter",
"max_input_tokens": 202752,
"max_output_tokens": 65535,
"max_tokens": 65535,
"mode": "chat",
"source": "https://openrouter.ai/z-ai/glm-5.1",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true
},
"openrouter/minimax/minimax-m2.1": {
"input_cost_per_token": 2.7e-07,
"output_cost_per_token": 1.2e-06,
@ -32536,7 +32650,8 @@
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"perplexity/anthropic/claude-opus-4-7": {
"supports_adaptive_thinking": true,
@ -32545,7 +32660,8 @@
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 2048
},
"perplexity/anthropic/claude-opus-4-5": {
"litellm_provider": "perplexity",
@ -32553,21 +32669,24 @@
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"perplexity/anthropic/claude-sonnet-4-5": {
"litellm_provider": "perplexity",
"mode": "responses",
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true
"supports_function_calling": true,
"prompt_cache_min_tokens": 1024
},
"perplexity/anthropic/claude-haiku-4-5": {
"litellm_provider": "perplexity",
"mode": "responses",
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true
"supports_function_calling": true,
"prompt_cache_min_tokens": 4096
},
"perplexity/google/gemini-3-pro-preview": {
"litellm_provider": "perplexity",
@ -35734,7 +35853,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"vercel_ai_gateway/anthropic/claude-opus-4": {
"cache_creation_input_token_cost": 1.875e-05,
@ -35772,7 +35892,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vercel_ai_gateway/anthropic/claude-opus-4.5": {
"cache_creation_input_token_cost": 6.25e-06,
@ -35792,7 +35913,8 @@
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"vercel_ai_gateway/anthropic/claude-opus-4.6": {
"supports_adaptive_thinking": true,
@ -35813,7 +35935,8 @@
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"vercel_ai_gateway/anthropic/claude-sonnet-4": {
"cache_creation_input_token_cost": 3.75e-06,
@ -35832,7 +35955,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vercel_ai_gateway/anthropic/claude-sonnet-4.5": {
"cache_creation_input_token_cost": 3.75e-06,
@ -35850,7 +35974,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vercel_ai_gateway/cohere/command-a": {
"input_cost_per_token": 2.5e-06,
@ -36963,7 +37088,8 @@
"supports_assistant_prefill": true,
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vertex_ai/claude-opus-4-1@20250805": {
"cache_creation_input_token_cost": 1.875e-05,
@ -36981,7 +37107,8 @@
"supports_assistant_prefill": true,
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vertex_ai/claude-opus-4-5": {
"cache_creation_input_token_cost": 6.25e-06,
@ -37191,7 +37318,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 512
},
"vertex_ai/claude-fable-5@default": {
"supports_mid_conversation_system": true,
@ -37222,7 +37350,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 512
},
"vertex_ai/claude-opus-5": {
"supports_mid_conversation_system": true,
@ -40128,6 +40257,21 @@
"supports_tool_choice": true,
"source": "https://docs.z.ai/guides/overview/pricing"
},
"zai/glm-5.1": {
"cache_creation_input_token_cost": 0,
"cache_read_input_token_cost": 2.6e-07,
"input_cost_per_token": 1.4e-06,
"output_cost_per_token": 4.4e-06,
"litellm_provider": "zai",
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"mode": "chat",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"source": "https://docs.z.ai/guides/overview/pricing"
},
"zai/glm-5-code": {
"cache_creation_input_token_cost": 0,
"cache_read_input_token_cost": 3e-07,
@ -40158,6 +40302,21 @@
"supports_tool_choice": true,
"source": "https://docs.z.ai/guides/overview/pricing"
},
"zai/glm-4.7-flash": {
"cache_creation_input_token_cost": 0,
"cache_read_input_token_cost": 0,
"input_cost_per_token": 0,
"output_cost_per_token": 0,
"litellm_provider": "zai",
"max_input_tokens": 200000,
"max_output_tokens": 128000,
"mode": "chat",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"source": "https://docs.z.ai/guides/overview/pricing"
},
"zai/glm-4.6": {
"cache_creation_input_token_cost": 0,
"cache_read_input_token_cost": 1.1e-07,
@ -45566,9 +45725,11 @@
"supports_vision": true,
"supports_prompt_caching": true,
"supports_system_messages": true,
"supports_response_schema": true
"supports_response_schema": true,
"prompt_cache_min_tokens": 1024
},
"snowflake/claude-sonnet-4-6": {
"supports_adaptive_thinking": true,
"max_tokens": 16384,
"max_input_tokens": 200000,
"max_output_tokens": 16384,
@ -45581,7 +45742,8 @@
"supports_vision": true,
"supports_prompt_caching": true,
"supports_system_messages": true,
"supports_response_schema": true
"supports_response_schema": true,
"prompt_cache_min_tokens": 1024
},
"snowflake/claude-4-sonnet": {
"max_tokens": 16384,
@ -45627,7 +45789,8 @@
"supports_vision": true,
"supports_prompt_caching": true,
"supports_system_messages": true,
"supports_response_schema": true
"supports_response_schema": true,
"prompt_cache_min_tokens": 4096
},
"snowflake/claude-3-7-sonnet": {
"max_tokens": 16384,
@ -45990,40 +46153,6 @@
"supports_tool_choice": true,
"supports_vision": false
},
"darkbloom/gemma-4-26b": {
"input_cost_per_token": 3e-08,
"litellm_provider": "darkbloom",
"max_input_tokens": 131072,
"max_output_tokens": 32768,
"max_tokens": 32768,
"mode": "chat",
"output_cost_per_token": 1.65e-07,
"source": "https://www.darkbloom.dev/",
"supported_endpoints": [
"/v1/chat/completions"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_system_messages": true,
"supports_tool_choice": true
},
"darkbloom/gpt-oss-20b": {
"input_cost_per_token": 1.45e-08,
"litellm_provider": "darkbloom",
"max_input_tokens": 131072,
"max_output_tokens": 32768,
"max_tokens": 32768,
"mode": "chat",
"output_cost_per_token": 7e-08,
"source": "https://www.darkbloom.dev/",
"supported_endpoints": [
"/v1/chat/completions"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_system_messages": true,
"supports_tool_choice": true
},
"deepseek/deepseek-v4-pro": {
"cache_creation_input_token_cost": 0.0,
"cache_read_input_token_cost": 3.625e-09,
@ -46180,6 +46309,40 @@
"supports_reasoning": false,
"source": "https://pinstripes.io/pricing"
},
"darkbloom/gemma-4-26b": {
"input_cost_per_token": 3e-08,
"litellm_provider": "darkbloom",
"max_input_tokens": 131072,
"max_output_tokens": 32768,
"max_tokens": 32768,
"mode": "chat",
"output_cost_per_token": 1.65e-07,
"source": "https://www.darkbloom.dev/",
"supported_endpoints": [
"/v1/chat/completions"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_system_messages": true,
"supports_tool_choice": true
},
"darkbloom/gpt-oss-20b": {
"input_cost_per_token": 1.45e-08,
"litellm_provider": "darkbloom",
"max_input_tokens": 131072,
"max_output_tokens": 32768,
"max_tokens": 32768,
"mode": "chat",
"output_cost_per_token": 7e-08,
"source": "https://www.darkbloom.dev/",
"supported_endpoints": [
"/v1/chat/completions"
],
"supports_function_calling": true,
"supports_native_streaming": true,
"supports_system_messages": true,
"supports_tool_choice": true
},
"fallback_generalizations": {
"rules": [
{

View file

@ -1392,7 +1392,7 @@
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true,
"prompt_cache_min_tokens": 1024
"prompt_cache_min_tokens": 512
},
"global.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.25e-05,
@ -1428,7 +1428,7 @@
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true,
"prompt_cache_min_tokens": 1024
"prompt_cache_min_tokens": 512
},
"us.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.375e-05,
@ -1464,7 +1464,7 @@
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true,
"prompt_cache_min_tokens": 1024
"prompt_cache_min_tokens": 512
},
"eu.anthropic.claude-fable-5": {
"cache_creation_input_token_cost": 1.375e-05,
@ -1500,7 +1500,7 @@
"supports_output_config": true,
"bedrock_output_config_effort_ceiling": "xhigh",
"supports_parallel_tool_use_config": true,
"prompt_cache_min_tokens": 1024
"prompt_cache_min_tokens": 512
},
"anthropic.claude-opus-5": {
"bedrock_converse_supports_strict_tools": false,
@ -2858,7 +2858,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"azure_ai/claude-opus-4-5": {
"cache_creation_input_token_cost": 6.25e-06,
@ -2880,7 +2881,8 @@
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"azure_ai/claude-opus-4-6": {
"supports_adaptive_thinking": true,
@ -2909,7 +2911,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 4096
},
"azure_ai/claude-opus-4-7": {
"supports_adaptive_thinking": true,
@ -2939,7 +2942,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 2048
},
"azure_ai/claude-fable-5": {
"supports_mid_conversation_system": true,
@ -2970,7 +2974,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 512
},
"azure_ai/claude-opus-5": {
"supports_mid_conversation_system": true,
@ -3033,7 +3038,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 1024
},
"azure_ai/claude-opus-4-1": {
"cache_creation_input_token_cost": 1.875e-05,
@ -3054,7 +3060,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"azure_ai/claude-sonnet-4-5": {
"cache_creation_input_token_cost": 3.75e-06,
@ -3075,7 +3082,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"azure_ai/claude-sonnet-5": {
"supports_mid_conversation_system": true,
@ -3106,7 +3114,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 1024
},
"azure_ai/claude-sonnet-4-6": {
"supports_adaptive_thinking": true,
@ -3130,7 +3139,8 @@
"supports_max_reasoning_effort": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 1024
},
"azure/computer-use-preview": {
"input_cost_per_token": 3e-06,
@ -20987,7 +20997,8 @@
],
"supports_function_calling": true,
"supports_parallel_function_calling": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"github_copilot/claude-opus-4.5": {
"litellm_provider": "github_copilot",
@ -21001,7 +21012,8 @@
"supports_function_calling": true,
"supports_parallel_function_calling": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"github_copilot/claude-opus-4.6-fast": {
"supports_adaptive_thinking": true,
@ -21052,7 +21064,8 @@
],
"supports_function_calling": true,
"supports_parallel_function_calling": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"github_copilot/gemini-2.5-pro": {
"litellm_provider": "github_copilot",
@ -21548,7 +21561,8 @@
"output_cost_per_token": 2.5e-05,
"supports_function_calling": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"gmi/anthropic/claude-sonnet-4.5": {
"input_cost_per_token": 3e-06,
@ -21559,7 +21573,8 @@
"mode": "chat",
"output_cost_per_token": 1.5e-05,
"supports_function_calling": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"gmi/anthropic/claude-sonnet-4": {
"input_cost_per_token": 3e-06,
@ -30545,7 +30560,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"openrouter/anthropic/claude-sonnet-4": {
"input_cost_per_image": 0.0048,
@ -30568,7 +30584,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"openrouter/anthropic/claude-sonnet-4.6": {
"supports_adaptive_thinking": true,
@ -30593,7 +30610,8 @@
"supports_reasoning": true,
"supports_max_reasoning_effort": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"openrouter/anthropic/claude-opus-4.5": {
"cache_creation_input_token_cost": 6.25e-06,
@ -30612,7 +30630,8 @@
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"openrouter/anthropic/claude-opus-4.6": {
"supports_adaptive_thinking": true,
@ -30632,7 +30651,8 @@
"supports_reasoning": true,
"supports_max_reasoning_effort": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"openrouter/anthropic/claude-sonnet-4.5": {
"input_cost_per_image": 0.0048,
@ -30655,7 +30675,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"openrouter/anthropic/claude-haiku-4.5": {
"cache_creation_input_token_cost": 1.25e-06,
@ -30673,7 +30694,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"openrouter/anthropic/claude-opus-4.7": {
"supports_adaptive_thinking": true,
@ -30696,7 +30718,8 @@
"supports_max_reasoning_effort": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true
"supports_xhigh_reasoning_effort": true,
"prompt_cache_min_tokens": 2048
},
"openrouter/bytedance/ui-tars-1.5-7b": {
"input_cost_per_token": 1e-07,
@ -32627,7 +32650,8 @@
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"perplexity/anthropic/claude-opus-4-7": {
"supports_adaptive_thinking": true,
@ -32636,7 +32660,8 @@
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 2048
},
"perplexity/anthropic/claude-opus-4-5": {
"litellm_provider": "perplexity",
@ -32644,21 +32669,24 @@
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"perplexity/anthropic/claude-sonnet-4-5": {
"litellm_provider": "perplexity",
"mode": "responses",
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true
"supports_function_calling": true,
"prompt_cache_min_tokens": 1024
},
"perplexity/anthropic/claude-haiku-4-5": {
"litellm_provider": "perplexity",
"mode": "responses",
"supports_web_search": true,
"supports_reasoning": false,
"supports_function_calling": true
"supports_function_calling": true,
"prompt_cache_min_tokens": 4096
},
"perplexity/google/gemini-3-pro-preview": {
"litellm_provider": "perplexity",
@ -35825,7 +35853,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 4096
},
"vercel_ai_gateway/anthropic/claude-opus-4": {
"cache_creation_input_token_cost": 1.875e-05,
@ -35863,7 +35892,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vercel_ai_gateway/anthropic/claude-opus-4.5": {
"cache_creation_input_token_cost": 6.25e-06,
@ -35883,7 +35913,8 @@
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"vercel_ai_gateway/anthropic/claude-opus-4.6": {
"supports_adaptive_thinking": true,
@ -35904,7 +35935,8 @@
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_output_config": true
"supports_output_config": true,
"prompt_cache_min_tokens": 4096
},
"vercel_ai_gateway/anthropic/claude-sonnet-4": {
"cache_creation_input_token_cost": 3.75e-06,
@ -35923,7 +35955,8 @@
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vercel_ai_gateway/anthropic/claude-sonnet-4.5": {
"cache_creation_input_token_cost": 3.75e-06,
@ -35941,7 +35974,8 @@
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vercel_ai_gateway/cohere/command-a": {
"input_cost_per_token": 2.5e-06,
@ -37054,7 +37088,8 @@
"supports_assistant_prefill": true,
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vertex_ai/claude-opus-4-1@20250805": {
"cache_creation_input_token_cost": 1.875e-05,
@ -37072,7 +37107,8 @@
"supports_assistant_prefill": true,
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_vision": true
"supports_vision": true,
"prompt_cache_min_tokens": 1024
},
"vertex_ai/claude-opus-4-5": {
"cache_creation_input_token_cost": 6.25e-06,
@ -37282,7 +37318,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 512
},
"vertex_ai/claude-fable-5@default": {
"supports_mid_conversation_system": true,
@ -37313,7 +37350,8 @@
"supports_tool_choice": true,
"supports_vision": true,
"supports_xhigh_reasoning_effort": true,
"supports_max_reasoning_effort": true
"supports_max_reasoning_effort": true,
"prompt_cache_min_tokens": 512
},
"vertex_ai/claude-opus-5": {
"supports_mid_conversation_system": true,
@ -45687,7 +45725,8 @@
"supports_vision": true,
"supports_prompt_caching": true,
"supports_system_messages": true,
"supports_response_schema": true
"supports_response_schema": true,
"prompt_cache_min_tokens": 1024
},
"snowflake/claude-sonnet-4-6": {
"supports_adaptive_thinking": true,
@ -45703,7 +45742,8 @@
"supports_vision": true,
"supports_prompt_caching": true,
"supports_system_messages": true,
"supports_response_schema": true
"supports_response_schema": true,
"prompt_cache_min_tokens": 1024
},
"snowflake/claude-4-sonnet": {
"max_tokens": 16384,
@ -45749,7 +45789,8 @@
"supports_vision": true,
"supports_prompt_caching": true,
"supports_system_messages": true,
"supports_response_schema": true
"supports_response_schema": true,
"prompt_cache_min_tokens": 4096
},
"snowflake/claude-3-7-sonnet": {
"max_tokens": 16384,

View file

@ -0,0 +1,83 @@
"""Regression: an Anthropic model served through a reseller alias had no
`prompt_cache_min_tokens`, so `get_prompt_cache_min_tokens` fell back
to DEFAULT_MINIMUM_PROMPT_CACHE_TOKEN_COUNT (1024). Where the real minimum
is higher, `is_prompt_caching_valid_prompt` then returned True for a prompt
Anthropic will not cache, and Anthropic returns no error in that case.
"""
import pytest
from litellm.constants import DEFAULT_MINIMUM_PROMPT_CACHE_TOKEN_COUNT
from litellm.utils import get_prompt_cache_min_tokens
import litellm
@pytest.fixture(autouse=True)
def local_model_cost_map(monkeypatch):
original_model_cost = litellm.model_cost
monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True")
litellm.model_cost = litellm.get_model_cost_map(url="")
litellm.get_model_info.cache_clear()
try:
yield
finally:
litellm.model_cost = original_model_cost
litellm.get_model_info.cache_clear()
# (alias, expected minimum). Every value already appears in the cost map on the
# canonical alias for the same model; these are the reseller entries missing it.
ALIASES_ABOVE_DEFAULT = [
("azure_ai/claude-haiku-4-5", 4096),
("azure_ai/claude-opus-4-5", 4096),
("azure_ai/claude-opus-4-6", 4096),
("azure_ai/claude-opus-4-7", 2048),
("openrouter/anthropic/claude-haiku-4.5", 4096),
("openrouter/anthropic/claude-opus-4.7", 2048),
("snowflake/claude-haiku-4-5", 4096),
("vercel_ai_gateway/anthropic/claude-haiku-4.5", 4096),
]
ALIASES_BELOW_DEFAULT = [
("azure_ai/claude-fable-5", 512),
("vertex_ai/claude-fable-5", 512),
]
@pytest.mark.parametrize("model,expected", ALIASES_ABOVE_DEFAULT)
def test_alias_minimum_is_not_the_default_when_the_real_one_is_higher(model, expected):
"""The failure is silent, so it has to be caught here rather than at runtime."""
assert get_prompt_cache_min_tokens(model=model) == expected
assert get_prompt_cache_min_tokens(model=model) > DEFAULT_MINIMUM_PROMPT_CACHE_TOKEN_COUNT
@pytest.mark.parametrize("model,expected", ALIASES_BELOW_DEFAULT)
def test_alias_minimum_is_not_the_default_when_the_real_one_is_lower(model, expected):
"""The opposite error: caching skipped for a prompt that would have cached."""
assert get_prompt_cache_min_tokens(model=model) == expected
assert get_prompt_cache_min_tokens(model=model) < DEFAULT_MINIMUM_PROMPT_CACHE_TOKEN_COUNT
@pytest.mark.parametrize("alias,canonical", [
("azure_ai/claude-haiku-4-5", "claude-haiku-4-5"),
("snowflake/claude-sonnet-4-6", "claude-sonnet-4-6"),
("openrouter/anthropic/claude-opus-4.5", "claude-opus-4-5"),
("vertex_ai/claude-fable-5", "claude-fable-5"),
])
def test_an_alias_agrees_with_its_canonical_model(alias, canonical):
"""The minimum is a property of the model, not of the surface serving it.
The cost map already assumes this: the Bedrock, us., eu. and apac. variants
all carry the same minimum as the direct entry.
"""
assert get_prompt_cache_min_tokens(model=alias) == get_prompt_cache_min_tokens(
model=canonical)
def test_minimums_are_non_monotonic_across_generations():
"""Newer is not always lower, which is why these cannot be inferred.
If this ever passes by accident because everything collapsed to one value,
the resolution is broken rather than the models having converged.
"""
assert get_prompt_cache_min_tokens(model="claude-opus-5") == 512
assert get_prompt_cache_min_tokens(model="claude-opus-4-8") == 1024
assert get_prompt_cache_min_tokens(model="claude-opus-4-7") == 2048
assert get_prompt_cache_min_tokens(model="claude-opus-4-6") == 4096
def test_an_unknown_model_still_falls_back_rather_than_raising():
"""The fallback is right for a model nobody has recorded.
The bug was reaching it for models recorded elsewhere in the same file."""
assert (get_prompt_cache_min_tokens(model="not-a-real-model-xyz") ==
DEFAULT_MINIMUM_PROMPT_CACHE_TOKEN_COUNT)

View file

@ -4878,13 +4878,12 @@ def test_get_prompt_cache_min_tokens_resolves_per_model(
def test_get_prompt_cache_min_tokens_differs_per_platform_for_same_model(local_model_cost_map: None) -> None:
"""The same model can carry a different minimum per platform, so the threshold must come from
the platform's own cost-map entry rather than being derived from the model family name."""
"""
Test that the same model name returns different min tokens depending on the platform prefix.
"""
assert get_prompt_cache_min_tokens(model="claude-fable-5") == 512
assert get_prompt_cache_min_tokens(model="anthropic.claude-fable-5") == 1024
assert get_prompt_cache_min_tokens(model="claude-fable-5") != get_prompt_cache_min_tokens(
model="anthropic.claude-fable-5"
)
assert get_prompt_cache_min_tokens(model="anthropic.claude-fable-5") == 512
assert get_prompt_cache_min_tokens(model="vertex_ai/claude-fable-5") == 512
def test_get_prompt_cache_min_tokens_unmapped_model_falls_back_to_default(local_model_cost_map: None) -> None: