Commit graph

664 commits

Author SHA1 Message Date
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
Alexsander Hamir
24edbccf5c
[Fix] Security - Remove example API keys with high entropy (#18255) 2025-12-19 10:09:50 -08:00
Ishaan Jaff
09b5ee9428
[Feat] Unified Skills API - works across Anthropic, Vertex, Azure, Bedrock (#18232)
* init LiteLLM_SkillsTable

* init LiteLLMSkillsTransformationHandler

* init LiteLLMSkillsTransformationHandler

* init skills

* init SkillsInjectionHook

* init litellm skills handler

* _fetch_skill_from_db

* LiteLLMSkillsTransformationHandler

* add _prisma_skill_to_litellm

* use SkillPromptInjectionHandler

* refactor skills handler

* add slack GIF

* test_skill_code_execution_via_deployment_hook

* init readme

* test_get_skill_sdk

* test skills in DB

* fix code qa

* init with containers param

* SkillsInjectionHook

* fix type

* convert_skill_to_anthropic_tool, get_litellm_code_execution_tool_anthropic

* fix messages skills handler

* test_slack_gif_skill_creates_gif

* init SkillsInjectionHook

* clean async_pre_call_hook

* fixes

* working unified skills API! yeet

* fix mypy linting

* LiteLLM_SkillsTable

* llm-sandbox==0.3.31

* fix
2025-12-19 18:55:59 +05:30
Sameer Kankute
e3cf0110bb Rename: gemini-3-flash-preview 2025-12-17 21:48:15 +05:30
Sameer Kankute
22e86cde2a Add support for gemini 3 flash via v1/messages endpoint 2025-12-17 18:03:54 +05:30
Ishaan Jaffer
accebc49a2 TestNvidiaNim 2025-12-13 16:38:11 -08:00
Ishaan Jaff
14eed8aff7
[Fixes] A2a Gateway - ensure azure foundry agents work (#17943)
* add agents  v2 fixes azure

* fix auth

* get_azure_ad_token fix

* docs foundry
2025-12-13 16:08:03 -08:00
Ishaan Jaff
3054b6ea60
[Feat] A2A Gateway - allow adding Azure Foundry Agents on UI (#17909)
* add CostConfigFields

* add CostConfigFields

* add output_cost_per_token

* refactor table

* add agent cost view

* add azure foundry fields

* add foundry logo

* fix: clean error

* fix utils

* fix agent edi

* add easter egg

* fix order

* test_handle_streaming_forwards_api_key

* fix forward api key down

* fix a2a send msg

* add A2a comparison on compare playground

* fix chat ui

* fix bedrock agentcore stream
2025-12-12 16:38:04 -08:00
Ishaan Jaff
cca21c0926
[Feat] New API Provider - Add Azure AI Foundry Agents on /chat/completions, /responses, /messages + Agent Gateway (#17845)
* init get_azure_ai_route

* init AzureAIAgentsConfig

* init AzureAIAgentsConfig

* AzureAIAgentsHandler

* test_azure_ai_agents_acompletion_non_streaming

* test_azure_ai_agents_acompletion_streaming

* fix stream

* _process_sse_stream

* Azure AI Foundry Agents

* init  Azure AI Foundry Agent

* fix code QA checks

* fix api key

* docs fix
2025-12-11 15:21:28 -08:00
Cesar Garcia
f7425f297b
fix(openai): use optimized async http client for text completions (#17831)
* fix(openai): use optimized async http client for text completions

OpenAITextCompletion.acompletion was using litellm.aclient_session directly
instead of the optimized http client with aiohttp transport that
OpenAIChatCompletion uses. This fixes inconsistent behavior where custom
SSL configs and the faster aiohttp transport were not applied to async
text completion requests.

Fixes #17676

* test(openai): add test for text completion async http client

Verify that OpenAITextCompletion.acompletion uses the optimized
BaseOpenAILLM._get_async_http_client() instead of litellm.aclient_session.

Related to #17676

* test: move http client test to existing test file

Move test_acompletion_uses_optimized_http_client to
test_text_completion_unit_tests.py instead of separate file.
2025-12-11 14:54:26 -08:00
Ishaan Jaff
5ee32167c0
[Feat] New Provider - add langgraph (#17783)
* init LANGGRAPH

* init LangGraphConfig

* init LangGraphConfig types

* init langgraph

* init getting api base and key

* init transform langgraph

* fix SSE issues

* test_langgraph_acompletion_non_streaming

* add LangGraph to docs

* docs: Setting Up a Local LangGraph Server

* fix langgraph SSE

* fix import uuid
2025-12-10 12:30:35 -08:00
Sameer Kankute
dea62e3f60
Merge pull request #17769 from BerriAI/litellm_test_fix
Fix nvdia and geminin tests
2025-12-10 22:29:04 +05:30
Sameer Kankute
ec30032bc3 Fix nvdia and geminin tests 2025-12-10 22:05:11 +05:30
Krrish Dholakia
8b125ff74e test: remove test_helicone - integration test made live calls to api and broke ci/cd 2025-12-09 18:36:51 -08:00
Cesar Garcia
01dec55c2f
fix(anthropic): preserve server_tool_use and web_search_tool_result in multi-turn conversations (#17746)
- Extract web_search_tool_result blocks in extract_response_content()
- Store web_search_results in provider_specific_fields for round-trip
- Detect srvtoolu_ prefix to reconstruct as server_tool_use (not tool_use)
- Add corresponding web_search_tool_result after server_tool_use blocks

This ensures multi-turn conversations with Anthropic web search + custom
tools work correctly without Anthropic expecting tool_result for server-
side tool executions.
2025-12-09 18:25:23 -08:00