Commit graph

850 commits

Author SHA1 Message Date
Ishaan Jaffer
e9466dc27e pt tests fix 2025-10-25 11:08:33 -07:00
Ishaan Jaff
e1cb92862e
[Feat] Add def search() APIs for Web Search - Perplexity API (#15769)
* add BaseSearchConfig

* add BaseSearchConfig

* validate_environment

* fix handlers

* add PerplexitySearchConfig

* add PerplexitySearchConfig

* add LiteLLM Search API module.

* add BaseSearchConfig

* add _build_search_optional_params

* add search_testing

* add BaseSearchTest

* add TestPerplexitySearch

* fix BASE

* fix handler

* add search API

* add to init

* fix: working perplexity search API

* add _hidden_params to search
2025-10-21 16:58:51 -07:00
Ishaan Jaff
73a23a6c78
[Feat] Add Azure AVA TTS integration (#15749)
* add AzureBaseIssueTokenHandler

* add BaseTextToSpeechConfig

* async_text_to_speech_handler

* add AzureAVATextToSpeechConfig

* add get_provider_text_to_speech_config

* add AzureAVATextToSpeechConfig

* fixes for base_llm_http_handler

* fix transform_text_to_speech_request

* test_azure_ava_tts_async

* test_azure_ava_tts_async

* fix TextToSpeechRequestData

* fix transform_text_to_speech_request

* add text_to_speech_handler in LLMHttpHandler

* remove old file

* fix transform_text_to_speech_request

* fix dispatch_text_to_speech

* fix azure TTS

* fix AVA TTS

* fix transform

* fix linting

* ci/cd - use one job for audio testing

* fix tests

* fix llm http handler debugging

* unit tests azure tts

* docs Azure speech

* docs fix

* docs azure AVA

* docs azure AVA

* fix handlers

* test_async_realtime_uses_max_size_parameter
2025-10-20 16:52:23 -07:00
Ishaan Jaff
bc26845ec4
[Feat] Native /ocr endpoint support (#15573)
* [Feat] Add native litellm.ocr() functions (#15567)

* fix get_supported_ocr_params

* add get_provider_ocr_config

* init OCR

* init ocr functions

* add OCRResponse Base Model

* add ocr to llm http handlers

* add main.py for OCR

* fix linting for OCR

* TestMistralOCR

* update to use DocumentType for Mistral

* fix _prepare_ocr_request

* fix transform

* add main.py for OCR

* add spec to init

* fix OCR

* TestMistralOCR

* ruff fix

* Potential fix for code scanning alert no. 3521: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* [Feat] Add /ocr route on LiteLLM AI Gateway - Adds support for native mistral ocr calling (#15571)

* fix get_supported_ocr_params

* add get_provider_ocr_config

* init OCR

* init ocr functions

* add OCRResponse Base Model

* add ocr to llm http handlers

* add main.py for OCR

* fix linting for OCR

* TestMistralOCR

* update to use DocumentType for Mistral

* fix _prepare_ocr_request

* fix transform

* add main.py for OCR

* add spec to init

* fix OCR

* TestMistralOCR

* ruff fix

* add router.ocr() methods

* add OCR routes

* feat add ocr routes

* add OCR routes

* feat: add OCR routes in proxy server

* working /ocr routes

* test_router_aocr_with_mistral

* docs Mistral OCR

* docs OCR

* [Feat] Add Azure AI Mistral OCR Integration  (#15572)

* fix get_supported_ocr_params

* add get_provider_ocr_config

* init OCR

* init ocr functions

* add OCRResponse Base Model

* add ocr to llm http handlers

* add main.py for OCR

* fix linting for OCR

* TestMistralOCR

* update to use DocumentType for Mistral

* fix _prepare_ocr_request

* fix transform

* add main.py for OCR

* add spec to init

* fix OCR

* TestMistralOCR

* ruff fix

* add router.ocr() methods

* add OCR routes

* feat add ocr routes

* add OCR routes

* feat: add OCR routes in proxy server

* working /ocr routes

* test_router_aocr_with_mistral

* docs Mistral OCR

* docs OCR

* add azure ai to get_provider_ocr_config

* add AzureAIOCRConfig

* TestAzureAIOCR

* TestAzureAIOCR

* test fixes for azure ai ocr

* fix async OCR transform for Azure

* fix transform_ocr_request

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-15 17:20:01 -07:00
Ishaan Jaffer
1b4bcdabfd fix test 2025-10-11 11:42:09 -07:00
Ishaan Jaffer
5f4b890dcd fixes 2025-10-11 11:32:00 -07:00
Ishaan Jaffer
7e738c8ac4 proxy_store_model_in_db_tests 2025-10-11 10:55:28 -07:00
Ishaan Jaffer
8c4ca82235 fix: postgresql auth_ui_unit_tests 2025-10-11 09:23:31 -07:00
Ishaan Jaffer
41953185bf fix litellm_proxy_unit_testing 2025-10-11 09:16:59 -07:00
Ishaan Jaffer
97e00f694c fix azure assistants test 2025-10-04 16:18:14 -07:00
Ishaan Jaffer
53503828b2 test fix 2025-10-04 10:57:02 -07:00
Ishaan Jaffer
82978f4c5c fix mypy 2025-09-27 12:21:32 -07:00
Ishaan Jaffer
1bb7ad4f69 litellm_utils_testing 2025-09-27 12:13:51 -07:00
Ishaan Jaffer
200dd0ef39 local_testing fix 2025-09-27 12:04:30 -07:00
Ishaan Jaff
3e793d7122
test - fix mypy linting on ci/cd (#14981)
* mypy_linting make 1 job for it

* mypy_linting

* fix fastuuid

* fix mypy

* mypy fix
2025-09-27 11:56:45 -07:00
Ishaan Jaffer
e31972f5db litellm_mapped_tests 2025-09-27 10:45:36 -07:00
Ishaan Jaffer
936e3466ac litellm_router_testing 2025-09-27 10:42:51 -07:00
Ishaan Jaffer
ba3e20060a llm_translation_testing fix 2025-09-27 10:35:25 -07:00
Ishaan Jaffer
9c8a2e8bff add -show-traceback 2025-09-26 19:26:44 -07:00
Ishaan Jaffer
9a737c5be4 fix local_testing bump python img 2025-09-26 19:14:13 -07:00
Ishaan Jaffer
ce7499c8f7 fix sec tests 2025-09-26 19:06:10 -07:00
Ishaan Jaffer
55849706f9 fix local_testing 2025-09-26 18:59:11 -07:00
Ishaan Jaffer
dd0744b746 fix mypy 2025-09-26 18:46:09 -07:00
Ishaan Jaffer
9bed9995f8 bump pip install "mypy==1.18.2 2025-09-26 18:32:42 -07:00
Ishaan Jaff
ea8d0bb7d5 fix: re-add scheduled rotations 2025-09-26 11:40:46 -07:00
Ishaan Jaffer
b1e56c55ad merge 2025-09-24 22:11:37 -07:00
Ishaan Jaff
ded823a3a3
[Feat] Initial support for scheduled key rotations (#14877)
* add KeyRotationSettings

* add KeyRotationManager

* add key rotation manager

* add KeyRotationManager

* fix _initialize_spend_tracking_background_jobs

* fix add_key_rotation_fields

* fixes

* new fields in schema

* update schema

* fix fixes for init key rotation manager

* fixes for init key rotation manager

* fix KeyRotationManager

* tests for key rotation

* fix key_rotation_settings

* fix KeyRotationManager

* fix LITELLM_KEY_ROTATION_CHECK_INTERVAL_SECONDS

* fix fixes for init key rotation manager

* ruff check fix

* fix LITELLM_KEY_ROTATION_CHECK_INTERVAL_SECONDS

* fix _initialize_spend_tracking_background_jobs

* docs fix

* docs auto rotate

* schema fix

* bump proxy extras

* fix config.yml
2025-09-24 21:37:56 -07:00
Ishaan Jaffer
66a88d3761 fix ci/cd 2025-09-24 11:55:34 -07:00
Alex Shoop
ab2bd2a50f add check_fastuuid_usage.py script to check_code_and_doc_quality job 2025-09-24 10:45:59 +09:00
Ishaan Jaffer
74593daf40 ci/cd fix litellm_mapped_enterprise_tests 2025-09-20 16:05:44 -07:00
Krrish Dholakia
a07bf301e6 ci: update env vars 2025-09-20 12:06:58 -07:00
Krish Dholakia
661a42b626
Merge pull request #14698 from BerriAI/litellm_contributor_prs_09_18_2025_p1
Litellm contributor prs 09 18 2025 p1
2025-09-18 18:32:51 -07:00
=
90bd1927e2 Update config.yml 2025-09-18 17:50:55 -07:00
=
4f89675267 upgraded to node 20 2025-09-18 17:38:56 -07:00
Alexsander Hamir
59409429d4
fix: reduced __inits__ overhead in 7% (#14689)
* fix: avoid redundant __init__ calls on hot path

Previously, imports on the request hot path caused __init__ to run
excessively for every request. This change ensures initialization
happens once, reducing cpu overhead.

* fix: remove redundant __init__ import

The current implementation no longer requires an import at the top of the function.

* fix: placed on core utils for future reuse

* test: add coverage & remove inline import

A general import-checking tool across all endpoints would be a large PR.
This commit focuses on a smaller, targeted fix for the discussed case.

* added import check to CI
2025-09-18 17:18:05 -07:00
=
f80660acd9 vitests for GuardrailViewer components 2025-09-18 16:57:22 -07:00
Ishaan Jaff
93d6e9bf49 pip install "google-genai==1.22.0" 2025-09-12 19:30:47 -07:00
Ishaan Jaff
555efd60b5
[Security] Fix: Ensure .info() logs are not used for request/responses + Add code QA check for possible violations (#14386)
* test: info log

* fixes for debug

* add info_log_check

* fix: debug level

* fix: debug level

* fix: use .debug

* fix info statements

* fix info log check

* fix: fix emit_standard_logging_payload

* fix RequestBody

* Potential fix for code scanning alert no. 3339: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix check

* fix code qa check

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-09-09 13:55:56 -07:00
Ishaan Jaff
a0b380a296 fix install 2025-09-08 18:30:01 -07:00
Ishaan Jaff
e71e06510c fix test 2025-09-08 17:38:44 -07:00
Ishaan Jaff
ac2d349161
[Security] Ensure LiteLLM Images have 0 Critical, High, Medium vulnerabilities with CVSS ≥ 4.0 (#14357)
* updated scans

* fix scans

* fix litellm_security_tests

* fix

* fix count CVEE

* add readme

* fix Security Scans

* fix: starlette==0.47.2 # starlette fastapi dep

* bump fastapi==0.115.14

* bump 0.116.1
2025-09-08 16:49:52 -07:00
Ishaan Jaff
3915a4455a fix pip install 2025-09-06 14:29:08 -07:00
Ishaan Jaff
5310bba35b
[Feat] Litellm x CloudZero Integration - Cost Tracking (#14296)
* fix: just pull LiteLLM_DailyUserSpend

* get the team_id from user daily spend table

* cloudzero_dry_run_export

* fix CZ endpoints

* trace entity_id

* fix: get_usage_data

* fix get_usage_data

* fix _create_cbf_record

* fix get_usage_data

* ensure start and end time is used for exporting data

* fix init_cloudzero_background_job

* fix CloudZeroExportRequest

* fix initialize_cloudzero_export_job

* fix initialize_cloudzero_export_job

* allow init with env + config.yaml for cloudzero

* fix: init CZ through config.yaml

* fix DRY run on CZ

* TestCloudZeroDryRunEndpoint

* fix: CLOUDZERO_EXPORT_INTERVAL_MINUTES

* fix init_cloudzero_background_job

* fix exporting data

* fix transform

* stash cloudzero docs

* docs: CloudZero

* ruff fix

* fix rendering key alias

* fix polars
2025-09-05 21:29:41 -07:00
Ishaan Jaff
e127820bf1 fix proxy_logging_guardrails_model_info_tests 2025-09-03 16:10:30 -07:00
Ishaan Jaff
47c04a8a8c proxy_logging_guardrails_model_info_tests 2025-09-02 14:13:17 -07:00
Ishaan Jaff
5ab3d74371 DEFAULT_NUM_WORKERS_LITELLM_PROXY 2025-09-01 20:34:23 -07:00
Ishaan Jaff
c839b2c751 installing_litellm_on_python 2025-08-26 19:51:02 -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
76f1064229
[Bug Fix] litellm incompatible with newest release of openAI v1.100.0 (#13728)
* fix imports OpenAI SDK

* ResponseText fixes

* fixes ResponseText

* fix imports

* catch AttributeError

* fix import

* use openai==1.100.1

* fix build from PIP

* fix lint test

* Print OpenAI version

* fix Install dependencies
2025-08-18 18:26:17 -07:00
0x-fang
9f17bedb48
bump up boto3 and aioboto3 versions (#13665) 2025-08-15 17:06:08 -07:00