Commit graph

24299 commits

Author SHA1 Message Date
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
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
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
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
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
Ishaan Jaff
827d1def02 UI new build 2025-08-23 17:12:09 -07:00
Ishaan Jaff
373a13f9d4 ui fix logos 2025-08-23 17:10:18 -07:00
Ishaan Jaff
65adddd91e fix callback logos 2025-08-23 17:08:18 -07:00
Ishaan Jaff
f4de167654
[Feat] UI QA Fixes (#13915)
* fix add fallbacks page

* leftnav - allow expand / collapse
2025-08-23 17:05:25 -07:00
Ishaan Jaff
e0e356e328 test mapped test fixes 2025-08-23 17:04:23 -07:00
Yuta Saito
cca1ea1592 Fix missing and unused imports in custom_guardrail docs example 2025-08-24 08:37:17 +09:00
mubashir1osmani
2fa8f971e0 feat: multiple images in openai images/edits endpoint 2025-08-23 19:13:32 -04:00
Krish Dholakia
242c06e691
Merge pull request #13784 from mubashir1osmani/docs-deploy 2025-08-23 15:40:34 -07:00
Ishaan Jaff
8a8b6f6b2c ui new build 2025-08-23 14:18:38 -07:00
Ishaan Jaff
0fccd619ea test_vertex_ai_deepseek 2025-08-23 14:13:03 -07:00
Ishaan Jaff
cf64033044 test fix 2025-08-23 14:04:41 -07:00
Ishaan Jaff
835879bc85 fix: img gen 2025-08-23 14:03:11 -07:00
Ishaan Jaff
f1c710a608 test_e2e_generate_cold_storage_object_key_not_configured 2025-08-23 13:33:33 -07:00
Ishaan Jaff
58c413d7ab use litellm-proxy-extras==0.2.18 2025-08-23 13:27:26 -07:00
Mubashir Osmani
1a8d3cc2d5
Added FAQ under deployment docs (#13912)
* updated faq questions

* updated faq

* added faq under deployment
2025-08-23 13:22:56 -07:00
Ishaan Jaff
e637930d6d fix Providers UI 2025-08-23 13:16:40 -07:00
Ishaan Jaff
b9132968b2
[Perf] Improvements for Async Success Handler (Logging Callbacks) - Approx +130 RPS (#13905)
* [Performance] Reduce Significant CPU overhead from litellm_logging.py (#13895)

* fix: litellm.configured_cold_storage_logger

* fix Session Management - Non-OpenAI Models docs

* ruff fix

* test fix

* create LoggingWorker

* add GLOBAL_LOGGING_WORKER for async task handling

* fix logging tests

* add conftest

* fix conftest

* test fix location of encode bedrock runtime modelid arn

* fix conftest.py

* tuning LoggingWorker

* conftest.py

* fix conftest batches/

* test_async_chat_azure

* event_loop

* test_bedrock_streaming_passthrough_test2

* fix GLOBAL_LOGGING_WORKER

* logging worker

* add flush for global logging worker

* Revert "fix GLOBAL_LOGGING_WORKER"

This reverts commit d254f508f4.

* fix conftest clear_queue

* fix conftest clear_queue

* setup_and_teardown for llm translation

* docs AWS_REGION

* test_async_chat_azure

* change test DIR

* run ci/cd again

* use 1 job for litellm_router_unit_testing

* fix space

* fix litellm_router_unit_testing

* test_aaarouter_dynamic_cooldown_message_retry_time

* litellm_router_unit_testing

* conftest.py clearing qu

* fixes litellm_router_unit_testing

* fixes clear_queue

* fix router_unit_tests

* remove conftest

* add back conftest for router

* fix event loop test

* test fix

* fixes for LoggingWorker

* ruff fix
2025-08-23 13:13:23 -07:00
Ishaan Jaff
9750374081
[Feat] New LLM API - AI/ML API for Image Gen (#13893)
* add LlmProviders.AIML

* add AIMLChatConfig

* add aiml

* fix AimlImageGenerationConfig

* add AimlImageGenerationConfig

* add cost_calculator

* fixes for AI ML API

* add known AIML Flux image models

* add AIML Cost Calc

* add AI/ML API

* add aiml_models
2025-08-23 13:12:44 -07:00
Krrish Dholakia
511630dc7e fix: fix transformation 2025-08-23 12:50:57 -07:00
Krish Dholakia
a5b12c9ce1
Merge pull request #13830 from BerriAI/litellm_dev_08_20_2025_p1
Fix calling key with access to model alias
2025-08-23 12:10:03 -07:00
Krish Dholakia
9df6f4ef08
Merge branch 'main' into litellm_dev_08_20_2025_p1 2025-08-23 12:09:53 -07:00
Krrish Dholakia
b23e35f75e test: update tests 2025-08-23 12:09:19 -07:00
Krish Dholakia
49cb9bdbca
Merge pull request #13843 from BerriAI/litellm_dev_08_29_2025_p3
SSO - Free SSO usage for up to 5 users + remove deprecated dbrx models (dbrx-instruct, llama 3.1)
2025-08-23 12:06:01 -07:00
Krrish Dholakia
988434a49d fix: fix linting error 2025-08-23 11:49:12 -07:00
Krish Dholakia
f2c5e806b4
Merge pull request #13673 from BerriAI/litellm_dev_08_16_2025_p2
fix(openai/image_edits): Support 'mask' parameter for openai image edits
2025-08-23 11:30:57 -07:00