Commit graph

1738 commits

Author SHA1 Message Date
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
mateo-berri
a870d45a8a Merge branch 'litellm_internal_staging' of https://github.com/BerriAI/litellm into litellm_lit_5785_vertex_regional_pricing
# Conflicts:
#	litellm/model_prices_and_context_window_backup.json
#	model_prices_and_context_window.json
2026-08-19 15:31:42 -07:00
mateo-berri
b39a339b7d fix(vertex_ai): apply regional endpoint uplift to cost tracking 2026-08-19 15:21:06 -07:00
Mateo Wang
d58b1c8558
Merge pull request #37516 from BerriAI/litellm_gemini_prompt_cache_min_tokens_4096
fix(model_prices): set prompt_cache_min_tokens=4096 for Gemini 3.5/3.6/3.7 Flash and 3.1 Pro Preview
2026-08-19 15:11:00 -07:00
mateo-berri
45884b9bd3 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_gemini_prompt_cache_min_tokens_4096
# Conflicts:
#	litellm/model_prices_and_context_window_backup.json
#	model_prices_and_context_window.json
2026-08-19 14:55:44 -07:00
Mateo Wang
b8d5139701
Merge pull request #37473 from BerriAI/litellm_model_registry_audit_20260819
fix(model_prices): correct gemini 3.1 flash image and deepseek v4 pricing, add openai deprecation dates
2026-08-19 14:50:49 -07:00
Mateo Wang
f4b46c81da
Merge pull request #37283 from BerriAI/devin/1787058723-registry-deprecation-dates
fix(model_prices): add provider-announced deprecation_date to 205 registry entries
2026-08-19 14:43:45 -07:00
mateo-berri
77716eeaed fix(model_prices): set prompt_cache_min_tokens=4096 for Gemini 3.5/3.6/3.7 Flash and 3.1 Pro Preview 2026-08-19 14:13:00 -07:00
Devin AI
5a0a8ffafe fix(model_prices): correct gemini and deepseek pricing and add deprecation dates
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-19 13:17:15 +00:00
mateo-berri
24fc3f721c fix(databricks): match the claude 4.6 context limits to Anthropic's published values 2026-08-18 17:55:45 -07:00
mateo-berri
4285ffd82b fix(databricks): drop the minimal reasoning effort flag from the claude-opus-4-6 entry 2026-08-18 17:09:17 -07:00
Mateo Wang
f570af9fcf
Merge branch 'litellm_internal_staging' into add-databricks-model-pricing 2026-08-18 16:55:02 -07:00
yassin
cf2e50077c Merge branch 'litellm_internal_staging' into devin_ai_agentcore_search
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-18 21:53:22 +00:00
mateo-berri
be594f5984 feat(guardrails): count bedrock guardrail cost against spend and budgets
Price ApplyGuardrail usage units recorded by PR #37225 with a new
bedrock/guardrails entry in the model cost map (regional override via
bedrock/{region}/guardrails), add the per-request guardrail_cost to the
standard logging payload's response_cost and CostBreakdown, surface it in
the x-litellm-response-cost header, and bill blocked requests through the
failure hook so key and team budgets see what AWS bills
2026-08-18 14:16:07 -07:00
Devin AI
3d523d6d81 fix(model_prices): add provider-announced deprecation_date to 205 registry entries
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-08-18 13:14:42 +00:00
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