Commit graph

24475 commits

Author SHA1 Message Date
Ifta Khairul Alam Adil
8808f78ba6 Merge branch 'main' into fix/gemini-imagen-model-name-validation 2025-08-27 15:45:59 +02:00
Mohse Morad
cb65c98389 Fix lint 2025-08-27 15:25:42 +03:00
Mohse Morad
369aa02c4b Bedrock handle json mode check correctly 2025-08-27 14:51:43 +03:00
Ifta Khairul Alam Adil
ab4cd48c40 refactor: remove unnecessary whitespace in GoogleImageGenConfig
- Cleaned up the code by removing an extra blank line in the GoogleImageGenConfig class.
- This minor adjustment improves code readability without affecting functionality.

Signed-off-by: Ifta Khairul Alam Adil <ikaadil007@gmail.com>
2025-08-27 11:55:19 +02:00
Ifta Khairul Alam Adil
2d515e72ff refactor: simplify URL construction for Gemini image generation
- Remove unnecessary model name prefix stripping
- Directly use the model name in the API URL construction

This change streamlines the URL generation process for the Google AI API, ensuring compatibility with model names without the 'gemini/' prefix.

Signed-off-by: Ifta Khairul Alam Adil <ikaadil007@gmail.com>
2025-08-27 11:53:47 +02:00
Krish Dholakia
539b94ad4e
Merge pull request #13394 from Deviad/feature/enhance_logging_for_containers
Enhance logging for containers to log on files both with usual format and json format
2025-08-26 23:21:34 -07:00
Krish Dholakia
900bd10905
Merge branch 'main' into feature/enhance_logging_for_containers 2025-08-26 23:21:15 -07:00
Krish Dholakia
71af7bcf9c
Merge pull request #13374 from blahgeek/fix-count-special-token
Fix token_counter with special token input
2025-08-26 23:19:26 -07:00
Krish Dholakia
ddec6c69c8
Merge pull request #13534 from cometapi-dev/main
docs: Add CometAPI documentation with authentication, usage examples, and error handling
2025-08-26 23:17:04 -07:00
Krish Dholakia
4613f7821d
Merge pull request #13536 from edwardsamuel/feat/openrouter-gpt-5-pricing
Add openrouter gpt-5 family models pricing
2025-08-26 23:16:53 -07:00
Krish Dholakia
45f465d84f
Merge pull request #13572 from Noma-Security/noma-security-guardrails-support
Add Noma Security guardrail support
2025-08-26 23:15:17 -07:00
Krish Dholakia
201d96b2d2
Merge pull request #13917 from Toy-97/patch-1
Deepinfra Metadata Update 24082025
2025-08-26 23:13:46 -07:00
Krish Dholakia
28f7df8da8
Merge pull request #13965 from manascb1344/feat/nebius-models-update
feat(constants): expand Nebius provider models and normalize model IDs
2025-08-26 23:13:06 -07:00
Krish Dholakia
682fb697d0
Merge pull request #13969 from dttran-glo/patch-1
bump `orjson` version to "3.11.2"
2025-08-26 23:09:57 -07:00
Ishaan Jaff
ee324943d7 bump: version 1.76.0 → 1.76.1 2025-08-26 20:02:57 -07:00
Ishaan Jaff
c839b2c751 installing_litellm_on_python 2025-08-26 19:51:02 -07:00
Ishaan Jaff
80d4cc1283
[Perf] Use fastuuid for fast UUID generations - 2.1x Faster (#13992)
* use fastuuid

* add fastuuid

* add fastuuid==0.12.0
2025-08-26 19:47:25 -07:00
Ifta Khairul Alam Adil
0f5b31fd78 fix: resolve invalid model name error for Gemini Imagen models (#13851)
- Fix URL construction in Gemini image generation to strip 'gemini/' prefix
- Google AI API expects base model name without the prefix
- Update model references and pricing information for consistency
- Remove outdated image generation pricing entries

Fixes issue where models like 'gemini/imagen-4.0-fast-generate-preview-06-06'
were being rejected by the Google AI API due to incorrect URL formatting.
2025-08-27 04:17:35 +02:00
Ishaan Jaff
ab7efaa832
test_pre_process_non_default_params (#13990) 2025-08-26 19:15:17 -07:00
Cole French
6696955506
[Bug]: Fix tests to reference moved attributes in braintrust_logging module (#13978)
* Mock instance attribute moved from globals

* Support looking up mock message on mock choice
2025-08-26 18:58:16 -07:00
codeflash-ai[bot]
5dba5822f2
⚡️ Speed up function _is_debugging_on by 45% (#13988)
The optimization eliminates unnecessary conditional branching by replacing the explicit `if-else` structure with a direct return of the boolean expression. Instead of evaluating the condition and then branching to return `True` or `False`, the optimized version directly returns the result of the boolean expression `verbose_logger.isEnabledFor(logging.DEBUG) or set_verbose is True`.

This change removes Python's conditional jump overhead and reduces the number of executed bytecode instructions per function call. The line profiler shows the original version required 3 lines of execution (condition check, conditional return True, fallback return False) while the optimized version executes only 1 line.

The 45% speedup is achieved by:
- **Eliminating branching overhead**: No conditional jumps needed
- **Reducing bytecode instructions**: From ~3 instructions to 1 instruction per call
- **Leveraging Python's short-circuit evaluation**: The `or` operator still evaluates left-to-right and stops early when the first condition is True

The optimization is particularly effective for this logging utility function which is likely called frequently throughout the application. All test cases show consistent 40-75% improvements across different scenarios (debug on/off, verbose flag variations, edge cases with different logging levels), demonstrating the optimization works well regardless of the boolean expression's outcome.

Co-authored-by: codeflash-ai[bot] <148906541+codeflash-ai[bot]@users.noreply.github.com>
2025-08-26 17:25:45 -07:00
Ishaan Jaff
5647757ab3
[Feat] New model gemini-2.5-flash-image-preview (#13979)
* add gemini-2.5-flash-image-preview

* add gemini-2.5-flash-image-preview
2025-08-26 15:04:02 -07:00
Duc Tran
e3d947abeb
bump orjson version to "3.11.2" 2025-08-26 23:21:53 +07:00
manascb1344
1150b93e8f feat(constants): expand nebius_models set with DeepSeek, Llama, Qwen, NVIDIA, ZAI, and others; normalize model IDs (remove -fast variants, add new instruct/thinking variants) 2025-08-26 18:20:29 +05:30
Mohse Morad
6c01c3a547 WIP 2025-08-26 15:25:17 +03:00
Krish Dholakia
55c3fd62ac
Add Claude Opus 4 and 4.1 via OpenRouter and Fix Claude Sonnet 4 and 3.7 via OpenRouter in Prices and Context Window Config
Update model prices and context window
2025-08-25 23:28:39 -07:00
Krish Dholakia
3803af5ff5
Merge pull request #13566 from kankute-sameer/fix/azure-gpt4-web-search-support
fix: remove incorrect web search support for azure/gpt-4.1 family
2025-08-25 23:28:15 -07:00
Krish Dholakia
ae678a6642
Merge pull request #13573 from Ivy-Interactive/feature/braintrust-span-name-metadata
Feature/braintrust span name metadata
2025-08-25 23:19:56 -07:00
Krish Dholakia
3ed1220f75
Merge pull request #13916 from mubashir1osmani/openai-multiple-images
feat: multiple images in openai images/edits endpoint
2025-08-25 23:11:13 -07:00
Krish Dholakia
22934907ba
Merge pull request #13933 from michal-otmianowski/ignore-expired-s3-cache-entries
Verify if cache entry has expired prior to serving it to client
2025-08-25 23:10:48 -07:00
Krish Dholakia
b1bc8e3aa2
Merge pull request #13955 from ckoehler/push-oymwkvxmkqxv
feat: add image headers for Copilot
2025-08-25 23:04:24 -07:00
Krish Dholakia
51b491e7a1
Merge pull request #13958 from TeddyAmkie/pricing/deepseek-v3p1
Add DeepSeek-v3.1 pricing for Fireworks AI provider
2025-08-25 23:03:39 -07:00
Teddy Amkie
97e9502f4a Add DeepSeek-v3.1 pricing for Fireworks AI provider
- Add fireworks_ai/accounts/fireworks/models/deepseek-v3p1 model configuration
- Set context window: 128K input, 8K output tokens
- Pricing: /bin/zsh.56/1M input tokens, .68/1M output tokens
- Supports response schema and tool choice
- Based on DeepSeek API unified pricing effective Sept 2025
2025-08-25 18:41:49 -07:00
Ishaan Jaff
6ce1d82970
[Bug] Fix: Vertex Mistral not working for streaming (#13952)
* fix OpenAI like chat handler

* fix MockResponse

* test_partner_models_httpx_streaming

* test_partner_models_httpx_streaming
2025-08-25 17:39:40 -07:00
Christoph Koehler
04cca1e7f3
feat: add image headers for Copilot
Fixes #13696. See issue for details.
2025-08-25 18:15:26 -06:00
Ishaan Jaff
c7b0c57b1e
[Bug Fix] Azure Passthrough request with streaming (#13831)
* fix: _update_stream_param_based_on_request_body

* test_update_stream_param_based_on_request_body

* test_pass_through_request_stream_param_override
2025-08-25 14:11:17 -07:00
Ishaan Jaff
433d1a4947
[Bug fix] - Fix /messages fallback from Anthropic API -> Bedrock API (#13946)
* use helper get_provider_specific_headers

* fix get_provider_specific_headers

* test_anthropic_messages_fallbacks

* bedrock/us.anthropic.claude-sonnet-4

* fix: get_provider_specific_headers

* TestProviderSpecificHeaderUtils

* test_anthropic_messages_fallbacks
2025-08-25 13:44:54 -07:00
0x5751
8dd04c4eee fix: test error 2025-08-26 01:58:04 +08:00
0x5751
d6cd50dfdb feat: Add support for custom Anthropic-compatible API endpoints
This commit adds support for custom Anthropic-compatible API endpoints
that don't follow the standard /v1/messages or /v1/complete path convention.

## Changes
- Added LITELLM_ANTHROPIC_DISABLE_URL_SUFFIX environment variable
- When set to true, prevents automatic appending of /v1/messages (for anthropic)
- When set to true, prevents automatic appending of /v1/complete (for anthropic_text)
- Added debug logging to indicate when suffix is being skipped
- Maintained full backward compatibility - existing deployments are unaffected
2025-08-26 01:22:51 +08:00
Ishaan Jaff
c1ee8c26af
[UI QA] - Allow setting Team Member RPM/TPM limits when creating a team (#13943)
* allow setting team_member_rpm_limit on creating

* create_team_member_rate_limits

* docs fix

* fix img
2025-08-25 09:12:50 -07:00
Ishaan Jaff
7c5e9b666b update release notes 2025-08-25 08:17:30 -07:00
Michal Otmianowski
3b6462236c clean imports 2025-08-25 11:09:06 +02:00
Michal Otmianowski
c444263e7d verify expires field prior to serving cache entry 2025-08-25 10:42:12 +02:00
Krish Dholakia
68aaeb4f4a
Merge pull request #13914 from uc4w6c/docs/fix-custom-guardrail-imports
Fix missing and unused imports in custom_guardrail docs example
2025-08-25 00:57:46 -07:00
Krish Dholakia
0d285c8b4c
Merge pull request #13919 from stevenmanton/fix-aws-assume-role-with-token
Add support for AWS assume_role with a session token
2025-08-25 00:55:02 -07:00
Krish Dholakia
a7bb5bc814
Merge pull request #13922 from ArthurRenault/patch-1
[BUG] Add back supervisor to non-root image
2025-08-25 00:54:18 -07:00
Arthur
6c97a31c9c
bug: add supervisor to non-root image 2025-08-24 15:43:57 +02:00
Steven Anton
d95578464e Add support for AWS assume_role with a session token 2025-08-23 22:37:21 -07:00
Toy-97
f2bb1ce31e
Deepinfra Metadata Update 24082025
Deepseek v3.1 Price Dropped
2025-08-24 08:30:25 +08:00
Ishaan Jaff
827d1def02 UI new build 2025-08-23 17:12:09 -07:00