- 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.
- 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
- 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'
- 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>
- 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>
- 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
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>