Commit graph

1720 commits

Author SHA1 Message Date
mateo
94a29e0708 fix(gemini): price gemini 3.6 flash at Google's introductory rates on every service tier
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-17 18:42:57 +00:00
Anmol Jaiswal
0059b497f4
fix(model_map): flag native structured outputs on Anthropic-direct claude-sonnet-5 and claude-haiku-4-5 (#35930)
* fix(model_map): flag native structured outputs on Anthropic-direct claude-sonnet-5 and claude-haiku-4-5

The Bedrock twins of both models already carry
supports_native_structured_output, but the Anthropic-direct entries do not,
so response_format requests to anthropic/claude-sonnet-5 and
anthropic/claude-haiku-4-5 fall back to the json_tool_call emulation and
inherit its nested-envelope failure modes (#8898) despite the API supporting
output_format natively.

Verified live against the Anthropic API on 2026-08-05: both models accept
output_format (structured outputs beta header) and return exact schema
instances, including a large nested production schema validated with
pydantic. Same two lines applied to the bundled backup map.

* fix(model_map): cover the versioned claude-haiku-4-5-20251001 alias

Exact-match capability lookup of anthropic/claude-haiku-4-5-20251001
resolved the versioned entry, which lacked the flag, so response_format
for that identifier still took the tool-emulation path. Flag it in both
the root and bundled maps, matching its unversioned alias.

* fix(anthropic): bound $defs inlining in output_format with the shared schema-bomb budget

map_response_format_to_anthropic_output_format called unpack_defs with
no max_inlined_bytes, so an authenticated caller could send a compact
schema whose repeated $refs expand without bound before reaching the
provider. Reuse the existing 10MB inlining budget (renamed from
_LEGACY_DEFS_MAX_INLINED_BYTES to DEFS_MAX_INLINED_BYTES now that two
call sites share it); overflow raises ValueError instead of
materialising the expansion.

Regression tests: a compact schema bomb is rejected, a normal $defs
schema still resolves; the bomb test fails when the bound is removed.

* chore: retrigger CI (benchmarks job flaked on a PyPI download timeout)

---------

Co-authored-by: Anmol Jaiswal <anmolg1997@users.noreply.github.com>
2026-08-15 11:51:35 -07:00
Mateo Wang
fb3459d78c
Merge pull request #36788 from BerriAI/litellm_model_map_deprecation_refresh
fix(model_prices): add gemini 3.1 flash tts preview and legacy OpenAI shutdown dates
2026-08-15 11:48:39 -07:00
Mateo Wang
87abb8781e
Merge pull request #36925 from BerriAI/litellm_model_registry_lifecycle_audit_20260814 2026-08-15 09:58:31 -07:00
mateo-berri
32917b07fc fix(model_prices): drop xai/grok-4.6-latest, xAI does not serve that alias
xAI's chat completions API answers grok-4.6-latest with "Model not found"
and its language-models listing shows no alias for grok-4.6
2026-08-15 01:37:23 -07:00
Devin AI
30b14597af fix(model_prices): revert unverified Gemini deprecation dates
Google's Gemini deprecations page lists no shutdown date for the 2.5 GA models and May 14, 2028 for gemini-embedding-001; keep only the DeepSeek V4 max output correction.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-15 08:35:58 +00:00
mateo-berri
16e6aa2e9f fix(model_prices): correct deprecation dates flagged in review
Revert gemini-embedding-001 to its published 2028-05-14 shutdown, move
gpt-4-turbo-preview to the 2026-03-26 shutdown of the gpt-4-0125-preview
snapshot it aliases, and drop the unannounced Gemini 2.5 shutdown dates
2026-08-15 01:33:01 -07:00
Mateo Wang
70d51a196f
Merge pull request #35286 from BerriAI/devin_ai_lit_5013_web_search_cost
fix(cost): track OpenAI/Azure web search tool cost per call
2026-08-14 18:16:59 -07:00
mateo-berri
7e539405ed fix(cost-tracking): price web search on dated search-preview map entries 2026-08-14 17:29:56 -07:00
Ilan Chemla
f99d0a4b38
feat(search): add Nimble as a search provider (#36347)
* feat(search): add Nimble as a search provider

Adds `NimbleSearchConfig` so `search_provider: nimble` works across the SDK,
the proxy /v1/search endpoint, the Search Tools dashboard, and spend tracking.

Nimble's /v2/search already uses the Perplexity unified spec's parameter names,
so the request transform is close to a pass-through. `search_domain_filter`
splits into include_domains/exclude_domains on the spec's `-` prefix, `country`
is upper-cased to the ISO form Nimble documents, and everything else is
forwarded so focus, search_depth, time_range and the rest stay reachable. On the
response side, snippet prefers `content` and falls back to `description`, and a
malformed body raises an attributed error rather than reporting an empty search.

Also tightens `BaseSearchConfig.get_supported_perplexity_optional_params` to
return `frozenset[str]` instead of a bare mutable `set`, which every caller
already treats as read-only.

* fix(search): surface Nimble error bodies instead of empty results

Greptile flagged that a null or absent `results` degraded to a successful empty
search. A search with no hits comes back as `"results": []`, verified against the
live API, so the field is now required and anything else raises the attributed
schema error the other malformed bodies already take.

Also unwraps Nimble's second error envelope. Collection failures return
`{"success", "task_id", "message"}` rather than the `{"detail"}` shape validation
errors use, and only the latter was being read.

Drops comments that restated the adjacent code.

* docs(search): drop the Nimble param list from the transform docstring

It restated the vendor's API reference, which the module docstring already links,
and would go stale the moment Nimble adds a focus mode.
2026-08-14 17:09:58 -07:00
mateo-berri
4193445647 Merge remote-tracking branch 'origin/litellm_internal_staging' into devin_ai_lit_5013_web_search_cost
# Conflicts:
#	litellm/model_prices_and_context_window_backup.json
#	model_prices_and_context_window.json
#	tests/test_litellm/litellm_core_utils/prompt_templates/test_bedrock_converse_strict_tools_opus_47_48.py
2026-08-14 17:05:08 -07:00
Devin AI
b066ed3e31 fix(model_prices): correct Gemini 2.5 shutdown dates and DeepSeek V4 max output tokens
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-14 13:10:27 +00:00
Emerson Gomes
4ea5749642
feat(azure-ai): add Grok 4.3 model metadata (#27932)
* Add Azure AI Grok 4.3 metadata

* Address Azure Grok 4.3 test feedback

* Drop empty tool choice in responses bridge

* style(azure-ai): update Grok metadata tests
2026-08-13 17:25:17 -07:00
Emerson Gomes
b85f557f30
fix: enable xhigh reasoning support for gpt-5.4-mini models (#26909)
* fix: sync gpt-5.4 reasoning capability flags

* fix(models): keep GPT-5.4 service tiers consistent
2026-08-13 17:24:58 -07:00
Emerson Gomes
603fe93758
feat(azure_ai): add Fireworks FW model pricing on Azure AI Foundry (#35613)
* feat(azure_ai): add Fireworks FW model pricing on Azure AI Foundry

* fix(azure_ai): drop incorrect FW-Kimi-K2.6-Code alias

* test(azure-ai): assert FW max token metadata

* feat(azure_ai): add Inkling and Nemotron 3 Ultra pricing
2026-08-13 17:24:38 -07:00
mateo
cbcc3715c6 Merge branch 'litellm_internal_staging' into litellm_add_muse_spark_1_2 2026-08-13 21:54:41 +00:00
mateo
6b8d6406e3 Merge origin/litellm_internal_staging, resolve grok-4.6 conflict
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-13 21:52:03 +00:00
mateo-berri
928dfab65c feat(xai): day-0 pricing for grok-4.6 2026-08-13 12:32:09 -07:00
mateo
c30b043a51 add tpm/rpm to gemini-3.1-flash-tts-preview entry
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-13 17:11:30 +00:00
mateo
fd45fc581e fix(model_prices): refresh deprecation dates, add grok-4.6 and gemini 3.1 flash tts
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-13 16:50:41 +00:00
mateo-berri
d3d259b211 feat(gemini): day-0 pricing for gemini-3.7-flash 2026-08-13 09:49:55 -07:00
mateo-berri
39a5ede2d9 fix(model_prices): bill muse spark web search grounding per query 2026-08-12 19:44:20 -07:00
Mateo Wang
6038dc6891
Merge pull request #36664 from BerriAI/litellm_groq_model_registry_audit
fix(model_prices): sync the Groq registry with Groq's docs
2026-08-12 19:37:39 -07:00
Mateo Wang
6209b8928d
Merge pull request #36698 from BerriAI/litellm_bedrock_gpt56_long_context
fix(bedrock_mantle): 1M context window and long-context pricing for GPT-5.6 Sol/Terra/Luna
2026-08-12 18:49:45 -07:00
mateo-berri
ad36c603b6 feat(model_prices): add meta/muse-spark-1.2 and its contributor tier 2026-08-12 17:51:19 -07:00
devin-ai-integration[bot]
e52ae039f2
feat(model_prices): add NVIDIA Nemotron 3.5 Lightning on OpenRouter and DeepInfra (#36696)
* feat(model_prices): add NVIDIA Nemotron 3.5 Lightning on OpenRouter and DeepInfra

Nemotron 3.5 Lightning shipped 2026-08-11 with public per-token pricing on
OpenRouter and DeepInfra at $0.05/M in and $0.20/M out. Without cost map
entries both ids raise "This model isn't mapped yet" and log at zero spend.

* fix(model_prices): stop asserting an output cap for Nemotron 3.5 Lightning

262144 is the native context window, not the output budget, and neither
OpenRouter nor DeepInfra publishes an output cap. Keeps max_input_tokens at the
native 256K window: 1M needs VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 on a self-hosted
deployment, so it is not what these hosted endpoints serve.

* chore(tests): drop the Nemotron 3.5 Lightning metadata test

Requested on the review thread: the cost map entries stand on their own.

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-12 21:48:02 +00:00
mateo
ef305fe4ab fix(bedrock_mantle): 1M context window and long-context pricing for GPT-5.6 Sol/Terra/Luna
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-12 21:20:10 +00:00
Devin AI
d79b56481d fix(model_prices): sync Groq registry with provider docs
Add missing Groq models and provider-announced deprecation dates

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-12 13:15:14 +00:00
yuneng-jiang
e5e6728c8e
Merge pull request #36597 from BerriAI/litellm_/litellm-test-failures-debug-b4200d
fix(model_prices): advertise native structured output on every Bedrock DeepSeek V3.2 and GLM 5 id
2026-08-11 23:41:46 -07:00
Shivam Rawat
89217c4012
Merge pull request #36496 from BerriAI/litellm_dashscope_latest_models
feat(dashscope): add latest Model Studio models to the cost map
2026-08-11 21:40:50 -07:00
Yuneng Jiang
5669742ea6
fix(model_prices): advertise native structured output on every Bedrock DeepSeek V3.2 and GLM 5 id
`supports_native_structured_output` was set only on the bare `deepseek.v3.2`
and `zai.glm-5` entries, so the cross-region inference profiles and the
region-pinned ids resolved to None. The flag gates the native
`outputConfig.textFormat` branch in BedrockConverseConfig, so callers
addressing the same model as `us.deepseek.v3.2` or
`bedrock/us-west-2/deepseek.v3.2` silently fell back to synthetic tool
injection. `us.` is the form Bedrock steers callers toward, so the most
common way to reach these models was the one missing the capability.

Adds the flag to the 12 affected ids and keeps the packaged backup in sync.

test_get_model_info_bedrock_models already caught the region-pinned ids, but
it filters on `litellm_provider == "bedrock"` and the cross-region profiles
carry `bedrock_converse`, so reverting just `us.deepseek.v3.2` and
`eu.deepseek.v3.2` left it green. The new parity test covers the prefixed
profiles and fails on exactly that mutation.
2026-08-11 18:30:18 -07:00
Mateo Wang
40cd9695ad
Merge pull request #36538 from BerriAI/devin/1786454005-model-registry-deprecations
fix(model_prices): add provider-announced deprecation dates for Bedrock, Mistral, Cohere and Gemini models
2026-08-11 14:45:40 -07:00
Devin AI
6ad343c99c fix(model_prices): drop unannounced shutdown dates for gemini 2.5 GA models
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-11 21:25:21 +00:00
mateo-berri
1502feb25d fix(model_prices): restore 2028-05-14 shutdown date for gemini/gemini-embedding-001 2026-08-11 14:23:13 -07:00
Devin AI
20c0e0dc91 fix(model_prices): add provider-announced deprecation dates for Bedrock, Mistral, Cohere, Gemini models
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-11 13:13:25 +00:00
mateo-berri
7d4488d2e8 refactor(bedrock): read tool search support from the model map
Record supports_tool_search on the Bedrock Claude entries in both cost
map files and have _supports_tool_search_on_bedrock read it first via
the provider-resolved capability lookup, keeping the name patterns as a
fallback for ARNs and ids the map cannot resolve. Threads the flag
through ModelInfoBase and drops a dated remark from the pattern list
2026-08-11 10:06:04 +00:00
Devin AI
0e89bf60fe feat(dashscope): add latest Model Studio models to the cost map
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-11 02:15:49 +00:00
Mateo Wang
9de3315dad
Merge pull request #36403 from BerriAI/litellm_model_registry_deprecation_audit
fix(model_prices): refresh deprecation dates, correct xAI pricing and add missing provider models
2026-08-10 11:26:41 -07:00
mateo-berri
9ec99cf9ce fix(model_prices): gpt-5-pro max output is 272k per OpenAI docs 2026-08-10 10:51:52 -07:00
Alex Shtof
280c95ccb0
fix(bedrock): enable native structured output for GLM 5 and DeepSeek V3.2 (#35669)
* fix(bedrock): enable native structured output for GLM 5 and DeepSeek V3.2

* ci: empty commit

---------

Co-authored-by: Alexander Shtoff <alexander.shtoff@tii.ae>
2026-08-10 10:18:13 -07:00
mateo
69def0545d refactor(model_prices): keep fallback_generalizations last in the registry
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-10 16:01:41 +00:00
Devin AI
cb0c96bf46 feat(model_prices): add missing OpenAI transcription, Anthropic Mythos, Gemini robotics streaming and Mistral models
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-10 14:14:37 +00:00
Devin AI
76586a8268 fix(model_prices): drop unverified deprecation dates, correct gemini embedding and anthropic opus 4.1
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-10 13:21:33 +00:00
Devin AI
9456564b3c fix(model_prices): refresh deprecation dates and xAI pricing from provider docs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-10 13:11:55 +00:00
Mateo Wang
b45b4b7300
Merge pull request #35923 from BerriAI/litellm_dated_variant_tier_pricing_sync
fix(pricing): sync flex/priority tier keys to dated OpenAI snapshot variants
2026-08-05 21:09:37 -07:00
Akash Naickar
e6e18d406a
fix(model-prices): correct replicate model key typo (#34800) 2026-08-05 16:37:44 -07:00
mateo-berri
629c228b40 fix(pricing): sync flex/priority tier keys to dated OpenAI snapshot variants
Dated snapshots like o4-mini-2025-04-16 were missing the flex and priority cost keys their base alias carries, so service-tier requests against pinned snapshots were billed at standard rates. Sync the tier keys wherever the snapshot's anchor prices match the base alias, and add a drift regression test.
2026-08-04 23:56:52 -07:00
Mateo Wang
e926097fec
Merge pull request #35481 from mubashir1osmani/litellm_azure_gpt56_price_cut
fix(pricing): apply OpenAI's gpt-5.6 terra/luna cut to Azure cost map
2026-08-04 17:02:12 -07:00
Mateo Wang
8445cf158b
Merge pull request #35555 from BerriAI/devin/1785632264-gemini-robotics-er-2
feat(gemini): add gemini-robotics-er-2-preview and gemini-robotics-er-1.6-preview
2026-08-04 14:08:59 -07:00
mateo-berri
050a8bdd09 fix(gemini): mark gemini-robotics-er-1.6-preview as supporting prompt caching 2026-08-04 13:34:01 -07:00