Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

[Infra] Optimize CI: right-size resource classes, drop unused coverage, increase xdist workers

yuneng-jiangf07301a51845
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 2bb98f7fd7c..a451af70202 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -322,6 +322,7 @@ jobs:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
working_directory: ~/project
+ resource_class: medium
steps:
- checkout
@@ -400,22 +401,11 @@ jobs:
command: |
pwd
ls
- python -m pytest -vv tests/local_testing --cov=litellm --cov-report=xml -x --junitxml=test-results/junit.xml --durations=5 -k "langfuse"
+ python -m pytest -v tests/local_testing -x --junitxml=test-results/junit.xml --durations=5 -k "langfuse"
no_output_timeout: 15m
- - run:
- name: Rename the coverage files
- command: |
- mv coverage.xml langfuse_coverage.xml
- mv .coverage langfuse_coverage
-
# Store test results
- store_test_results:
path: test-results
- - persist_to_workspace:
- root: .
- paths:
- - langfuse_coverage.xml
- - langfuse_coverage
caching_unit_tests:
docker:
- image: cimg/python:3.11
@@ -1113,6 +1103,7 @@ jobs:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
working_directory: ~/project
+ resource_class: medium
steps:
- checkout
@@ -1127,7 +1118,6 @@ jobs:
pip install "respx==0.22.0"
pip install "pytest-retry==1.6.3"
pip install "pytest-asyncio==0.21.1"
- pip install "pytest-cov==5.0.0"
# Run pytest and generate JUnit XML report
- setup_litellm_enterprise_pip
- run:
@@ -1135,21 +1125,11 @@ jobs:
command: |
pwd
ls
- python -m pytest tests/local_testing/ -vv -k "assistants" --cov=litellm --cov-report=xml -x -s -v --junitxml=test-results/junit.xml --durations=5
+ python -m pytest tests/local_testing/ -v -k "assistants" -x --junitxml=test-results/junit.xml --durations=5
no_output_timeout: 15m
- - run:
- name: Rename the coverage files
- command: |
- mv coverage.xml litellm_assistants_api_coverage.xml
- mv .coverage litellm_assistants_api_coverage
# Store test results
- store_test_results:
path: test-results
- - persist_to_workspace:
- root: .
- paths:
- - litellm_assistants_api_coverage.xml
- - litellm_assistants_api_coverage
llm_translation_testing:
docker:
- image: cimg/python:3.11
@@ -1690,6 +1670,7 @@ jobs:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
working_directory: ~/project
+ resource_class: large
steps:
- checkout
@@ -1720,22 +1701,11 @@ jobs:
pwd
ls
prisma generate
- python -m pytest -vv tests/enterprise --cov=litellm --cov-report=xml -x -s -v --junitxml=test-results/junit-enterprise.xml --durations=10 -n 2
+ python -m pytest -v tests/enterprise -x --junitxml=test-results/junit-enterprise.xml --durations=10 -n 4
no_output_timeout: 15m
- - run:
- name: Rename the coverage files
- command: |
- mv coverage.xml litellm_mapped_tests_coverage.xml
- mv .coverage litellm_mapped_tests_coverage
-
# Store test results
- store_test_results:
path: test-results
- - persist_to_workspace:
- root: .
- paths:
- - litellm_mapped_tests_coverage.xml
- - litellm_mapped_tests_coverage
batches_testing:
docker:
- image: cimg/python:3.11
@@ -1877,6 +1847,7 @@ jobs:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
working_directory: ~/project
+ resource_class: large
steps:
- checkout
@@ -1898,22 +1869,11 @@ jobs:
command: |
pwd
ls
- python -m pytest -vv tests/image_gen_tests -n 2 --cov=litellm --cov-report=xml -x -v --junitxml=test-results/junit.xml --durations=5
+ python -m pytest -v tests/image_gen_tests -n 4 -x --junitxml=test-results/junit.xml --durations=5
no_output_timeout: 15m
- - run:
- name: Rename the coverage files
- command: |
- mv coverage.xml image_gen_coverage.xml
- mv .coverage image_gen_coverage
-
# Store test results
- store_test_results:
path: test-results
- - persist_to_workspace:
- root: .
- paths:
- - image_gen_coverage.xml
- - image_gen_coverage
logging_testing:
docker:
- image: cimg/python:3.11
@@ -2051,6 +2011,7 @@ jobs:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
working_directory: ~/project
+ resource_class: medium
steps:
- checkout
@@ -2072,7 +2033,7 @@ jobs:
command: |
pwd
ls
- python -m pytest -vv tests/local_testing/test_basic_python_version.py
+ python -m pytest -v tests/local_testing/test_basic_python_version.py
helm_chart_testing:
machine:
image: ubuntu-2204:2023.10.1 # Use machine executor instead of docker
@@ -3648,7 +3609,7 @@ jobs:
python -m venv venv
. venv/bin/activate
pip install coverage
- coverage combine realtime_translation_coverage ocr_coverage search_coverage mcp_coverage litellm_mcps_tests_coverage logging_coverage audio_coverage local_testing_part1_coverage local_testing_part2_coverage litellm_assistants_api_coverage langfuse_coverage caching_coverage image_gen_coverage pass_through_unit_tests_coverage batches_coverage guardrails_coverage litellm_mapped_tests_coverage
+ coverage combine realtime_translation_coverage ocr_coverage search_coverage mcp_coverage litellm_mcps_tests_coverage logging_coverage audio_coverage local_testing_part1_coverage local_testing_part2_coverage caching_coverage pass_through_unit_tests_coverage batches_coverage guardrails_coverage
coverage xml
- codecov/upload:
file: ./coverage.xml