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]

Add this test in cicd

Sameer Kankute7b6a972fedda
diff --git a/.circleci/config.yml b/.circleci/config.yml
index c9407162649..ec93c7057ae 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -3689,6 +3689,109 @@ jobs:
- store_test_results:
path: test-results
+ proxy_e2e_azure_batches_tests:
+ machine:
+ image: ubuntu-2204:2023.10.1
+ resource_class: xlarge
+ working_directory: ~/project
+ steps:
+ - checkout
+ - setup_google_dns
+ - run:
+ name: Install Docker CLI
+ command: |
+ curl -fsSL https://get.docker.com | sh
+ sudo usermod -aG docker $USER
+ docker version
+ - run:
+ name: Install Python 3.12
+ command: |
+ curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh --output miniconda.sh
+ bash miniconda.sh -b -p $HOME/miniconda
+ export PATH="$HOME/miniconda/bin:$PATH"
+ conda init bash
+ source ~/.bashrc
+ conda create -n myenv python=3.12 -y
+ conda activate myenv
+ python --version
+ - run:
+ name: Install Poetry
+ command: |
+ export PATH="$HOME/miniconda/bin:$PATH"
+ source $HOME/miniconda/etc/profile.d/conda.sh
+ conda activate myenv
+ pip install poetry
+ - run:
+ name: Install dockerize
+ command: |
+ wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz
+ sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz
+ rm dockerize-linux-amd64-v0.6.1.tar.gz
+ - run:
+ name: Start PostgreSQL Database
+ command: |
+ docker run -d \
+ --name postgres-db \
+ -e POSTGRES_USER=llmproxy \
+ -e POSTGRES_PASSWORD=dbpassword9090 \
+ -e POSTGRES_DB=litellm \
+ -p 5432:5432 \
+ postgres:15
+ - run:
+ name: Wait for PostgreSQL to be ready
+ command: dockerize -wait tcp://localhost:5432 -timeout 1m
+ - run:
+ name: Install Dependencies
+ command: |
+ export PATH="$HOME/miniconda/bin:$PATH"
+ source $HOME/miniconda/etc/profile.d/conda.sh
+ conda activate myenv
+ poetry config virtualenvs.in-project true
+ poetry install --with dev,proxy-dev --extras "proxy"
+ poetry run pip install psycopg2-binary uvicorn fastapi httpx
+ - run:
+ name: Setup litellm-enterprise
+ command: |
+ export PATH="$HOME/miniconda/bin:$PATH"
+ source $HOME/miniconda/etc/profile.d/conda.sh
+ conda activate myenv
+ poetry run pip install --force-reinstall --no-deps -e enterprise/
+ - run:
+ name: Generate Prisma client
+ command: |
+ export PATH="$HOME/miniconda/bin:$PATH"
+ source $HOME/miniconda/etc/profile.d/conda.sh
+ conda activate myenv
+ poetry run prisma generate --schema litellm/proxy/schema.prisma
+ - run:
+ name: Run Prisma migrations
+ command: |
+ export PATH="$HOME/miniconda/bin:$PATH"
+ source $HOME/miniconda/etc/profile.d/conda.sh
+ conda activate myenv
+ export DATABASE_URL=postgresql://llmproxy:dbpassword9090@localhost:5432/litellm
+ cd litellm/proxy
+ poetry run prisma migrate deploy --schema schema.prisma
+ cd ../..
+ - run:
+ name: Run Azure Batch E2E Tests
+ command: |
+ export PATH="$HOME/miniconda/bin:$PATH"
+ source $HOME/miniconda/etc/profile.d/conda.sh
+ conda activate myenv
+ export DATABASE_URL=postgresql://llmproxy:dbpassword9090@localhost:5432/litellm
+ export USE_LOCAL_LITELLM=true
+ export USE_MOCK_MODELS=true
+ export USE_STATE_TRACKER=true
+ export LITELLM_LOG=DEBUG
+ poetry run pytest tests/proxy_e2e_azure_batches_tests/test_proxy_e2e_azure_batches.py \
+ -vv -s -k "test_e2e_managed_batch" \
+ --tb=short \
+ --maxfail=3 \
+ --durations=10 \
+ --junitxml=test-results/junit.xml
+ no_output_timeout: 30m
+
upload-coverage:
docker:
- image: cimg/python:3.9
@@ -4458,6 +4561,12 @@ workflows:
only:
- main
- /litellm_.*/
+ - proxy_e2e_azure_batches_tests:
+ filters:
+ branches:
+ only:
+ - main
+ - /litellm_.*/
- llm_translation_testing:
filters:
branches:
diff --git a/.github/workflows/test-proxy-e2e-azure-batches.yml b/.github/workflows/test-proxy-e2e-azure-batches.yml
index 145db4a5baf..38d436dc1f3 100644
--- a/.github/workflows/test-proxy-e2e-azure-batches.yml
+++ b/.github/workflows/test-proxy-e2e-azure-batches.yml
@@ -3,13 +3,14 @@ name: Proxy E2E Azure Batches Tests
on:
pull_request:
branches: [main]
+ workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- test-proxy-e2e-azure-batches:
+ proxy_e2e_azure_batches_tests:
runs-on: ubuntu-latest
timeout-minutes: 30
@@ -87,12 +88,3 @@ jobs:
--maxfail=3 \
--durations=10
- - name: Upload test logs on failure
- if: failure()
- uses: actions/upload-artifact@v4
- with:
- name: test-logs-azure-batches
- path: |
- *.log
- tests/proxy_e2e_azure_batches_tests/*.log
- retention-days: 7