Commit Graph
32598 Commits
Author SHA1 Message Date
Julio Quinteros ProandClaude Sonnet 4.6 b5aff267d7 fix(deps): regenerate poetry.lock after pyproject.toml changes
pyproject.toml was updated in two commits (replacing pytest-retry with
pytest-xdist in dev deps, and adding asyncio_default_fixture_loop_scope
to pytest ini_options) without regenerating the lock file, causing all
CI jobs to fail with:

  pyproject.toml changed significantly since poetry.lock was last
  generated. Run `poetry lock` to fix the lock file.

Regenerated with `poetry lock`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 19:14:36 -03:00
jquinterandGitHub 7f1cb90228 Merge pull request #21412 from BerriAI/fix/remove-unused-asyncio-imports
fix: remove unused asyncio imports (linting errors)
2026-02-17 18:55:00 -03:00
Julio Quinteros ProandClaude Sonnet 4.6 9b5eddda17 fix: remove unused asyncio imports (F401)
Remove `asyncio` imported but unused in:
- litellm/integrations/custom_guardrail.py
- litellm/proxy/common_utils/performance_utils.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 18:54:18 -03:00
Ishaan JaffandGitHub cea1279afe Add EU AI Act Article 5 template to policy templates UI (#21414)
* Add EU AI Act Article 5 template to policy templates

Adds the EU AI Act Article 5 - Prohibited Practices template to the policy templates JSON that the UI reads from.

The template uses the eu_ai_act_article5_prohibited_practices category that was added in PR #21342. Blocks prompts requesting:
- Social scoring systems
- Emotion recognition in workplace/education
- Biometric categorization for sensitive attributes
- Predictive profiling and manipulation

Shows up in the UI under EU region filter with High complexity.

* Update policy templates backup with EU AI Act template

Syncs the backup file with the main policy_templates.json to include the EU AI Act Article 5 template.
2026-02-17 13:49:52 -08:00
jquinterandGitHub 63bb27ef62 Merge pull request #21396 from BerriAI/fix/conftest-deprecation-warnings
fix(tests): improve conftest isolation and remove deprecation warnings
2026-02-17 18:21:41 -03:00
Julio Quinteros Pro 890cc08a3a fix: resolve merge conflict and Greptile feedback
- Remove pytest-retry config from pyproject.toml (fixes merge conflict with main)
- Fix asymmetric callback restoration in isolate_litellm_state fixture
  - Now properly saves and restores all callback lists
  - Prevents test pollution from callback state leakage
- Add cache flush after module reload in setup_and_teardown
  - Prevents stale client instances after importlib.reload
- Remove unused imports (curr_dir, Router)

This addresses:
1. Merge conflict in pyproject.toml (CONFLICTING status)
2. Greptile's feedback about asymmetric callback handling
3. Missing cache flush after module reload
4. Code cleanliness (unused variables)
2026-02-17 18:20:44 -03:00
Julio Quinteros Pro 480974e0f9 fix: complete asyncio.iscoroutinefunction deprecation fix across codebase
Replace all asyncio.iscoroutinefunction() calls with inspect.iscoroutinefunction()
to fix Python 3.16 deprecation warnings throughout the entire codebase.

Files updated:
- litellm/litellm_core_utils/logging_utils.py
- litellm/proxy/common_utils/performance_utils.py
- litellm/proxy/management_endpoints/key_management_endpoints.py (2 occurrences)
- litellm/proxy/management_endpoints/ui_sso.py
- litellm/litellm_core_utils/redact_messages.py
- litellm/integrations/custom_guardrail.py
- tests/proxy_unit_tests/test_response_polling_handler.py

This addresses Greptile's feedback about incomplete deprecation fixes.
All instances now use the standard library inspect.iscoroutinefunction()
which is the recommended approach and won't be deprecated.
2026-02-17 18:20:44 -03:00
Julio Quinteros Pro 6678b2bd1d fix: replace asyncio.iscoroutinefunction with inspect.iscoroutinefunction
- asyncio.iscoroutinefunction() is deprecated in Python 3.16
- Use inspect.iscoroutinefunction() instead (standard library function)
- Removes deprecation warning in track_llm_api_timing decorator

This is part of the broader effort to remove Python 3.16 deprecation warnings.
2026-02-17 18:20:44 -03:00
Julio Quinteros Pro e37befd5b4 fix: address Greptile feedback - remove duplicates and fix deprecations
- Remove duplicate @pytest.fixture decorator on setup_and_teardown
- Delete conftest_improved.py (duplicate file, pytest only loads conftest.py)
- Remove deprecated event_loop fixture override
- Add asyncio_default_fixture_loop_scope config in pyproject.toml (modern approach)

This fixes pytest-asyncio >=0.22 deprecation warnings while maintaining
session-scoped event loop behavior.
2026-02-17 18:20:43 -03:00
Julio Quinteros ProandClaude Sonnet 4.5 53d9cad8f5 fix(tests): restore autouse=True to setup_and_teardown fixture
Critical fix for Greptile feedback: The setup_and_teardown fixture was
missing the autouse=True parameter, causing the module reload logic to
never execute. This would result in test pollution as callbacks would
chain across modules.

Changes:
- Add autouse=True to setup_and_teardown fixture in conftest.py
- Add autouse=True to setup_and_teardown fixture in conftest_improved.py

Note: conftest_improved.py is intentionally kept as a reference
implementation showing the recommended improvements. It demonstrates
better patterns for test isolation that can be adopted later.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-17 18:20:23 -03:00
Julio Quinteros ProandClaude Sonnet 4.5 3b176a0970 fix(tests): remove asyncio.get_event_loop_policy deprecation warning
- Replace asyncio.get_event_loop_policy() with asyncio.new_event_loop()
- Use asyncio.set_event_loop() to set the event loop
- Fixes deprecation warning in Python 3.16
- Updated both conftest.py and conftest_improved.py

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-17 18:20:23 -03:00
Julio Quinteros Pro f9ea565b3b fix(tests): improve test isolation in conftest.py
- Move cache flushing to function scope
  - Disable module reload in parallel mode
  - Remove manual event loop creation
2026-02-17 18:20:23 -03:00
jquinterandGitHub ee83d477a4 Merge pull request #21394 from BerriAI/fix/ci-test-improvements
fix(ci): reduce parallelism and add retry logic to improve test stability
2026-02-17 17:13:34 -03:00
Ishaan JaffandGitHub dc1775d41b Day 0 Support: Claude Sonnet 4.6 (#21401)
* docs: add Day 0 Sonnet 4.6 support blog post

Add concise blog post announcing Day 0 support for Claude Sonnet 4.6 with Docker image and usage examples across:
- Anthropic API
- Azure AI
- Vertex AI
- Bedrock

Includes both LiteLLM Proxy and SDK usage for all providers.

* docs: add Sonnet 4.6 blog post to sidebar navigation

Add link to Claude Sonnet 4.6 Day 0 support blog post in the Blog section of the documentation sidebar.
2026-02-17 12:12:05 -08:00
Julio Quinteros Pro ab912e5c8d refactor: move logging_utils.py deprecation fix to PR #21396
- Remove asyncio.iscoroutinefunction deprecation fix from this PR
- This change is better suited for PR #21396 (deprecation warnings)
- Keeps PR #21394 focused on CI test reliability improvements
2026-02-17 17:11:59 -03:00
Julio Quinteros Pro 48105e650b fix: remove pytest-retry to avoid conflicting retry plugins
- Remove pytest-retry from dev dependencies in pyproject.toml
- Add pytest-xdist as proper dev dependency (was only in pip install)
- Update CI workflow to reflect proper dependency management
- Prevents conflict between pytest-retry and pytest-rerunfailures

Having both pytest-retry and pytest-rerunfailures installed simultaneously
causes unpredictable behavior and excessive retries.
2026-02-17 16:55:37 -03:00
superpoussin22andGitHub c7fbab4549 add default version for opus 4.6 (#21397) 2026-02-17 11:46:44 -08:00
Ishaan JaffandGitHub 1e8ade2237 Add Claude Sonnet 4.6 pricing (#21395)
* add Claude Sonnet 4.6 pricing across all platforms

* fix: correct Bedrock model names and add to BEDROCK_CONVERSE_MODELS

- Remove -v1 suffix from Bedrock Sonnet 4.6 entries per official docs
- Add anthropic.claude-sonnet-4-6 to BEDROCK_CONVERSE_MODELS

* fix: address Greptile and maintainer review feedback

- Update max_output_tokens from 8192 to 64000 (docs confirm 64K limit)
- Add search_context_cost_per_query to vertex_ai/claude-sonnet-4-6 for consistency
- Add vertex_ai/claude-sonnet-4-6@default variant per Vertex AI naming convention
2026-02-17 11:46:24 -08:00
Julio Quinteros Pro 02126c5aac fix: remove pytest-retry configuration to eliminate duplicate retries
- Remove retries=20 and retry_delay=5 from pytest.ini_options
- These settings are for pytest-retry plugin (different from pytest-rerunfailures)
- Having both pytest-retry + pytest-rerunfailures causes excessive retries
- CI workflow now uses only pytest-rerunfailures with --reruns flag
2026-02-17 16:08:40 -03:00
Julio Quinteros Pro bf157acccc fix: restore pytest-xdist to CI workflow
- Add pytest-xdist back to pip install line (required for -n flag)
- Was accidentally removed when removing pytest-retry
- Without pytest-xdist, all CI jobs fail with 'unrecognized option -n'
2026-02-17 16:08:24 -03:00
Julio Quinteros ProandClaude Sonnet 4.5 bd9b239ed7 fix(ci): address Greptile review feedback
- Remove pytest-retry to avoid duplicate retry mechanisms (only use pytest-rerunfailures)
- Remove --dist loadgroup flag (no tests use xdist_group marker)
- Remove unused LITELLM_CI environment variable
- Remove sequential test step with error masking
- Simplify workflow for clarity

This fixes the issue where tests could be retried 60+ times due to
duplicate retry plugins (pytest-retry with retries=20 + pytest-rerunfailures
with --reruns 2-3).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-17 15:58:33 -03:00
Julio Quinteros ProandClaude Sonnet 4.5 e9929d2798 fix: replace deprecated asyncio.iscoroutinefunction with inspect.iscoroutinefunction
- Replace asyncio.iscoroutinefunction() with inspect.iscoroutinefunction()
- Add inspect import
- Fixes deprecation warning in Python 3.16

The asyncio.iscoroutinefunction is deprecated and will be removed in Python 3.16.
Using inspect.iscoroutinefunction is the recommended approach.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-17 15:48:09 -03:00
Julio Quinteros Pro 7a097ae97f fix(ci): reduce parallelism and add retry logic
- Reduce workers from 4 to 2 to avoid race conditions
  - Add --reruns with 2-3 retries per test group
  - Increase timeout from 15 to 20 minutes
  - Add better test isolation
2026-02-17 15:43:43 -03:00
Krrish Dholakia 4930babace docs(release_cycle.md): document enterprise support 2026-02-17 10:15:17 -08:00
Krrish Dholakia bf824dec55 docs: remove references to unused var 2026-02-17 10:15:17 -08:00
Krrish Dholakia e936f88f15 refactor: remove old doc 2026-02-17 10:15:17 -08:00
jquinterandGitHub cd20dde199 Merge pull request #21390 from BerriAI/fix/lint-too-many-statements-route-llm
fix(lint): suppress PLR0915 too many statements in route_request
2026-02-17 14:41:25 -03:00
Julio Quinteros ProandClaude Sonnet 4.5 289341d948 fix(lint): suppress PLR0915 in route_request function
Add noqa comment for "too many statements" lint error in route_request().
The function has 60 statements (limit is 50) but refactoring it properly
would be a significant undertaking requiring careful testing.

The function handles routing for 50+ different request types and contains
complex logic that should be addressed in a dedicated refactoring effort,
not as part of a lint fix.

Error: proxy/route_llm_request.py:145:11: PLR0915 Too many statements (60 > 50)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-17 14:38:17 -03:00
Sameer KankuteandGitHub 809838042e Merge pull request #21382 from BerriAI/litellm_vllm_e2e_testing
Add vllm e2e test for embedding
2026-02-17 22:32:42 +05:30
Sameer Kankute 811ffff0b8 move e2e to llm translation 2026-02-17 21:14:44 +05:30
Sameer KankuteandGitHub ec573ee2b0 Merge pull request #21375 from BerriAI/litellm_evals_api
[feat] Add support for Openai Evals API
2026-02-17 21:01:36 +05:30
Sameer Kankute 1c9cee0630 Fix doc 2026-02-17 20:57:38 +05:30
Sameer Kankute 842d5a0762 Fix mypy issues 2026-02-17 20:51:51 +05:30
Sameer KankuteandGitHub 3af90d6e81 Merge pull request #21383 from BerriAI/litellm_fix_mock_tests
Update poetry.lock
2026-02-17 20:40:38 +05:30
Sameer Kankute 791cef6d99 fix test_chat_completion 2026-02-17 20:26:28 +05:30
Sameer Kankute 288f7b860c fix test_allow_access_by_email 2026-02-17 20:19:39 +05:30
Sameer Kankute 1ced47c612 fix tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server.py 2026-02-17 20:14:56 +05:30
Sameer Kankute 550bb621f7 fix llm tests 2026-02-17 20:13:23 +05:30
Sameer Kankute fe20e66a1d Fix : test_exception_without_scanners 2026-02-17 20:12:02 +05:30
Sameer Kankute 8374b4d939 Fix : test_exception_without_scanners 2026-02-17 20:11:20 +05:30
Sameer Kankute 7a35116148 Fix : test_video_content_handler_uses_get_for_openai 2026-02-17 20:06:08 +05:30
Sameer Kankute cd7fc38d21 Update poetry.lock 2026-02-17 19:51:59 +05:30
Sameer Kankute 211d6e9d30 Add vllm e2e test for embedding 2026-02-17 19:42:46 +05:30
Sameer Kankute 90be817b32 Add support for evals via sdk 2026-02-17 19:32:15 +05:30
Sameer Kankute 59408387ef Add eval run endpoints 2026-02-17 19:32:15 +05:30
Sameer Kankute b246c3c56c Add eval run endpoints and methods 2026-02-17 19:32:15 +05:30
Sameer Kankute 8b75979fdc Add eval run endpoints methods 2026-02-17 19:32:15 +05:30
Sameer Kankuteandgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> 782b048372 Update tests/test_litellm/llms/openai/evals/test_openai_evals_transformation.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-17 19:30:58 +05:30
Sameer Kankuteandgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> ea72ffb03b Update litellm/llms/custom_httpx/llm_http_handler.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-17 19:30:58 +05:30
Sameer Kankuteandgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> 590b98630d Update litellm/llms/custom_httpx/llm_http_handler.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-17 19:30:58 +05:30