Commit graph

971 commits

Author SHA1 Message Date
Ryan Crabbe
7414c09277 perf: skip throwaway Usage() construction in ModelResponse.__init__
Avoid constructing a default Usage() object that gets immediately
overwritten by convert_to_model_response_object. Set usage=None
instead; the real Usage is assigned via setattr later.

Also fix Bedrock Qwen2/Qwen3 transform_response to assign a new
Usage object instead of mutating a potentially missing one.
2026-02-19 13:41:15 -08:00
Sameer Kankute
8bcca905a7
Merge pull request #21539 from BerriAI/litellm_fix_azure_store_param
Fix: add stop param as supported for openai and azure
2026-02-19 19:12:43 +05:30
Sameer Kankute
fc7fa73b6f Fix usage in xai 2026-02-19 18:48:30 +05:30
Sameer Kankute
44a68cf1c6 Fix: add stop param as supported for openai and azure 2026-02-19 11:26:38 +05:30
Sameer Kankute
eb8b991260
Merge branch 'main' into litellm_oss_staging_02_17_2026 2026-02-18 17:26:33 +05:30
Sameer Kankute
2517c069ca
Merge pull request #21387 from BerriAI/litellm_vllm_e2e_testing
move e2e to llm translation
2026-02-18 07:44:53 +05:30
Sameer Kankute
126cf36dc4 move e2e to llm translation 2026-02-17 22:33:13 +05:30
Sameer Kankute
32263deb02 Add tests for openai evals 2026-02-17 19:30:58 +05:30
Nick Amabile
4978df8ebd
fix: add store to OPENAI_CHAT_COMPLETION_PARAMS (#21195)
The OpenAI `store` parameter (used for storing completions for
distillation/evals) was missing from `OPENAI_CHAT_COMPLETION_PARAMS`.

This caused it to be unrecognized by `get_standard_openai_params()` and
the `litellm_proxy` provider config. It also meant that code paths using
this list (rather than `DEFAULT_CHAT_COMPLETION_PARAM_VALUES`) would
treat `store` as a provider-specific parameter and forward it to
non-OpenAI providers like Anthropic, resulting in:

    "store: Extra inputs are not permitted"

Fixes #19700
2026-02-16 20:28:34 -08:00
sahukanishka
d184b3cae7
fix: preserve provider_specific_fields from proxy responses (#21153) (#21220)
Co-authored-by: kanishka sahu <kanishkasahu@mercor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 20:17:58 -08:00
Ishaan Jaffer
bab2bcad8c test_openai_codex_stream 2026-02-14 12:28:18 -08:00
Ishaan Jaffer
582fbf9040 test_anthropic_custom_headers 2026-02-14 12:22:14 -08:00
Ishaan Jaffer
8d9ae1d2b4 codex test fixes 2026-02-14 09:56:45 -08:00
Ryan Crabbe
9c87484b07 fix: preserve auto-generated id when provider returns falsy id
Address review comment: fall back to model_response_object.id instead
of overwriting with None/empty string. Add parametrized test for the
edge case.
2026-02-13 10:13:45 -08:00
yuneng-jiang
e49d094606 fix openai tests 2026-02-12 17:53:47 -08:00
Ryan Crabbe
2065e5b88b perf: cache model_fields.keys() as frozensets in convert_to_model_response_object (15% faster)
Replace per-call .model_fields.keys() allocations and linear-scan membership
checks with module-level frozenset constants and dict.keys() set difference.
Defer locals() from hot path to except block. 617µs → 524µs/call.
2026-02-12 14:25:09 -08:00
Ishaan Jaff
2b00466d3a
fix: support prompt_cache_key for OpenAI and Azure chat completions (#20989)
* fix:fix: prompt_cache_key OAI + Azure OpenAI

* test_prompt_cache_key_supported

* test_azure_openai_with_prompt_cache_key

* fix: remove unnecessary async from test_azure_openai_with_prompt_cache_key

Addresses Greptile feedback: litellm.completion() is synchronous, so
async def is unnecessary and would silently pass without running.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove unused filter_and_transform_beta_headers imports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test_azure_openai_with_prompt_cache_key

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 12:25:29 -08:00
Ishaan Jaff
f8619e2000
[Stability] Investigate + fix issue where model cost map became poorly formatted (#20895)
* init: GetModelCostMap

* fix

* docs

* docs fix

* docs fixes

* docs fix

* test model cost map resilience

* MODEL_COST_MAP_MIN_MODEL_COUNT

* validate_model_cost_map

* test_should_have_minimum_models_in_backup

* docs fix

* docs fix

* fix

* dos fix

* docs fix

* docs fix

* docs fix

* docs fix

* validate_model_cost_map

* fix

* cleanup
2026-02-10 15:17:01 -08:00
Sameer Kankute
453d1bd5e1
Merge branch 'main' into litellm_oss_staging_02_04_2026 2026-02-05 12:19:03 +05:30
Sameer Kankute
075b1b7921
Merge pull request #20341 from natimofeev/bugfix/remove-user-messages-merging
bugfix: Disable merging of consecutive user messages for GigaChat provider
2026-02-05 12:18:09 +05:30
Sameer Kankute
8a3b253e62
Merge pull request #20390 from BerriAI/litellm_fix_empty_message
Fix: empty assistant message for converse API
2026-02-04 18:05:37 +05:30
Sameer Kankute
1a5f2a566f Fix: test_bedrock_no_default_message 2026-02-04 17:52:28 +05:30
Ishaan Jaff
da4cf4942f
[Feat] Add xAI /realtime API Support - works with LiveKitSDK (#20381)
* init: _realtime_health_check + routing

* refactor: OpenAIRealtime

* refactor: XAI_API_BASE

* feat: XAIRealtime

* init feat: XAIRealtime

* OpenAIRealtime

* TestXAIRealtime

* test fixes

* test OAI

* TEST xAI, OAI

* clean realtime jobs

* refactor

* test XAI

* docs xAI

* fix xAI

* fix lint errors

* test_async_realtime_url_contains_model

* test fix

* document test changes

* _realtime_health_check

* docs xai realtime

* fix handlers

* add additional_headers

* fix
2026-02-03 19:58:28 -08:00
Ishaan Jaff
9ed11c5cdf
[Feat] Allow calling A2A agents through LiteLLM /chat/completions API (#20358)
* init A2AConfig

* add transform files

* feat: A2A

* feat A2AConfig

* fix get_secret_str

* init: A2AConfig

* init A2AConfig common utils

* A2AConfig

* test_a2a_completion_async_non_streaming

* fix

* Update litellm/main.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* add multi part conversation support

* extract_text_from_a2a_message

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-03 12:52:33 -08:00
Nikita Timofeev
ffbc8d20c4 bugfix: Remove user messages merging
There is no reason to merge user messages.
2026-02-03 12:58:28 +00:00
Ishaan Jaff
5cfcf67d7c
[Feat] /chat/completions - allow using OpenAI style tools for web_search with VertexAI/gemini models (#20280)
* test_gemini_openai_web_search_tool_to_google_search

* feat: Handle OpenAI style web search tools
2026-02-02 19:36:36 -08:00
Sameer Kankute
01cdc272ec Fix: test_bedrock_optional_params_embeddings_dimension 2026-02-02 17:47:20 +05:30
Sameer Kankute
88cb101d88 Add Anthropic caching and context tests 2026-02-02 13:25:47 +05:30
Ishaan Jaffer
8b575f4656 test_bedrock_nova_grounding_web_search_options_non_streaming 2026-01-31 11:23:48 -08:00
Ishaan Jaff
5345a763c2
[Feat] v2 - Logs view with side panel and improved UX (#20091)
* init: azure_ai/azure-model-router

* show additional_costs in CostBreakdown

* UI show cost breakdown fields

* feat: dedicated cost calc for azure ai

* test_azure_ai_model_router

* docs azure model router

* test azure model router

* fix transfrom

* Add transform file

* fix:feat: route to config

* v0 - looks decen view

* refactored code

* fix ui

* fixes ui

* complete v2 viewer

* address feedback

* address feedback
2026-01-30 18:34:13 -08:00
Sameer Kankute
11c2160379 Add web search tests 2026-01-30 14:56:11 +05:30
Sameer Kankute
42a0d576f3
Merge pull request #19910 from BerriAI/main
merge 01 27
2026-01-28 08:30:47 +05:30
Sameer Kankute
29fc4f8f61
Merge pull request #19850 from BerriAI/litellm_grok_reasonnig_support
Add grok reasoning content
2026-01-27 17:46:07 +05:30
Sameer Kankute
c834d7d1fe
Merge branch 'main' into litellm_oss_staging_01_27_2026 2026-01-27 17:11:15 +05:30
Sameer Kankute
9a2750f8ec
Merge pull request #19617 from BerriAI/litellm_oss_staging_01_23_2026
Litellm oss staging 01 23 2026
2026-01-27 16:55:32 +05:30
Sameer Kankute
e695cb5367 Add grok reasoning content 2026-01-27 16:34:57 +05:30
Sameer Kankute
13313ac2be
Merge pull request #19232 from natimofeev/fix-gigachat-function-output-format
Fix: ensure function content is valid JSON for GigaChat
2026-01-27 13:02:38 +05:30
Ishaan Jaffer
6710abd1fa test_web_search 2026-01-24 11:06:23 -08:00
Nikita Timofeev
e63537c6c1 Fix: ensure function content is valid JSON for GigaChat 2026-01-23 15:27:46 +00:00
Sameer Kankute
9894721285
Merge pull request #19548 from BerriAI/litellm_staging_01_22_2026
Litellm staging 01 22 2026
2026-01-23 20:03:11 +05:30
Sameer Kankute
a4bf14f6e7 Fix: test_nova_invoke_streaming_chunk_parsing 2026-01-23 19:49:42 +05:30
Sameer Kankute
acf5ad1155 Add tool choice mapping for giga chat 2026-01-23 16:29:19 +05:30
jquinter
0622ce3f2c
Fix/nova grounding (#19598)
* added support for nova grounding for amazon nova model

* added citations support

* added integration tests

* removing test file

* refactor: Use web_search_options for Nova grounding instead of system_tool

---------

Co-authored-by: Juhie <juhiechandra@gmail.com>
Co-authored-by: Juhie <75068056+juhiechandra@users.noreply.github.com>
2026-01-22 19:34:29 -08:00
Sameer Kankute
ddaf127b4a
Merge pull request #19562 from BerriAI/litellm_stop_setting
feat: Limit stop sequence as per openai spec
2026-01-22 19:44:56 +05:30
Sameer Kankute
110e2c69d4 Fix : test_anthropic_via_responses_api 2026-01-22 18:28:56 +05:30
Sameer Kankute
4d20c8fbc0 feat: Limit stop sequence as per openai spec 2026-01-22 17:52:13 +05:30
Sameer Kankute
9e1275b76c
Merge branch 'main' into litellm_staging_01_19_2026 2026-01-20 19:19:36 +05:30
이명현
0dfc3fad5a
Fix: bedrock invoke claude 4 optional params #19318 (#19381) 2026-01-19 19:14:58 -08:00
Jón Levy
5db0e3289a
fix(agentcore): simplify agentcore streaming (#17141)
* fix(agentcore): simplify agentcore streaming

* fix(agentcore): move CustomStreamWrapper import to module level

The deferred imports inside streaming methods caused initialization delays
during health check requests, leading to timeouts in ECS deployments.

- Move CustomStreamWrapper import to module-level (line 19)
- Remove deferred imports from get_sync_custom_stream_wrapper (line 588)
- Remove deferred import from get_async_custom_stream_wrapper (line 747)
- Remove from TYPE_CHECKING block to use actual import

This ensures the import happens at module load time rather than during
first request processing, preventing health check endpoint blocking.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* test(agentcore): ensure sync response

* chore: upgrade boto3 to 1.40.76 in pyproject.toml

* chore: added taplo.toml

* fix(types): correct annotation type hint for MyPy compatibility

Update _convert_annotations_to_chat_format return type from
Dict[str, Any] to ChatCompletionAnnotation TypedDict to match
the Message class's expected type signature.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Benedikt Óskarsson <bensi94@hotmail.com>
2026-01-19 05:20:24 -08:00
Ishaan Jaffer
60dd04ac95 test_aiohttp_openai 2026-01-17 17:05:00 -08:00