Commit graph

1980 commits

Author SHA1 Message Date
Ishaan Jaffer
7c76202b33 add vercel_ai_gateway/glm-4.6 2025-10-17 18:24:26 -07:00
Copilot
40076516dc
Add glm-4.6 model to pricing configuration (#15679)
* Initial plan

* Add glm-4.6 model to pricing configuration

Co-authored-by: ishaan-jaff <29436595+ishaan-jaff@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ishaan-jaff <29436595+ishaan-jaff@users.noreply.github.com>
2025-10-17 18:19:34 -07:00
Ishaan Jaff
3852fc96c1
[Oct Staging Branch] (#15460)
* Implement fix for thinking_blocks and converse API calls

This fixes Claude's models via the Converse API, which should also fix
Claude Code.

* Add thinking literal

* Fix mypy issues

* Type fix for redacted thinking

* Add voyage model integration in sagemaker

* Add config file logic

* Use already exiting voyage transformation

* refactor code as per comments

* fix merge error

* refactor code as per comments

* refactor code as per comments

* UI new build

* [Fix] router - regression when adding/removing models  (#15451)

* fix(router): update model_name_to_deployment_indices on deployment removal

When a deployment is deleted, the model_name_to_deployment_indices map
was not being updated, causing stale index references. This could lead
to incorrect routing behavior when deployments with the same model_name
were dynamically removed.

Changes:
- Update _update_deployment_indices_after_removal to maintain
  model_name_to_deployment_indices mapping
- Remove deleted indices and decrement indices greater than removed index
- Clean up empty entries when no deployments remain for a model name
- Update test to verify proper index shifting and cleanup behavior

* fix(router): remove redundant index building during initialization

Remove duplicate index building operations that were causing unnecessary
work during router initialization:

1. Removed redundant `_build_model_id_to_deployment_index_map` call in
   __init__ - `set_model_list` already builds all indices from scratch

2. Removed redundant `_build_model_name_index` call at end of
   `set_model_list` - the index is already built incrementally via
   `_create_deployment` -> `_add_model_to_list_and_index_map`

Both indices (model_id_to_deployment_index_map and
model_name_to_deployment_indices) are properly maintained as lookup
indexes through existing helper methods. This change eliminates O(N)
duplicate work during initialization without any behavioral changes.

The indices continue to be correctly synchronized with model_list on
all operations (add/remove/upsert).

* fix(prometheus): Fix Prometheus metric collection in a multi-workers environment (#14929)

Co-authored-by: sotazhang <sotazhang@tencent.com>

* Add tiered pricing and cost calculation for xai

* Use generic cost calculator

* Resolve conflicts in generated HTML files

* Remove penalty params as supported params for gemini preview model (#15503)

* fix conversion of thinking block

* add application level encryption in SQS (#15512)

* docs: fix doc

* docs(index.md): bump rc

* [Fix] GEMINI - CLI -  add google_routes to llm_api_routes (#15500)

* fix: add google_routes to llm_api_routes

* test: test_virtual_key_llm_api_routes_allows_google_routes

* build: bump version

* bump: version 1.78.0 → 1.78.1

* add application level encryption in SQS

* add application level encryption in SQS

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>

* [Feat] Bedrock Knowledgebase - return search_response when using /chat/completions API with LiteLLM (#15509)

* docs: fix doc

* docs(index.md): bump rc

* [Fix] GEMINI - CLI -  add google_routes to llm_api_routes (#15500)

* fix: add google_routes to llm_api_routes

* test: test_virtual_key_llm_api_routes_allows_google_routes

* add AnthropicCitation

* fix async_post_call_success_deployment_hook

* fix add vector_store_custom_logger to global callbacks

* test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call

* async_post_call_success_deployment_hook

* add async_post_call_streaming_deployment_hook

* async def test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call_streaming(setup_vector_store_registry):

* fix _call_post_streaming_deployment_hook

* fix async_post_call_streaming_deployment_hook

* test update

* docs: Accessing Search Results

* docs KB

* fix chatUI

* fix searchResults

* fix onSearchResults

* fix kb

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>

* [Feat] Add dynamic rate limits on LiteLLM Gateway  (#15518)

* docs: fix doc

* docs(index.md): bump rc

* [Fix] GEMINI - CLI -  add google_routes to llm_api_routes (#15500)

* fix: add google_routes to llm_api_routes

* test: test_virtual_key_llm_api_routes_allows_google_routes

* build: bump version

* bump: version 1.78.0 → 1.78.1

* fix: KeyRequestBase

* fix rpm_limit_type

* fix dynamic rate limits

* fix use dynamic limits here

* fix _should_enforce_rate_limit

* fix _should_enforce_rate_limit

* fix counter

* test_dynamic_rate_limiting_v3

* use _create_rate_limit_descriptors

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>

* Add google rerank endpoint

* Add docs

* fix mypy error

* fix mypy and lint errors

* Add haiku 4.5 integration

* Add haiku 4.5 integration for other regions as well

* Handle citation field correctly

* Fix filtering headers for signature calcs

* Add haiku 4.5 integration (#15650)

---------

Co-authored-by: Leslie Cheng <leslie.cheng5@gmail.com>
Co-authored-by: Sameer Kankute <sameer@berri.ai>
Co-authored-by: Alexsander Hamir <alexsanderhamirgomesbaptista@gmail.com>
Co-authored-by: Lucas <10226902+LoadingZhang@users.noreply.github.com>
Co-authored-by: sotazhang <sotazhang@tencent.com>
Co-authored-by: Deepanshu Lulla <deepanshu.lulla@gmail.com>
Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-10-17 17:52:25 -07:00
Ishaan Jaff
a8be3ae412
[Feat] Add Cost Tracking for /ocr endpoints (#15678)
* mistral/mistral-ocr-latest

* fix: add _hidden_params to OCRResponses

* test: hidden params exists

* feat: add mistral/mistral-ocr-2505-completion

* fix test

* add ModelInfoBase fields

* fix get OCR cost

* check response cost from OCR

* add handling for OCR costs

* add mistral-document-ai-2505

* docs OCR

* ruff check fix
2025-10-17 15:54:10 -07:00
Ishaan Jaff
845c43a24e
Merge pull request #15642 from jlan-nl/litellm-gemini-flash-2.5-image-web-search
Fix: Gemini 2.5 Flash Image should not have supports_web_search=true
2025-10-17 13:19:08 -07:00
Ishaan Jaffer
3bc8f76d12 fixes for various models with incorrect pricing 2025-10-17 11:51:22 -07:00
Ishaan Jaffer
8b179f0a89 pricing: fix watsonx/openai/gpt-oss-120b 2025-10-17 11:40:34 -07:00
IQHL (Hans Jacob Landelius)
d49c5dfd18 supports_web_search=false for gemini 2.5 flash image 2025-10-17 10:58:23 +02:00
Ishaan Jaff
f98f299854
Merge pull request #15617 from BerriAI/litellm_october_alexsander_stanging
[OCT] Alexsander PERF improvements
2025-10-16 15:10:02 -07:00
Krish Dholakia
69e4a9cc3c
Merge pull request #15495 from Classic298/patch-2
correct claude opus
2025-10-16 12:06:10 -07:00
Krish Dholakia
71b9becfdd
Merge pull request #15535 from konekohana/openrouter-anthropic-caching
Prompt caching for anthropic models with openrouter
2025-10-16 09:30:01 -07:00
Krish Dholakia
67237e56fe
Merge pull request #15554 from eddierichter-amd/lemonade-model-update
Adding new models to the lemonade provider
2025-10-16 09:28:40 -07:00
Krish Dholakia
455dc8a31c
Merge pull request #15569 from FelipeRodriguesGare/fix/gpt-5-codex-params-off
adding support parameters to model_prices json
2025-10-16 07:33:55 -07:00
shinharaguchi
359a095319 Add jp.anthropic.claude-haiku-4-5-20251001 price 2025-10-16 21:52:44 +09:00
Andreas
f1fbae8409
feat(pricing): Add Gemini 2.5 Flash Image (Nano Banana) in GA (#15557)
* feat(pricing): Add Gemini 2.5 Flash Image (Nano Banana) in GA

* change mode to image_generation

---------

Co-authored-by: Andreas Feldl <andreas.feldl@netlight.com>
2025-10-15 17:50:15 -07:00
Ishaan Jaff
354e62bde4
[Feat] Add anthropic.claude-haiku-4-5-20251001-v1:0 on Bedrock, VertexAI (#15581)
* add claude 4-5

* add anthropic.claude-haiku-4-5-20251001-v1:0
2025-10-15 17:41:09 -07:00
Mubashir Osmani
ad7f4411a3
added claude-haiku-4.5 (#15579) 2025-10-15 17:28:49 -07:00
Felipe Gare
a87a3d0f95 adding support parameters to model_prices json 2025-10-15 16:06:44 -03:00
Eddie Richter
900a57f5b1 Adding new models to the lemonade provider 2025-10-14 16:56:36 -06:00
huangyafei
9a980f36d4 Add anthropic/claude-sonnet-4.5 to OpenRouter cost map 2025-10-14 13:57:39 -07:00
Hana Volků
55e44e1b1d
Prompt caching for anthropic models with openrouter 2025-10-14 14:51:55 +02:00
Classic298
732063074d
correct claude opus 2025-10-13 14:20:24 +02:00
Krish Dholakia
176c45d51b
Merge pull request #15472 from huangyafei/update_price
Add anthropic/claude-sonnet-4.5 to OpenRouter cost map
2025-10-12 22:07:04 -07:00
huangyafei
409299de84 Add anthropic/claude-sonnet-4.5 to OpenRouter cost map 2025-10-13 10:46:37 +08:00
Hampus Näsström
e650f39821
Reduce claude-4-sonnet max_output_tokens to 64k (#15409)
Claude 4 Sonnet doesn't support more than 64k output tokens: https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/claude/sonnet-4
2025-10-11 17:51:27 -07:00
jlan-nl
328505dcda
Fix prices (#15374)
Co-authored-by: IQHL (Hans Jacob Landelius) <iqhl@novnordisk.com>
2025-10-11 16:53:55 -07:00
Krish Dholakia
07ba5c1ea9
Merge branch 'main' into litellm_dev_10_10_2025_p3 2025-10-11 12:58:53 -07:00
Ishaan Jaffer
732618f55f test_together_ai_embedding 2025-10-11 09:33:19 -07:00
Krrish Dholakia
fed1ba2891 feat(openai/): convert chat completion tool calls to responses api
enables gpt-5-codex to work on claude code

 Closes LIT-1088
2025-10-10 19:41:11 -07:00
Brandon Cook
a0e81a7f1c
feat: add Bedrock AU Cross-Region Inference (#15402) 2025-10-10 14:18:51 -07:00
Sameer Kankute
513925fd12
Add OCI Cohere support with tool calling and streaming capabilities (#15365)
* Add cohere models for OCI integration

* fix mypy error
2025-10-10 11:20:18 -07:00
Krish Dholakia
9c50d0f057
Merge pull request #15383 from zainhas/patch-1
Add new together models
2025-10-09 22:20:45 -07:00
Emerson Gomes
22df8de01f
Add new Azure AI models with pricing details (#15387)
Adding missing Azure AI models:

* Phi-4-reasoning
* Phi-4-mini-reasoning
* MAI-DS-R1
2025-10-09 15:25:22 -07:00
Zain Hasan
553c0ffb1e
Add new together models 2025-10-09 10:59:51 -07:00
Sandesh Ghanta
e4317030bf
Add gpt-5-pro-2025-10-06 to model costs 2025-10-08 16:44:40 -07:00
Krish Dholakia
3f4d2c6ada
Add Cohere Embed v4 support for AWS Bedrock
Add Cohere Embed v4 support for AWS Bedrock
2025-10-07 19:10:22 -07:00
Ishaan Jaffer
7b82473bfb fix gpt-image-1-mini 2025-10-07 17:56:51 -07:00
Tim Elfrink
d71d801e4d Add Cohere Embed v4 support for AWS Bedrock
- Add cohere.embed-v4:0 to model pricing configs
- Update bedrock_embedding_models constant
- Update documentation with v4 model support

Fixes #15272
2025-10-07 22:08:12 +02:00
Sameer Kankute
51971f4750
Add gpt-realtime-mini support (#15283) 2025-10-07 11:27:04 -07:00
Krish Dholakia
12cbac74b1
Merge pull request #15210 from uc4w6c/feat/add_global_cross_region
feat: add Global Cross-Region Inference
2025-10-06 20:21:18 -07:00
Ishaan Jaff
d1d411ca2c
feat: add litellm_add_gpt_image1_mini_models (#15259) 2025-10-06 19:58:55 -07:00
Teddy Amkie
1ad4ef267d
Add GPT-5 Pro model configuration and documentation (#15258)
- Added gpt-5-pro entry to model_prices_and_context_window.json with complete specifications
- Mode: responses (Responses API only)
- Pricing: $15.00 input / $120.00 output (Standard), $7.50 input / $60.00 output (Batch)
- Context: 400,000 input tokens, 272,000 output tokens
- Endpoints: /v1/batch, /v1/responses only
- Features: Web Search, Function Calling, Vision, PDF Input, Prompt Caching, Reasoning
- No streaming support, no Code Interpreter, no Computer Use

- Added gpt-5-pro to supported models list in docs/my-website/src/pages/completion/supported.md
- Added gpt-5-pro to OpenAI provider documentation in docs/my-website/docs/providers/openai.md
- Added comprehensive GPT-5 Pro Special Notes section with usage examples and limitations
2025-10-06 19:43:40 -07:00
Gal Bloch
27c64c90dc
feat: Add 25 new Watson X foundation models (#15219)
Added comprehensive Watson X model support including:
- IBM Granite models (granite-4-h-small, granite-3-3-8b-instruct, granite-guardian variants, granite-vision, granite-ttm time series models)
- Meta Llama models (llama-3-2-1b/3b/11b-vision/90b-vision, llama-3-3-70b, llama-4-maverick-17b, llama-guard-3-11b-vision)
- Mistral models (mistral-medium-2505, mistral-small-2503, pixtral-12b-2409)
- Additional models (BigScience mt0-xxl-13b, Google flan-t5-xl-3b, OpenAI gpt-oss-120b, SDAIA allam-1-13b-instruct, Core42 jais-13b-chat)

All models include proper pricing, token limits, and capability flags (function calling, vision support, etc.) based on IBM Watson X documentation.
2025-10-06 12:33:05 -07:00
Yuta Saito
ba0dcfc001 feat: add Global Cross-Region Sonnet 4 2025-10-05 09:25:39 +09:00
Yuta Saito
9a1c0145da feat: add Global Cross-Region Inference 2025-10-05 09:20:17 +09:00
Ishaan Jaff
cb385e080f
Fix "azure_ai/grok-4-fast-reasoning" entry in "model_prices_and_context_window.json" (#15204)
* fix: azure_ai/grok-4-fast-non-reasoning

* fix pricing
2025-10-04 14:50:44 -07:00
Ishaan Jaffer
2dc11316f2 fix failing deepseek-ai/DeepSeek-V3.1 2025-10-04 11:50:30 -07:00
Krish Dholakia
c83a3ac9b4
Merge pull request #14939 from Toy-97/patch-1
update: DeepInfra model data refresh [2025-09-26]
2025-10-03 21:48:31 -07:00
YutaSaito
81a8766b84
feat: add JP Cross-Region Inference (#15188) 2025-10-03 21:20:04 -07:00
Ishaan Jaff
4415b195d1
Add "eu.anthropic.claude-sonnet-4-5-20250929-v1:0" in "model_prices_and_context_window.json" (#15181)
* feat: add eu.anthropic.claude-sonnet-4-5-20250929-v1:0

* fix: nvidia_nim_models
2025-10-03 15:52:18 -07:00