Commit graph

1796 commits

Author SHA1 Message Date
tin-berri
4e19127350
fix(pricing): add undated azure aliases for gpt-audio-mini and gpt-realtime-mini (#37867)
* fix(pricing): add undated azure aliases for gpt-audio-mini and gpt-realtime-mini

Azure deployments are commonly created against the undated model name,
and the cost-tracking docs say to set base_model to azure/<model> — but
only the dated -2025-10-06 entries existed for these two models (the
openai provider has undated aliases for both). base_model:
azure/gpt-audio-mini therefore resolved to nothing and, depending on the
fallback path, text tokens billed at $0 while audio tokens billed fine.

Mirror the -2025-10-06 entries as undated aliases, exactly like the
undated openai entries mirror their newest dated variant.

Fixes #33170

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(pricing): assert undated azure audio aliases exactly mirror their dated entries

Review follow-up: COST_FIELDS missed realtime-specific cost keys
(cache_creation_input_audio_token_cost, cache_read_input_token_cost,
input_cost_per_image). Full-entry equality catches drift on every field.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(pricing): mirror updated mode=realtime on the undated gpt-realtime-mini alias

Upstream changed the dated entry's mode from chat to realtime after this
branch was cut; the undated alias must stay a byte-for-byte mirror.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(pricing): mirror the new deprecation_date onto the undated gpt-audio-mini alias

* test(pricing): use shared local_model_cost_map fixture so get_model_info's lru_cache never crosses maps

---------

Co-authored-by: Mihidum Hettiyahandi <55163074+mihidumh@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 18:44:19 -07:00
Mateo Wang
76d46274c1
Merge pull request #37880 from BerriAI/litellm_gpt56_sol_promo_pricing
fix(model-costs): apply GPT-5.6 Sol promotional pricing cut
2026-08-21 18:39:36 -07:00
Mateo Wang
a78e1a2b60
Merge pull request #36849 from emerzon/litellm_add_gemini_3_1_flash_lite_image
fix(model_prices): correct gemini-3.1-flash-lite-image capabilities and dedupe its entries
2026-08-21 17:56:43 -07:00
mateo-berri
2ad2bec0f0 fix(model-costs): apply the Sol promo cut to the gpt-5.6 alias
OpenAI's model page for gpt-5.6 serves the GPT-5.6 Sol page and states
that the gpt-5.6 alias routes requests to GPT-5.6 Sol, so the alias bills
at Sol's rates. The registry entry was left on the pre-cut rates while
gpt-5.6-sol took the cut, overbilling gpt-5.6 callers by 25 percent on
input and 50 percent on output.

All 23 cost fields on gpt-5.6 now match gpt-5.6-sol, and a regression
test pins the two entries together so they cannot drift again.
2026-08-21 17:37:44 -07:00
Mateo Wang
6f07119925
Merge pull request #37821 from longwind48/litellm_bedrock_gpt56_runtime_cross_region
feat(bedrock): serve gpt-5.6 cross-region inference profiles on bedrock runtime
2026-08-21 17:30:06 -07:00
mateo-berri
ce11d39701 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_add_gemini_3_1_flash_lite_image 2026-08-21 17:23:52 -07:00
mateo-berri
e917e4b307 fix(model_cost): dedupe gemini-3.1-flash-lite-image and correct its capabilities
The three lite-image keys landed on the deploy branch separately while this
branch was open, so merging left every key defined twice in both price maps.
The merge is clean as text and the file still parses, but JSON keeps the last
occurrence of a repeated key, so the first copy's supported_endpoints,
supported_modalities and supports_system_messages were being dropped without
any error.

Each key is now one entry, placed next to its gemini-3.1-flash-image sibling
rather than at the end of the file.

supports_reasoning goes to false on all three, matching every other Gemini
image model. Leaving it off is not neutral: _supports_factory falls through to
the vertex_ai provider config, which answers true, and reasoning_effort then
gets forwarded to an image endpoint that rejects it. That was fixed for the
rest of the family in 75dd70a678 and these entries had drifted back.

Also fills in what the entries were missing against Google's published
pricing: the Vertex implicit cache read rate, batch rates on the Vertex
routes, and the pdf/video input flags.

The two overlapping test files are folded into one, and the price map suite
grows a duplicate-key guard so the next clean-but-lossy merge fails loudly.
2026-08-21 17:23:47 -07:00
Mateo Wang
3029f7eb84
Merge pull request #34752 from SouthernCrossAI/litellm_scx_ai_provider
feat(providers): add SCX.ai as a JSON-configured OpenAI-compatible provider
2026-08-21 17:21:46 -07:00
mateo-berri
dc63c72268 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_add_gemini_3_1_flash_lite_image 2026-08-21 17:10:54 -07:00
mateo-berri
277ed8870a Merge remote-tracking branch 'origin/litellm_internal_staging' into drive-37552 2026-08-21 14:44:28 -07:00
Mubashir Osmani
e6a6016e3e fix(model-costs): apply GPT-5.6 Sol promotional pricing cut
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-21 19:48:27 +00:00
tin-berri
4307b34aca
fix: omit thinking.type=disabled for always-on thinking Claude models (#37510) 2026-08-21 10:27:26 -07:00
longwind48
86efa2bcfd feat(bedrock): serve gpt-5.6 cross-region inference profiles on bedrock runtime
GPT-5.6 Sol, Terra and Luna reached the bedrock-runtime data plane on
2026-08-17, separately from the existing bedrock-mantle path. On runtime
they are served only through cross-region inference profiles, so
bedrock/us.openai.gpt-5.6-* had no cost map entry and fell through to the
Invoke route, which rewrites the token cap to max_tokens and is rejected
as unsupported_parameter on both /v1/chat/completions and /v1/responses.

Register the Geo and Global profiles as bedrock_converse so routing
reaches Converse, which AWS documents and serves for these models, and
price each profile from its own published rate table. No bare key: the
control plane reports inferenceTypesSupported INFERENCE_PROFILE with no
on-demand throughput, so a bare id is not invocable.

Declare the published cache-read and cache-write rates. Bedrock rejects
an explicit cachePoint block for these models, so supports_prompt_caching
stays off, but it caches long prefixes implicitly and reports the cache
tokens in usage either way. Without the cost fields a cache-read turn
bills only its uncached tokens: measured against live Bedrock, a
15609-token cached prefix came to $0.000176 instead of $0.00876095.
Clients that resend a long prefix every turn are the worst affected.

Reasoning stays unadvertised. Converse rejects the Anthropic-shaped
thinking block LiteLLM sends for reasoning_effort; the shape these models
accept is additionalModelRequestFields {"reasoning": {"effort": ...}},
which needs a transform change tracked by #34105. Advertising it without
that change is what made the earlier attempt in #37307 fail.
2026-08-21 19:03:04 +08:00
bhuvan2134686
7d9e375698 fix(scx-ai): use the published scx.ai rates and the scx_ai docs url
Applies the review suggestions. The cost map now carries the rates published on
https://scx.ai/pricing, GLM-5.2 at 0.61 in, 0.22 cached, 1.98 out and
Qwen3.8-Max at 1.65 in, 0.21 cached, 4.99 out per million tokens, and cites that
page as the source rather than a third party gateway. The provider link is
corrected to https://docs.litellm.ai/docs/providers/scx_ai to match the page
that shipped as scx_ai.md. Both the primary files and their backup mirrors are
updated.
2026-08-21 17:28:12 +10:00
bhuvan2134686
aef09aca18 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_scx_ai_provider
Resolves the three conflicts against the JSON provider registry refactor. The
hardcoded api.scx.ai base-url branch in get_llm_provider_logic.py is dropped in
favour of the generic JSONProviderRegistry.get_by_base_url lookup, which reads
the same base_url and api_key_env from providers.json and additionally honours
an explicitly passed api_key. constants.py and types/utils.py keep both the
cognition and scx-ai entries added on either side.
2026-08-21 17:27:49 +10:00
Mateo Wang
ecd18c5a82
Merge pull request #37763 from BerriAI/litellm_fix_cognition_swe_1_7_pricing
fix(cognition): price swe-1.7 at the standard tier, add swe-1.7-lightning
2026-08-20 21:01:11 -07:00
Mateo Wang
354f497faf
Merge pull request #37751 from BerriAI/litellm_fal_gpt_image_2_keyed_pricing
fix(fal_ai): price gpt-image-2 per size and quality from request params
2026-08-20 19:51:26 -07:00
mateo-berri
7d999a1586 fix(cognition): price swe-1.7 at the standard tier, add swe-1.7-lightning
The cost map shipped cognition/swe-1.7 at $2.50 in / $12.50 out per million with
$1.00 cache reads. Those are the Lightning numbers. Cognition's own model list at
https://docs.devin.ai/desktop/models has uid swe-1-7 at $0.50 / $2.50 with $0.20
cache reads, and uid swe-1-7-lightning at $2.50 / $12.50 with $1.00 cache reads,
so every swe-1.7 call has been costed at 5x since the entry landed.

swe-1.7 now carries the standard rates and the Lightning tier gets its own entry,
in both cost map copies. The source field on both moves to the desktop models page,
which is the one that lists both tiers.
2026-08-20 19:41:12 -07:00
Mateo Wang
66a6a09706
Merge pull request #37743 from BerriAI/litellm_cognition_provider_identity
feat(cognition): give Cognition its own provider identity
2026-08-20 18:38:23 -07:00
mateo-berri
27c3f87aef fix(fal_ai): price gpt-image-2 per size and quality from request params 2026-08-20 18:00:27 -07:00
mateo-berri
1a9e9951e1 fix(cognition): restore Lightning SWE pricing and declare responses support
The swe-1.7 rates were briefly lowered to the standard tier. The docs page
records the API-served swe-1.7 as the Cerebras-served Lightning tier, so put
the matching rates back rather than have the cost map and the docs disagree.

Cognition also answers /v1/responses through the chat-completions bridge, the
same as every other provider in the JSON registry, so the endpoints support
matrix should say so instead of under-declaring it.
2026-08-20 17:39:29 -07:00
Mateo Wang
211b399761
Merge pull request #37658 from BerriAI/litellm_model_registry_consolidated_20260820
fix(model_prices): consolidate eleven open registry audits into one changeset
2026-08-20 17:39:19 -07:00
mateo-berri
332a0f1b9b fix(cognition): price swe-1.7 from the published standard tier
The swe-1.7 rates were carried over from the closed prior attempt and
match SWE-1.7 Lightning, 5x the SWE-1.7 Max and Medium rates the vendor
publishes. swe-1.6 was already on the standard tier, so the two entries
disagreed with each other. Both now read 0.5 in, 2.5 out, 0.2 cached per
million tokens.

Also drops the redundant registry comment in constants.py.
2026-08-20 17:33:59 -07:00
Mateo Wang
286c75f69d
Merge pull request #37729 from BerriAI/devin_ai_fal_gpt_image_2
feat(fal_ai): add gpt-image-2 image generation support
2026-08-20 17:23:24 -07:00
Mateo Wang
fb3dd0fb98
Merge pull request #37722 from BerriAI/litellm_gpt56_max_input_tokens
fix(model-costs): correct gpt-5.6 max input tokens to 922k
2026-08-20 17:21:09 -07:00
mateo-berri
e00301703f feat(cognition): give Cognition its own provider identity
Cognition serves an OpenAI-compatible /v1/chat/completions endpoint, so it has been onboarded as
custom_llm_provider: openai. That books its traffic as OpenAI, which means OpenAI-specific cost
discounts and provider-level reporting apply to it.

Registers cognition through the JSON provider registry: a providers.json entry with
COGNITION_API_KEY and COGNITION_API_BASE, LlmProviders.COGNITION, the constants.py provider lists,
cost map entries for swe-1.6 and swe-1.7, the provider endpoints matrix, the dashboard provider
fields, and tests. JSON providers can now also be resolved from their base url alone, so an
api_base pointing at a known provider no longer falls through to an unresolved provider.
2026-08-20 17:16:53 -07:00
mateo-berri
6d66567915 fix(fal_ai): stop advertising /v1/images/edits for gpt-image-2 edit
The edit model is reached through the image generation path with fal's
image_urls param; /v1/images/edits is not wired for fal_ai and errors.
Point supported_endpoints at /v1/images/generations and say so in the
entry notes.
2026-08-20 17:02:07 -07:00
mateo-berri
5c9ed89301 fix: mark daybreak-blue-latest and gpt-5.6-sol as supporting computer use
OpenAI documents computer_use as a supported tool for Daybreak Blue and its
default snapshot gpt-5.6-sol, but neither entry carried supports_computer_use.
Sibling gpt-5.6-cyber and daybreak-red-latest already set it, so /model/info
and the capability gates reported blue as unable to use computer tools.

The gap came in with the source PR rather than the consolidation: #37029 sets
the flag on cyber and red only. Pinned by a new metadata test covering the
daybreak family and the blue alias agreeing with its snapshot.
2026-08-20 16:20:40 -07:00
Devin AI
618d907d5a fix(fal_ai): price gpt-image-2 unprefixed alias and edit endpoint
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-20 23:04:37 +00:00
Devin AI
60706d5f89 feat(fal_ai): add gpt-image-2 image generation support
Route fal.ai's openai/gpt-image-2 endpoints through a dedicated transformation that maps OpenAI image params (n, size, quality, output_format) into fal's schema, and register the model in the cost map.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-20 22:18:34 +00:00
Mateo Wang
d556fac56b
Merge pull request #37112 from mubashir1osmani/litellm_add_perplexity_agent_api_models
feat(perplexity): add Agent API third-party models
2026-08-20 14:49:12 -07:00
mateo
6bb677d30f fix(model-costs): correct gpt-5.6 input token cap
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-20 21:44:32 +00:00
mateo-berri
2996a18fa9 fix(model_prices): document 262k input limit on fireworks qwen3p8-max 2026-08-20 14:33:04 -07:00
mateo-berri
50a346da1c fix(model_prices): restore supports_vision on Mistral Small 4.0 entries 2026-08-20 13:54:03 -07:00
mateo-berri
0bdaa98b28 fix(perplexity): correct glm-5.2 cache read rate to the published catalog rate
The new perplexity/perplexity/glm-5.2 row carried 2.6e-07, which is glm-5.3's
cache read rate. api.perplexity.ai/v1/models publishes 0.14 usd per 1M cached
input tokens for glm-5.2, so the rate is 1.4e-07.
2026-08-20 12:48:41 -07:00
Devin AI
ba4a355afc fix(model_prices): add tpm/rpm to gemini live-translate preview entry
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-20 19:27:44 +00:00
Devin AI
bdd4c8e564 fix(model_prices): add Gemini live-translate, Voyage 4 series, Perplexity contextualized embeddings; absorb Fireworks + Bedrock batch registry PRs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-20 19:14:11 +00:00
Devin AI
a95a1d0232 fix(model_prices): drop duplicate zai-glm-5-2 entry superseded by staging
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-20 18:35:52 +00:00
Devin AI
b469294029 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_model_registry_consolidated_20260820 2026-08-20 18:35:08 +00:00
mateo-berri
059aec8887 Merge remote-tracking branch 'origin/litellm_internal_staging' into pr37112-head 2026-08-20 11:18:30 -07:00
Devin AI
b7017a7949 fix(model_prices): consolidate nine open registry audits into one changeset
Combines the model-cost-map data from #35911, #36017, #36080, #36113, #36188, #36444, #37029, #37252 and #37632 onto current litellm_internal_staging, merged per entry field so older branches no longer revert fields the base has gained since they were opened. Drops the Gemini deprecation dates from #36188 and the text-embedding-004 date from #36080 that the official docs contradict.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-20 18:13:39 +00:00
mateo-berri
10829fff04 Merge remote-tracking branch 'origin/litellm_internal_staging' into pr-37110-check 2026-08-20 11:00:02 -07:00
mateo-berri
4fac88790d fix(mistral): correct zai-glm-5-2 limits, add cached-input price and glm-5-2 alias
Mistral's live /v1/models reports max_context_length 1048576 and capabilities.reasoning
true for zai-glm-5-2, and its docs price cached input at $0.14/M. Without
cache_read_input_token_cost LiteLLM billed every cached prompt token at $0, so a repeat
request against a 21k-token cached prefix logged $0.0000135 instead of its real cost.

Mistral also serves the model under the short glm-5-2 name, which had no cost map entry
at all and therefore no pricing, so add it alongside.
2026-08-20 10:45:24 -07:00
Mateo Wang
e51addb802
Merge pull request #37628 from BerriAI/litellm_lit5876_openai_prompt_cache_breakpoint
feat(prompt-caching): map cache_control_injection_points to OpenAI prompt_cache_breakpoint on GPT-5.6+ targets
2026-08-20 10:24:43 -07:00
mateo-berri
d9aaa95978 Gate OpenAI prompt cache breakpoints on the real target and carry them through /v1/responses
The cache control hook also runs on litellm.responses() input. On a
GPT-5.6 deployment it wrapped a string-content item into a chat-shaped
{"type": "text"} part, which the Responses API rejects, and it never
marked input_text, input_image or input_file parts, so no breakpoint and
no prompt_cache_options reached the provider. Add the Responses part
types to the eligible block set and translate chat-shaped text parts on
non-assistant items to input_text in
ResponsesAPIRequestUtils.merge_prompt_management_input, which both the
async and the sync prompt management sites go through.

The dialect also fired for any GPT-5.6 name that resolved to provider
openai, including deployments pointed at a custom api_base that does not
understand prompt_cache_breakpoint. Decide it once per request from the
provider, the model map and the resolved api_base (request, then
litellm.api_base, then OPENAI_BASE_URL / OPENAI_API_BASE): only
api.openai.com and *.api.openai.com hosts speak the dialect, a top-level
prompt_cache_options opts a custom target in, and litellm_proxy/ targets
never get it. maybe_seed_default_injection_points takes api_base and
stamps the finished decision on the points as _litellm_openai_dialect so
the sync completion() path, whose hook params do not carry api_base,
honors it; maybe_inject_cache_control takes api_base from the
/v1/messages handler.

Eligibility now comes from a supports_prompt_cache_breakpoint model map
flag on the OpenAI gpt-5.6 entries, exposed through
litellm.utils.supports_prompt_cache_breakpoint, with the GPT version rule
kept only for models the map does not know. The OpenAI dialect no longer
reserves a slot for tool_config points, which OpenAI has no cache block
for, and with_prompt_cache_breakpoint plus the chat bridge helper return
a new block instead of mutating their input.
2026-08-20 05:17:13 -07:00
Mateo Wang
952c6d5675
Merge pull request #37517 from BerriAI/devin_ai_bedrock_grok_4_6_cost_map
feat: add bedrock grok 4.6 to model cost map
2026-08-20 03:03:44 -07:00
Mateo Wang
6fcdea03b0
Merge pull request #36969 from oneKn8/fix-cost-map-mid-conversation-flag
fix: add supports_mid_conversation_system to bare first-party Claude cost-map keys
2026-08-20 02:04:56 -07:00
Tin Chi Lo
42cffe93c8 Add moonshot/kimi-k3 to model prices and context window map
Pricing per https://platform.kimi.ai/docs/pricing/chat-k3:
- $3.00/M input (cache miss), $0.30/M cache read, $15.00/M output
- 1,048,576 context window; max_completion_tokens settable up to 1,048,576
- Supports reasoning (reasoning_effort low/high/max), tool calling,
  structured output, vision and video input

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 20:49:23 -07:00
Mateo Wang
a6163e0146
Merge pull request #37543 from BerriAI/litellm_lit_5785_vertex_regional_pricing
fix(vertex_ai): apply regional endpoint uplift to cost tracking
2026-08-19 17:56:34 -07:00
Mateo Wang
634e699555
Merge pull request #36331 from BerriAI/devin_ai_agentcore_search
feat(search): add Amazon Bedrock AgentCore web search provider
2026-08-19 15:59:17 -07:00