Commit Graph

678 Commits

Author SHA1 Message Date
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
Ishaan Jaffer db7de13818 test_deepseek_mock_completion 2026-01-17 16:36:42 -08:00
Ishaan Jaff d2a40c8456 [Fix] - Reliability fix OOMs with image url handling (#19257)
* fix MAX_IMAGE_URL_DOWNLOAD_SIZE_MB

* test_image_exceeds_size_limit_with_content_length

* fix: _process_image_response

* add constants 50MB

* fix convert_to_anthropic_image_obj image handling

* test_gemini_image_size_limit_exceeded

* MAX_IMAGE_URL_DOWNLOAD_SIZE_MB fix

* MAX_IMAGE_URL_DOWNLOAD_SIZE_MB

* test_image_size_limit_disabled

* async_convert_url_to_base64

* docs fix

* code QA check

* fix Exception
2026-01-16 16:41:44 -08:00
Yuta Saito 34e8e97222 fix: ci test
gemini 2.5 depricated
2026-01-17 09:17:31 +09:00
YutaSaito ca2019776e Revert "Fix: malformed tool call transformation in bedrock" 2026-01-17 06:04:24 +09:00
Sameer Kankute bf99cea82f Fix malformed tool call tranform 2026-01-16 14:33:25 +05:30
John Greek 07b1f84ec6 fix(bedrock): strip throughput tier suffixes from model names (#19147)
Co-authored-by: Greek, John <jgreek@users.noreply.github.com>
2026-01-15 18:43:10 -08:00
Sameer Kankute e9a2999f61 Fix: handling of model name in query param 2026-01-15 15:06:37 +05:30
Sameer Kankute 7dbf09cb12 Fix all 130126 tests 2026-01-14 17:47:03 +05:30
Sameer Kankute ff467c797d Merge pull request #19079 from BerriAI/main
merge main
2026-01-14 16:44:31 +05:30
Ishaan Jaff 1b00576711 [Feat] New Model - Azure Model Router on LiteLLM AI Gateway (#19054)
* fix - azure model router integration

* fix:_check_provider_match

* fix:_get_response_model

* tests azure model router

* test_azure_ai_model_router_streaming_model_in_chunk

* fix LlmProviders.AZURE.value

* test_azure_ai_model_router_streaming_cost_with_stream_options

* def test_get_model_from_chunks_azure_model_router():

* _get_model_from_chunks

* docs azure model router

* azure model router
2026-01-13 18:31:43 -08:00
Mateusz Szewczyk 72dc65fbb4 chore: allow passing scope id for watsonx inferencing (#18959)
* chore: allow inference with space

* make lint and make format
2026-01-14 03:47:20 +05:30
Sameer Kankute ebf61998e0 Merge pull request #18954 from BerriAI/litellm_replicate_support
[Feat] Add all chat replicate models support
2026-01-12 18:15:46 +05:30
Harshit Jain 5ce3a56ac3 add better err handling for antropic (#18955) 2026-01-12 17:03:03 +05:30
Sameer Kankute 3d38ec4756 Add all replicate models in model cost map 2026-01-12 15:19:49 +05:30
Sameer Kankute c0b05fc47a Merge pull request #18250 from sjmatta/claude/fix-issue-17910-QBgDq
[Fix] Nova model detection for Bedrock provider (#17910)
2026-01-09 17:30:51 +05:30
Sameer Kankute be28fcd463 Merge pull request #18858 from raghav-stripe/raghav-add-bedrock-tokencounter
feat: add Bedrock as a backend API for token counting
2026-01-09 17:10:52 +05:30
Sameer Kankute 844c766c65 Merge pull request #18763 from BerriAI/litellm_staging_01_07_2026
Staging - 01/07/2026
2026-01-09 17:01:58 +05:30
Raghav Jhavar ba78194ff1 add support for bedrock in token counting api 2026-01-09 17:08:07 +07:00
Sameer Kankute af6883712e Add tests for kimi 2 bedrock model 2026-01-08 10:07:33 +05:30
Elkhan Eminov bae625bdc6 OpenRouter embeddings API support (#18391)
* support for OpenRouter embeddings

* add bearer

* add content header
2026-01-08 00:57:31 +05:30
Ishaan Jaffer 407575efb3 test_completion_bedrock_claude_aws_session_token 2026-01-07 18:09:07 +05:30
Stephen Matta b40a6a0f6c [Fix] Nova model detection for Bedrock provider (#17910)
Resolves issue #17910 where Amazon Nova models (like amazon.nova-pro-v1:0)
were incorrectly identified as Amazon Titan models, causing requests to
use textGenerationConfig instead of inferenceConfig.

The fix moves the "nova" check before the initial provider check on the
split model name. This ensures that models containing "nova" (like
amazon.nova-pro-v1:0 or amazon.nova-2-lite-v1:0) are correctly identified
as Nova models, rather than matching "amazon" first.
2026-01-06 21:12:30 -05:00
Sameer Kankute 0d050dc0ea fix:test_anthropic_beta_header 2026-01-06 14:28:30 +05:30
Sameer Kankute 8aff258a93 fix: test_databricks_embeddings[True] 2026-01-06 14:20:30 +05:30
0717376 12f02f6c54 feat: Add GigaChat provider support (#18564)
* feat: Add GigaChat provider support

Add native support for GigaChat API (Sber AI, Russia's leading LLM).

Supported features:
- Chat completions (sync/async)
- Streaming (sync/async)
- Function calling / Tools
- Structured output via JSON schema (emulated through function calls)
- Image input (base64 and URL)
- Embeddings

Closes #18515

* fix: resolve mypy type errors in GigaChat handler

- Fix _prepare_file_data return type (use 3-tuple for cleaner type flow)
- Add type annotations for lists in _process_content_parts methods
- Add type annotations in _collapse_user_messages
- Use ChatCompletionToolCallChunk for proper tool_use typing
- Add type: ignore[override] for astreaming async generator

* refactor(gigachat): migrate to BaseConfig pattern

* fix: remove unused imports

* fix: resolve mypy type errors

* fix: mypy type errors

* refactor: address review feedback for GigaChat provider

- Remove singleton pattern, reuse litellm HTTPHandler
- Move constants/errors to transformation files, delete common_utils.py
- Add models to model_prices_and_context_window.json
- Fix ssl_verify not passed to HTTP client for embeddings

* docs: update GigaChat documentation with ssl_verify requirement
2026-01-06 10:10:02 +05:30
ゆり dc62cdb300 fix: handle empty error objects in response conversion (#18493)
Some OpenAI-compatible providers (e.g., Apertis) return empty error
objects even on successful responses. The previous check only verified
that error was not None, causing spurious APIErrors.

Now the code checks if the error object contains meaningful data:
- For dict errors: non-empty message OR non-null code
- For string errors: non-empty string
- Other truthy values are still treated as errors

Fixes #18407

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

Co-authored-by: yurekami <yurekami@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 00:37:52 +05:30
Sameer Kankute c7e0366925 Add support for minmax tts 2025-12-23 21:53:53 +05:30
Alexsander Hamir 5534038e93 Fix CI: Revert security scan changes and add GitGuardian ignore rules (#18358) 2025-12-22 17:03:53 -08:00
Sameer Kankute 6d5eb07496 Merge pull request #18336 from BerriAI/litellm_add_nova_image_embedding_support
fix: request body for image embedding request
2025-12-22 19:11:42 +05:30
Sameer Kankute 9f9d7fe7a0 Merge pull request #18328 from BerriAI/litellm_add_usage_in_image_generation
Add usage object in image generation of gemini
2025-12-22 16:59:42 +05:30
Sameer Kankute cbc1ac9508 fix: request body for image embedding request 2025-12-22 16:55:04 +05:30
Ishaan Jaffer 57e07bddd3 fix remove flaky test 2025-12-22 16:32:13 +05:30
Sameer Kankute b01eb2b970 Add usage object in image generation of gemini 2025-12-22 11:59:30 +05:30
Ishaan Jaffer 1f3a5756a1 test realtime fix 2025-12-21 10:21:25 +05:30
Alexsander Hamir 23477e7621 [Fix] CI/CD - test_openai_realtime_direct_call_with_intent (#18308) 2025-12-20 17:32:20 -08:00
Ishaan Jaffer de65f0e777 TestAzureOpenAIO3Mini 2025-12-20 23:18:19 +05:30
Ishaan Jaffer 179eb8815d test_azure_safety_result 2025-12-20 22:40:53 +05:30
Ishaan Jaffer 987c9a608b TestAzureOpenAIO3Mini 2025-12-20 22:37:59 +05:30
Ishaan Jaffer 9f205b0323 TestAzureOpenAIO3Mini 2025-12-20 21:52:28 +05:30
Ishaan Jaffer 7eb2af1959 test bad org fix 2025-12-20 21:43:27 +05:30
Ishaan Jaffer abf14663ed test_slack_gif_skill_creates_gif 2025-12-20 21:35:25 +05:30
Ishaan Jaffer 6112160a16 Revert "[Fix] Security - Remove example API keys with high entropy (#18255)"
This reverts commit 24edbccf5c.
2025-12-20 20:48:11 +05:30
Ishaan Jaffer 7232039779 test fixes 2025-12-20 15:38:20 +05:30