@@ -21,9 +21,7 @@ commands:
2121 - run :
2222 name : " Install local version of litellm-enterprise"
2323 command : |
24- cd enterprise
25- python -m pip install -e .
26- cd ..
24+ pip install --force-reinstall --no-deps -e enterprise/
2725 setup_litellm_test_deps :
2826 steps :
2927 - checkout
7169 - run :
7270 name : Install Python
7371 command : |
74- choco install python --version=3.11.0 -y
72+ choco install python --version=3.11.0 -y --no-progress --force
7573 refreshenv
7674 python --version
75+ environment :
76+ CHOCOLATEY_CONFIRM_ALL : " true"
7777 - run :
7878 name : Install Dependencies
7979 command : |
@@ -1183,7 +1183,7 @@ jobs:
11831183 command : |
11841184 pwd
11851185 ls
1186- python -m pytest tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --cov=litellm --cov-report=xml --junitxml=test-results/junit-part2.xml --durations=10 -n 8 --timeout=300 -vv --log-cli-level=INFO
1186+ python -m pytest tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --cov=litellm --cov-report=xml --junitxml=test-results/junit-part2.xml --durations=10 -n 4 --timeout=300 -vv --log-cli-level=INFO
11871187 no_output_timeout : 120m
11881188 - run :
11891189 name : Rename the coverage files
@@ -1458,6 +1458,7 @@ jobs:
14581458 pip install "respx==0.22.0"
14591459 pip install "pydantic==2.10.2"
14601460 pip install "boto3==1.36.0"
1461+ pip install "semantic_router==0.1.10"
14611462 # Run pytest and generate JUnit XML report
14621463 - run :
14631464 name : Run tests
@@ -1700,7 +1701,7 @@ jobs:
17001701 command : |
17011702 prisma generate
17021703 export PYTHONUNBUFFERED=1
1703- python -m pytest tests/test_litellm/proxy --ignore=tests/test_litellm/proxy/guardrails --ignore=tests/test_litellm/proxy/management_endpoints --ignore=tests/test_litellm/proxy/_experimental --ignore=tests/test_litellm/proxy/client --ignore=tests/test_litellm/proxy/auth --cov=litellm --cov-report=xml --junitxml=test-results/junit-proxy-part2.xml --durations=10 -n 8 --maxfail=5 --timeout=60 -vv --log-cli-level=WARNING -r A
1704+ python -m pytest tests/test_litellm/proxy --ignore=tests/test_litellm/proxy/guardrails --ignore=tests/test_litellm/proxy/management_endpoints --ignore=tests/test_litellm/proxy/_experimental --ignore=tests/test_litellm/proxy/client --ignore=tests/test_litellm/proxy/auth --cov=litellm --cov-report=xml --junitxml=test-results/junit-proxy-part2.xml --durations=10 -n 4 --maxfail=5 --timeout=120 -vv --log-cli-level=WARNING -r A
17041705 no_output_timeout : 60m
17051706 - run :
17061707 name : Rename the coverage files
@@ -3690,6 +3691,114 @@ jobs:
36903691 - store_test_results :
36913692 path : test-results
36923693
3694+ proxy_e2e_azure_batches_tests :
3695+ machine :
3696+ image : ubuntu-2204:2023.10.1
3697+ resource_class : xlarge
3698+ working_directory : ~/project
3699+ steps :
3700+ - checkout
3701+ - setup_google_dns
3702+ - run :
3703+ name : Install Docker CLI
3704+ command : |
3705+ curl -fsSL https://get.docker.com | sh
3706+ sudo usermod -aG docker $USER
3707+ docker version
3708+ - run :
3709+ name : Install Python 3.12
3710+ command : |
3711+ curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh --output miniconda.sh
3712+ bash miniconda.sh -b -p $HOME/miniconda
3713+ export PATH="$HOME/miniconda/bin:$PATH"
3714+ conda init bash
3715+ source ~/.bashrc
3716+ conda create -n myenv python=3.12 -y
3717+ conda activate myenv
3718+ python --version
3719+ - run :
3720+ name : Install Poetry
3721+ command : |
3722+ export PATH="$HOME/miniconda/bin:$PATH"
3723+ source $HOME/miniconda/etc/profile.d/conda.sh
3724+ conda activate myenv
3725+ pip install poetry
3726+ - run :
3727+ name : Install dockerize
3728+ command : |
3729+ wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz
3730+ sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz
3731+ rm dockerize-linux-amd64-v0.6.1.tar.gz
3732+ - run :
3733+ name : Start PostgreSQL Database
3734+ command : |
3735+ docker run -d \
3736+ --name postgres-db \
3737+ -e POSTGRES_USER=llmproxy \
3738+ -e POSTGRES_PASSWORD=dbpassword9090 \
3739+ -e POSTGRES_DB=litellm \
3740+ -p 5432:5432 \
3741+ postgres:15
3742+ - run :
3743+ name : Wait for PostgreSQL to be ready
3744+ command : dockerize -wait tcp://localhost:5432 -timeout 1m
3745+ - run :
3746+ name : Install system dependencies
3747+ command : |
3748+ sudo apt-get update -y
3749+ sudo apt-get install -y libpq-dev
3750+ - run :
3751+ name : Install Dependencies
3752+ command : |
3753+ export PATH="$HOME/miniconda/bin:$PATH"
3754+ source $HOME/miniconda/etc/profile.d/conda.sh
3755+ conda activate myenv
3756+ poetry config virtualenvs.in-project true
3757+ poetry install --with dev,proxy-dev --extras "proxy"
3758+ poetry run pip install psycopg2-binary uvicorn fastapi httpx tenacity
3759+ - run :
3760+ name : Setup litellm-enterprise
3761+ command : |
3762+ export PATH="$HOME/miniconda/bin:$PATH"
3763+ source $HOME/miniconda/etc/profile.d/conda.sh
3764+ conda activate myenv
3765+ poetry run pip install --force-reinstall --no-deps -e enterprise/
3766+ - run :
3767+ name : Generate Prisma client
3768+ command : |
3769+ export PATH="$HOME/miniconda/bin:$PATH"
3770+ source $HOME/miniconda/etc/profile.d/conda.sh
3771+ conda activate myenv
3772+ poetry run prisma generate --schema litellm/proxy/schema.prisma
3773+ - run :
3774+ name : Run Prisma migrations
3775+ command : |
3776+ export PATH="$HOME/miniconda/bin:$PATH"
3777+ source $HOME/miniconda/etc/profile.d/conda.sh
3778+ conda activate myenv
3779+ export DATABASE_URL=postgresql://llmproxy:dbpassword9090@localhost:5432/litellm
3780+ cd litellm/proxy
3781+ poetry run prisma migrate deploy --schema schema.prisma
3782+ cd ../..
3783+ - run :
3784+ name : Run Azure Batch E2E Tests
3785+ command : |
3786+ export PATH="$HOME/miniconda/bin:$PATH"
3787+ source $HOME/miniconda/etc/profile.d/conda.sh
3788+ conda activate myenv
3789+ export DATABASE_URL=postgresql://llmproxy:dbpassword9090@localhost:5432/litellm
3790+ export USE_LOCAL_LITELLM=true
3791+ export USE_MOCK_MODELS=true
3792+ export USE_STATE_TRACKER=true
3793+ export LITELLM_LOG=DEBUG
3794+ poetry run pytest tests/proxy_e2e_azure_batches_tests/test_proxy_e2e_azure_batches.py \
3795+ -vv -s -k "test_e2e_managed_batch" \
3796+ --tb=short \
3797+ --maxfail=3 \
3798+ --durations=10 \
3799+ --junitxml=test-results/junit.xml
3800+ no_output_timeout : 30m
3801+
36933802 upload-coverage :
36943803 docker :
36953804 - image : cimg/python:3.9
@@ -3887,7 +3996,7 @@ jobs:
38873996 command : |
38883997 cd ~/project
38893998 # Check pyproject.toml
3890- CURRENT_VERSION=$(python -c "import toml; print( toml.load('pyproject.toml')['tool']['poetry']['dependencies']['litellm-proxy-extras'].split('\"')[1] )")
3999+ CURRENT_VERSION=$(python -c "import toml; dep = toml.load('pyproject.toml')['tool']['poetry']['dependencies']['litellm-proxy-extras']; print(dep['version'] if isinstance(dep, dict) else dep )")
38914000 if [ "$CURRENT_VERSION" != "$NEW_VERSION" ]; then
38924001 echo "Error: Version in pyproject.toml ($CURRENT_VERSION) doesn't match new version ($NEW_VERSION)"
38934002 exit 1
@@ -4101,6 +4210,63 @@ jobs:
41014210 path : playwright-report
41024211 destination : playwright-report
41034212
4213+ prisma_schema_sync :
4214+ machine :
4215+ image : ubuntu-2204:2023.10.1
4216+ resource_class : xlarge
4217+ working_directory : ~/project
4218+ steps :
4219+ - checkout
4220+ - setup_google_dns
4221+ - attach_workspace :
4222+ at : ~/project
4223+ - run :
4224+ name : Load Docker Database Image
4225+ command : |
4226+ gunzip -c litellm-docker-database.tar.gz | docker load
4227+ docker images | grep litellm-docker-database
4228+ - run :
4229+ name : Install Neon CLI
4230+ command : |
4231+ npm i -g neonctl
4232+ - run :
4233+ name : Install curl and dockerize
4234+ command : |
4235+ sudo apt-get update
4236+ sudo apt-get install -y curl
4237+ sudo wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz
4238+ sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz
4239+ sudo rm dockerize-linux-amd64-v0.6.1.tar.gz
4240+ - run :
4241+ name : Sync schema on base e2e database
4242+ command : |
4243+ BASE_DATABASE_URL=$(neon connection-string \
4244+ --project-id $NEON_PROJECT_ID \
4245+ --api-key $NEON_API_KEY \
4246+ --branch br-fancy-paper-ad1olsb3 \
4247+ --database-name yuneng-trial-db \
4248+ --role neondb_owner)
4249+ docker run -d \
4250+ -p 4000:4000 \
4251+ -e DATABASE_URL=$BASE_DATABASE_URL \
4252+ -e LITELLM_MASTER_KEY="sk-1234" \
4253+ --name schema-sync \
4254+ -v $(pwd)/litellm/proxy/example_config_yaml/simple_config.yaml:/app/config.yaml \
4255+ litellm-docker-database:ci \
4256+ --config /app/config.yaml \
4257+ --port 4000 \
4258+ --use_prisma_db_push
4259+ - run :
4260+ name : Start outputting logs
4261+ command : docker logs -f schema-sync
4262+ background : true
4263+ - run :
4264+ name : Wait for proxy to be ready (schema sync complete)
4265+ command : dockerize -wait http://localhost:4000 -timeout 5m
4266+ - run :
4267+ name : Stop schema sync container
4268+ command : docker stop schema-sync
4269+
41044270 test_nonroot_image :
41054271 machine :
41064272 image : ubuntu-2204:2023.10.1
@@ -4299,13 +4465,23 @@ workflows:
42994465 only :
43004466 - main
43014467 - /litellm_.*/
4468+ - prisma_schema_sync :
4469+ context : e2e_ui_tests
4470+ requires :
4471+ - build_docker_database_image
4472+ filters :
4473+ branches :
4474+ only :
4475+ - main
4476+ - /litellm_.*/
43024477 - e2e_ui_testing :
43034478 name : e2e_ui_testing_chromium
43044479 browser : chromium
43054480 context : e2e_ui_tests
43064481 requires :
43074482 - ui_build
43084483 - build_docker_database_image
4484+ - prisma_schema_sync
43094485 filters :
43104486 branches :
43114487 only :
@@ -4318,6 +4494,7 @@ workflows:
43184494 requires :
43194495 - ui_build
43204496 - build_docker_database_image
4497+ - prisma_schema_sync
43214498 filters :
43224499 branches :
43234500 only :
@@ -4391,6 +4568,12 @@ workflows:
43914568 only :
43924569 - main
43934570 - /litellm_.*/
4571+ - proxy_e2e_azure_batches_tests :
4572+ filters :
4573+ branches :
4574+ only :
4575+ - main
4576+ - /litellm_.*/
43944577 - llm_translation_testing :
43954578 filters :
43964579 branches :
0 commit comments