feat(cost): ship 2026 PRC dates on all direct DeepSeek rows

Every direct DeepSeek row carrying off_peak_pricing now shares the same windows, weekday_timezone Asia/Shanghai, and override_dates for the 2026 public holidays and make-up workdays; each row keeps its own halved off-peak rates. A unit test moment that pinned 2026-09-25 (now a modeled holiday) moves to 2026-09-18.
This commit is contained in:
shrey kharbanda 2026-09-24 06:38:43 +00:00
parent 156b1efc24
commit 05da2d7de0
4 changed files with 1027 additions and 37 deletions

View file

@ -36610,7 +36610,7 @@
"supports_xhigh_reasoning_effort": true
},
"meta/muse-voice-transcribe-1.0": {
"input_cost_per_second": 0.00005,
"input_cost_per_second": 5e-05,
"litellm_provider": "meta",
"mode": "audio_transcription",
"source": "https://dev.meta.ai/docs/speech-to-text",
@ -40864,7 +40864,50 @@
"max_output_tokens": 943718,
"max_tokens": 943718,
"mode": "chat",
"off_peak_pricing": {"windows":[{"weekdays":["saturday","sunday"],"hours_utc":"00:00-00:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"00:00-01:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"04:00-06:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"10:00-00:00"}],"input_cost_per_token":1.5e-7,"output_cost_per_token":6e-7,"cache_read_input_token_cost":3e-9},
"off_peak_pricing": {
"windows": [
{
"weekdays": [
"saturday",
"sunday"
],
"hours_utc": "00:00-00:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "00:00-01:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "04:00-06:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "10:00-00:00"
}
],
"input_cost_per_token": 1.5e-07,
"output_cost_per_token": 6e-07,
"cache_read_input_token_cost": 3e-09
},
"source": "https://openrouter.ai/api/v1/models",
"supports_audio_input": false,
"supports_function_calling": true,
@ -40892,7 +40935,50 @@
"supports_response_schema": true,
"supports_tool_choice": true,
"cache_read_input_token_cost": 1.54e-08,
"off_peak_pricing": {"windows":[{"weekdays":["saturday","sunday"],"hours_utc":"00:00-00:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"00:00-01:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"04:00-06:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"10:00-00:00"}],"input_cost_per_token":0.00000132,"output_cost_per_token":0.00000396,"cache_read_input_token_cost":4.4e-8},
"off_peak_pricing": {
"windows": [
{
"weekdays": [
"saturday",
"sunday"
],
"hours_utc": "00:00-00:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "00:00-01:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "04:00-06:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "10:00-00:00"
}
],
"input_cost_per_token": 1.32e-06,
"output_cost_per_token": 3.96e-06,
"cache_read_input_token_cost": 4.4e-08
},
"supports_audio_input": false,
"supports_pdf_input": false,
"supports_vision": false,
@ -58028,8 +58114,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58082,8 +58222,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58136,8 +58330,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58190,8 +58438,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 3.96e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58352,8 +58654,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58406,8 +58762,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -59169,7 +59579,13 @@
{
"name": "claude-adaptive-thinking",
"pattern": "claude-[a-z]+-(?:4[-._](?:[6-9]|[1-9]\\d)(?!\\d)|[5-9](?!\\d)(?:[-._]\\d{1,2}(?!\\d))?)",
"fill_missing_for_providers": ["anthropic", "azure_ai", "bedrock", "bedrock_converse", "vertex_ai-anthropic_models"],
"fill_missing_for_providers": [
"anthropic",
"azure_ai",
"bedrock",
"bedrock_converse",
"vertex_ai-anthropic_models"
],
"description": "Claude at version 4.6 or higher, in any id shape that contains claude-<family>-: minors 4.6 through 4.99, any later major-minor, and bare 5+ majors so a new family shaped like claude-fable-5 matches. Requiring the claude- prefix keeps non-Claude names such as team-sonnet-5-1 out. The minor is capped at two digits so an 8-digit date suffix such as claude-opus-4-20250514 is never read as a >= 4.6 minor. Two-digit majors are deliberately not matched so ids like claude-opus-41 (4.1) are not read as major 41. Turns on adaptive thinking for new versions and new families with no code change.",
"model_info": {
"supports_adaptive_thinking": true
@ -59178,7 +59594,13 @@
{
"name": "claude-legacy-thinking",
"pattern": "claude-[a-z]+-4[-._]6(?!\\d)",
"fill_missing_for_providers": ["anthropic", "azure_ai", "bedrock", "bedrock_converse", "vertex_ai-anthropic_models"],
"fill_missing_for_providers": [
"anthropic",
"azure_ai",
"bedrock",
"bedrock_converse",
"vertex_ai-anthropic_models"
],
"description": "Claude at version 4.6 exactly, in any id shape that contains claude-<family>-4-6 (dotted and underscored minors included, dated releases such as claude-sonnet-4-6-20260219 too). The 4.6 family is adaptive-thinking yet still accepts legacy thinking.type=enabled with budget_tokens, so the caller's hard budget cap is forwarded verbatim instead of being rewritten to an uncapped output_config.effort. The lookahead keeps two-digit minors such as 4-60 from matching. 4.7+ and 5+ majors reject the legacy shape and stay on the adaptive translation.",
"model_info": {
"supports_legacy_thinking": true
@ -59195,7 +59617,13 @@
{
"name": "claude-mid-conversation-system",
"pattern": "claude-[a-z]+-(?:4[-._](?:[89]|[1-9]\\d)(?!\\d)|[5-9](?!\\d)(?:[-._]\\d{1,2}(?!\\d))?)",
"fill_missing_for_providers": ["anthropic", "azure_ai", "bedrock", "bedrock_converse", "vertex_ai-anthropic_models"],
"fill_missing_for_providers": [
"anthropic",
"azure_ai",
"bedrock",
"bedrock_converse",
"vertex_ai-anthropic_models"
],
"description": "Claude at version 4.8 or higher, in any id shape that contains claude-<family>-: minors 4.8 through 4.99, any later major-minor, and bare 5+ majors so a new family like claude-fable-5 matches. Two-digit majors are deliberately not matched so ids like claude-opus-41 (4.1) are not read as major 41. Anthropic introduced mid-conversation system messages with Opus 4.8 and every newer Claude keeps them; 4.7 and below reject the system role inside messages.",
"model_info": {
"supports_mid_conversation_system": true
@ -59204,7 +59632,12 @@
{
"name": "claude-tool-search",
"pattern": "claude-[a-z]+-(?:4[-._](?:[5-9]|[1-9]\\d)(?!\\d)|[5-9](?!\\d)(?:[-._]\\d{1,2}(?!\\d))?)",
"fill_missing_for_providers": ["anthropic", "bedrock", "bedrock_converse", "vertex_ai-anthropic_models"],
"fill_missing_for_providers": [
"anthropic",
"bedrock",
"bedrock_converse",
"vertex_ai-anthropic_models"
],
"description": "Claude at version 4.5 or higher, in any id shape that contains claude-<family>-: minors 4.5 through 4.99, any later major-minor, and bare 5+ majors so a new family like claude-fable-5 matches. Two-digit majors are deliberately not matched so ids like claude-opus-41 (4.1) are not read as major 41. Anthropic's tool search docs list every Claude 4.5 and newer model as supported and Opus 4.1 and earlier as unsupported, so the flag follows the version instead of a per-model list. azure_ai is left out on purpose: Anthropic documents tool search as unavailable on Azure-hosted Foundry deployments, and the azure_ai/ key cannot tell those from Anthropic-hosted ones.",
"model_info": {
"supports_tool_search": true
@ -59221,7 +59654,11 @@
{
"name": "openai-reasoning-family-baseline",
"pattern": "^(?!.*search-api)(?:[a-z0-9_.-]+/)*(?:ft:)?(?:o[1-9]\\d*(?![a-z0-9])|gpt-[5-9](?:\\.\\d+)?(?![0-9.])|(?:gpt-\\d+(?:\\.\\d+)?(?:-[a-z0-9]+)*-)?(?:codex|deep-research|chat-latest)(?![a-z0-9]))",
"fill_missing_for_providers": ["azure", "azure_ai", "openai"],
"fill_missing_for_providers": [
"azure",
"azure_ai",
"openai"
],
"description": "OpenAI reasoning families by id shape, under any provider namespace and with an optional ft: prefix: the o-series (o1, o3-pro, o4-mini), gpt-5 through gpt-9 majors including dotted minors and suffixed variants (gpt-5.5-cyber, gpt-6-astra), and the codex, deep-research and chat-latest lines when standalone or on a gpt base. gpt-5-search-api is excluded because it is a search-only surface. Every model here is a reasoning model, and the Responses API drops the caller's reasoning param for any mapped OpenAI model whose info lacks supports_reasoning, so an id the registry has not named yet keeps its reasoning settings instead of silently losing them. Rules lose to exact entries. Carries no mode and no pricing, so cost stays on the standard unpriced behavior.",
"model_info": {
"supports_reasoning": true
@ -70230,7 +70667,50 @@
"max_output_tokens": 384000,
"max_tokens": 384000,
"mode": "chat",
"off_peak_pricing": {"windows":[{"weekdays":["saturday","sunday"],"hours_utc":"00:00-00:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"00:00-01:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"04:00-06:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"10:00-00:00"}],"input_cost_per_token":6.6e-7,"output_cost_per_token":0.00000198,"cache_read_input_token_cost":2.2e-8},
"off_peak_pricing": {
"windows": [
{
"weekdays": [
"saturday",
"sunday"
],
"hours_utc": "00:00-00:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "00:00-01:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "04:00-06:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "10:00-00:00"
}
],
"input_cost_per_token": 6.6e-07,
"output_cost_per_token": 1.98e-06,
"cache_read_input_token_cost": 2.2e-08
},
"output_cost_per_token": 3.96e-06,
"source": "https://openrouter.ai/api/v1/models",
"supports_audio_input": false,
@ -73630,7 +74110,12 @@
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
"off_peak_pricing": {"hours_utc":"16:00-00:00","input_cost_per_token":8.25e-8,"output_cost_per_token":3.3e-7,"cache_read_input_token_cost":2.0625e-8},
"off_peak_pricing": {
"hours_utc": "16:00-00:00",
"input_cost_per_token": 8.25e-08,
"output_cost_per_token": 3.3e-07,
"cache_read_input_token_cost": 2.0625e-08
},
"output_cost_per_token": 5.28e-07,
"source": "https://openrouter.ai/api/v1/models",
"supports_audio_input": false,
@ -75263,7 +75748,9 @@
"mode": "chat",
"output_cost_per_token": 4.4e-06,
"source": "https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing",
"supported_regions": ["global"],
"supported_regions": [
"global"
],
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,

View file

@ -36610,7 +36610,7 @@
"supports_xhigh_reasoning_effort": true
},
"meta/muse-voice-transcribe-1.0": {
"input_cost_per_second": 0.00005,
"input_cost_per_second": 5e-05,
"litellm_provider": "meta",
"mode": "audio_transcription",
"source": "https://dev.meta.ai/docs/speech-to-text",
@ -40864,7 +40864,50 @@
"max_output_tokens": 943718,
"max_tokens": 943718,
"mode": "chat",
"off_peak_pricing": {"windows":[{"weekdays":["saturday","sunday"],"hours_utc":"00:00-00:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"00:00-01:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"04:00-06:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"10:00-00:00"}],"input_cost_per_token":1.5e-7,"output_cost_per_token":6e-7,"cache_read_input_token_cost":3e-9},
"off_peak_pricing": {
"windows": [
{
"weekdays": [
"saturday",
"sunday"
],
"hours_utc": "00:00-00:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "00:00-01:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "04:00-06:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "10:00-00:00"
}
],
"input_cost_per_token": 1.5e-07,
"output_cost_per_token": 6e-07,
"cache_read_input_token_cost": 3e-09
},
"source": "https://openrouter.ai/api/v1/models",
"supports_audio_input": false,
"supports_function_calling": true,
@ -40892,7 +40935,50 @@
"supports_response_schema": true,
"supports_tool_choice": true,
"cache_read_input_token_cost": 1.54e-08,
"off_peak_pricing": {"windows":[{"weekdays":["saturday","sunday"],"hours_utc":"00:00-00:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"00:00-01:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"04:00-06:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"10:00-00:00"}],"input_cost_per_token":0.00000132,"output_cost_per_token":0.00000396,"cache_read_input_token_cost":4.4e-8},
"off_peak_pricing": {
"windows": [
{
"weekdays": [
"saturday",
"sunday"
],
"hours_utc": "00:00-00:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "00:00-01:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "04:00-06:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "10:00-00:00"
}
],
"input_cost_per_token": 1.32e-06,
"output_cost_per_token": 3.96e-06,
"cache_read_input_token_cost": 4.4e-08
},
"supports_audio_input": false,
"supports_pdf_input": false,
"supports_vision": false,
@ -58028,8 +58114,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58082,8 +58222,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58136,8 +58330,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58190,8 +58438,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 3.96e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58352,8 +58654,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -58406,8 +58762,62 @@
6,
7
]
},
{
"hours_utc": "00:00-00:00",
"override_dates": [
"2026-01-01",
"2026-01-02",
"2026-01-03",
"2026-02-15",
"2026-02-16",
"2026-02-17",
"2026-02-18",
"2026-02-19",
"2026-02-20",
"2026-02-21",
"2026-02-22",
"2026-02-23",
"2026-04-04",
"2026-04-05",
"2026-04-06",
"2026-05-01",
"2026-05-02",
"2026-05-03",
"2026-05-04",
"2026-05-05",
"2026-06-19",
"2026-06-20",
"2026-06-21",
"2026-09-25",
"2026-09-26",
"2026-09-27",
"2026-10-01",
"2026-10-02",
"2026-10-03",
"2026-10-04",
"2026-10-05",
"2026-10-06",
"2026-10-07"
]
},
{
"hours_utc": [
"00:00-01:00",
"04:00-06:00",
"10:00-00:00"
],
"override_dates": [
"2026-01-04",
"2026-02-14",
"2026-02-28",
"2026-05-09",
"2026-09-20",
"2026-10-10"
]
}
]
],
"weekday_timezone": "Asia/Shanghai"
},
"output_cost_per_token": 1.2e-06,
"source": "https://api-docs.deepseek.com/quick_start/pricing",
@ -59169,7 +59579,13 @@
{
"name": "claude-adaptive-thinking",
"pattern": "claude-[a-z]+-(?:4[-._](?:[6-9]|[1-9]\\d)(?!\\d)|[5-9](?!\\d)(?:[-._]\\d{1,2}(?!\\d))?)",
"fill_missing_for_providers": ["anthropic", "azure_ai", "bedrock", "bedrock_converse", "vertex_ai-anthropic_models"],
"fill_missing_for_providers": [
"anthropic",
"azure_ai",
"bedrock",
"bedrock_converse",
"vertex_ai-anthropic_models"
],
"description": "Claude at version 4.6 or higher, in any id shape that contains claude-<family>-: minors 4.6 through 4.99, any later major-minor, and bare 5+ majors so a new family shaped like claude-fable-5 matches. Requiring the claude- prefix keeps non-Claude names such as team-sonnet-5-1 out. The minor is capped at two digits so an 8-digit date suffix such as claude-opus-4-20250514 is never read as a >= 4.6 minor. Two-digit majors are deliberately not matched so ids like claude-opus-41 (4.1) are not read as major 41. Turns on adaptive thinking for new versions and new families with no code change.",
"model_info": {
"supports_adaptive_thinking": true
@ -59178,7 +59594,13 @@
{
"name": "claude-legacy-thinking",
"pattern": "claude-[a-z]+-4[-._]6(?!\\d)",
"fill_missing_for_providers": ["anthropic", "azure_ai", "bedrock", "bedrock_converse", "vertex_ai-anthropic_models"],
"fill_missing_for_providers": [
"anthropic",
"azure_ai",
"bedrock",
"bedrock_converse",
"vertex_ai-anthropic_models"
],
"description": "Claude at version 4.6 exactly, in any id shape that contains claude-<family>-4-6 (dotted and underscored minors included, dated releases such as claude-sonnet-4-6-20260219 too). The 4.6 family is adaptive-thinking yet still accepts legacy thinking.type=enabled with budget_tokens, so the caller's hard budget cap is forwarded verbatim instead of being rewritten to an uncapped output_config.effort. The lookahead keeps two-digit minors such as 4-60 from matching. 4.7+ and 5+ majors reject the legacy shape and stay on the adaptive translation.",
"model_info": {
"supports_legacy_thinking": true
@ -59195,7 +59617,13 @@
{
"name": "claude-mid-conversation-system",
"pattern": "claude-[a-z]+-(?:4[-._](?:[89]|[1-9]\\d)(?!\\d)|[5-9](?!\\d)(?:[-._]\\d{1,2}(?!\\d))?)",
"fill_missing_for_providers": ["anthropic", "azure_ai", "bedrock", "bedrock_converse", "vertex_ai-anthropic_models"],
"fill_missing_for_providers": [
"anthropic",
"azure_ai",
"bedrock",
"bedrock_converse",
"vertex_ai-anthropic_models"
],
"description": "Claude at version 4.8 or higher, in any id shape that contains claude-<family>-: minors 4.8 through 4.99, any later major-minor, and bare 5+ majors so a new family like claude-fable-5 matches. Two-digit majors are deliberately not matched so ids like claude-opus-41 (4.1) are not read as major 41. Anthropic introduced mid-conversation system messages with Opus 4.8 and every newer Claude keeps them; 4.7 and below reject the system role inside messages.",
"model_info": {
"supports_mid_conversation_system": true
@ -59204,7 +59632,12 @@
{
"name": "claude-tool-search",
"pattern": "claude-[a-z]+-(?:4[-._](?:[5-9]|[1-9]\\d)(?!\\d)|[5-9](?!\\d)(?:[-._]\\d{1,2}(?!\\d))?)",
"fill_missing_for_providers": ["anthropic", "bedrock", "bedrock_converse", "vertex_ai-anthropic_models"],
"fill_missing_for_providers": [
"anthropic",
"bedrock",
"bedrock_converse",
"vertex_ai-anthropic_models"
],
"description": "Claude at version 4.5 or higher, in any id shape that contains claude-<family>-: minors 4.5 through 4.99, any later major-minor, and bare 5+ majors so a new family like claude-fable-5 matches. Two-digit majors are deliberately not matched so ids like claude-opus-41 (4.1) are not read as major 41. Anthropic's tool search docs list every Claude 4.5 and newer model as supported and Opus 4.1 and earlier as unsupported, so the flag follows the version instead of a per-model list. azure_ai is left out on purpose: Anthropic documents tool search as unavailable on Azure-hosted Foundry deployments, and the azure_ai/ key cannot tell those from Anthropic-hosted ones.",
"model_info": {
"supports_tool_search": true
@ -59221,7 +59654,11 @@
{
"name": "openai-reasoning-family-baseline",
"pattern": "^(?!.*search-api)(?:[a-z0-9_.-]+/)*(?:ft:)?(?:o[1-9]\\d*(?![a-z0-9])|gpt-[5-9](?:\\.\\d+)?(?![0-9.])|(?:gpt-\\d+(?:\\.\\d+)?(?:-[a-z0-9]+)*-)?(?:codex|deep-research|chat-latest)(?![a-z0-9]))",
"fill_missing_for_providers": ["azure", "azure_ai", "openai"],
"fill_missing_for_providers": [
"azure",
"azure_ai",
"openai"
],
"description": "OpenAI reasoning families by id shape, under any provider namespace and with an optional ft: prefix: the o-series (o1, o3-pro, o4-mini), gpt-5 through gpt-9 majors including dotted minors and suffixed variants (gpt-5.5-cyber, gpt-6-astra), and the codex, deep-research and chat-latest lines when standalone or on a gpt base. gpt-5-search-api is excluded because it is a search-only surface. Every model here is a reasoning model, and the Responses API drops the caller's reasoning param for any mapped OpenAI model whose info lacks supports_reasoning, so an id the registry has not named yet keeps its reasoning settings instead of silently losing them. Rules lose to exact entries. Carries no mode and no pricing, so cost stays on the standard unpriced behavior.",
"model_info": {
"supports_reasoning": true
@ -70230,7 +70667,50 @@
"max_output_tokens": 384000,
"max_tokens": 384000,
"mode": "chat",
"off_peak_pricing": {"windows":[{"weekdays":["saturday","sunday"],"hours_utc":"00:00-00:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"00:00-01:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"04:00-06:00"},{"weekdays":["monday","tuesday","wednesday","thursday","friday"],"hours_utc":"10:00-00:00"}],"input_cost_per_token":6.6e-7,"output_cost_per_token":0.00000198,"cache_read_input_token_cost":2.2e-8},
"off_peak_pricing": {
"windows": [
{
"weekdays": [
"saturday",
"sunday"
],
"hours_utc": "00:00-00:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "00:00-01:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "04:00-06:00"
},
{
"weekdays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"hours_utc": "10:00-00:00"
}
],
"input_cost_per_token": 6.6e-07,
"output_cost_per_token": 1.98e-06,
"cache_read_input_token_cost": 2.2e-08
},
"output_cost_per_token": 3.96e-06,
"source": "https://openrouter.ai/api/v1/models",
"supports_audio_input": false,
@ -73630,7 +74110,12 @@
"max_output_tokens": 128000,
"max_tokens": 128000,
"mode": "chat",
"off_peak_pricing": {"hours_utc":"16:00-00:00","input_cost_per_token":8.25e-8,"output_cost_per_token":3.3e-7,"cache_read_input_token_cost":2.0625e-8},
"off_peak_pricing": {
"hours_utc": "16:00-00:00",
"input_cost_per_token": 8.25e-08,
"output_cost_per_token": 3.3e-07,
"cache_read_input_token_cost": 2.0625e-08
},
"output_cost_per_token": 5.28e-07,
"source": "https://openrouter.ai/api/v1/models",
"supports_audio_input": false,
@ -75263,7 +75748,9 @@
"mode": "chat",
"output_cost_per_token": 4.4e-06,
"source": "https://cloud.google.com/gemini-enterprise-agent-platform/generative-ai/pricing",
"supported_regions": ["global"],
"supported_regions": [
"global"
],
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,

View file

@ -755,8 +755,9 @@ def test_is_off_peak_without_override_dates_is_unchanged():
def test_override_dates_use_weekday_timezone_calendar_on_shipped_deepseek_rows():
"""The shipped deepseek/deepseek-flash row reads its override_dates on the
Asia/Shanghai calendar: the make-up Sunday bills weekday hours and the holiday is
"""Every shipped DeepSeek row with off_peak_pricing carries the same block as
deepseek/deepseek-flash: the 2026 PRC holidays and make-up workdays, read on the
Asia/Shanghai calendar. The make-up Sunday bills weekday hours and a holiday is
off-peak all day."""
from datetime import datetime, timezone
@ -764,6 +765,21 @@ def test_override_dates_use_weekday_timezone_calendar_on_shipped_deepseek_rows()
block: Final = litellm.model_cost["deepseek/deepseek-flash"]["off_peak_pricing"]
assert block.get("weekday_timezone") == "Asia/Shanghai"
deepseek_rows: Final = {
name: entry["off_peak_pricing"]
for name, entry in litellm.model_cost.items()
if name.startswith("deepseek")
and not name.startswith("openrouter/")
and isinstance(entry, dict)
and "off_peak_pricing" in entry
}
assert deepseek_rows, "expected at least the deepseek/deepseek-flash row"
drifted: Final = [
name
for name, row in deepseek_rows.items()
if row.get("windows") != block["windows"] or row.get("weekday_timezone") != block["weekday_timezone"]
]
assert not drifted, f"off_peak schedule drift on {drifted}"
shanghai_make_up_sunday = datetime(2026, 1, 3, 17, 0, tzinfo=timezone.utc)
make_up_sunday_peak = datetime(2026, 1, 4, 2, 0, tzinfo=timezone.utc)

View file

@ -20,7 +20,7 @@ def local_model_cost_map(monkeypatch: pytest.MonkeyPatch) -> Generator[None, Non
PEAK_MOMENTS: Final = (
pytest.param(datetime(2026, 9, 22, 8, 0, tzinfo=timezone.utc), id="tuesday-08:00"),
pytest.param(datetime(2026, 9, 25, 9, 59, tzinfo=timezone.utc), id="friday-09:59"),
pytest.param(datetime(2026, 9, 18, 9, 59, tzinfo=timezone.utc), id="friday-09:59"),
pytest.param(datetime(2026, 9, 21, 1, 0, tzinfo=timezone.utc), id="monday-01:00"),
)
OFF_PEAK_MOMENTS: Final = (