From 24ead9b4e12bef9ee451a95c3c72df650e638ded Mon Sep 17 00:00:00 2001 From: Julio Quinteros Pro Date: Wed, 18 Feb 2026 21:24:06 -0300 Subject: [PATCH] fix(ci): install enterprise package into main project venv, not enterprise's own venv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running `cd enterprise && poetry run pip install -e .` causes poetry to create a separate venv in `enterprise/.venv` (since enterprise/ has its own pyproject.toml). The main project's tests run with `.venv/bin/python`, so the enterprise package installed in `enterprise/.venv` is never seen. Fix: run `poetry run pip install -e enterprise/` from the repo root so poetry uses the main project's venv. This ensures litellm_enterprise is importable when tests run. This explains why enterprise tests kept failing with: AttributeError: '_PROXY_LiteLLMManagedFiles' object has no attribute '_check_file_deletion_allowed' even after --force-reinstall was added — the reinstall was going to the wrong virtual environment. Co-Authored-By: Claude Sonnet 4.6 --- .circleci/config.yml | 4 +--- .github/workflows/test-litellm-matrix.yml | 2 +- .github/workflows/test-litellm.yml | 4 +--- .github/workflows/test-mcp.yml | 4 +--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 09db37fb8c..188b02c9f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,9 +21,7 @@ commands: - run: name: "Install local version of litellm-enterprise" command: | - cd enterprise - python -m pip install --force-reinstall --no-deps -e . - cd .. + pip install --force-reinstall --no-deps -e enterprise/ setup_litellm_test_deps: steps: - checkout diff --git a/.github/workflows/test-litellm-matrix.yml b/.github/workflows/test-litellm-matrix.yml index 21e0f9d29f..e57168dd55 100644 --- a/.github/workflows/test-litellm-matrix.yml +++ b/.github/workflows/test-litellm-matrix.yml @@ -100,7 +100,7 @@ jobs: - name: Setup litellm-enterprise run: | - cd enterprise && poetry run pip install --force-reinstall --no-deps -e . && cd .. + poetry run pip install --force-reinstall --no-deps -e enterprise/ - name: Generate Prisma client run: | diff --git a/.github/workflows/test-litellm.yml b/.github/workflows/test-litellm.yml index b3db62f0a9..cf6928897b 100644 --- a/.github/workflows/test-litellm.yml +++ b/.github/workflows/test-litellm.yml @@ -42,9 +42,7 @@ jobs: poetry run pip install "openapi-core" - name: Setup litellm-enterprise as local package run: | - cd enterprise - poetry run pip install --force-reinstall --no-deps -e . - cd .. + poetry run pip install --force-reinstall --no-deps -e enterprise/ - name: Run tests run: | poetry run pytest tests/test_litellm --tb=short -vv --maxfail=10 -n 4 --durations=50 diff --git a/.github/workflows/test-mcp.yml b/.github/workflows/test-mcp.yml index 1c1cc82cde..2e32aae768 100644 --- a/.github/workflows/test-mcp.yml +++ b/.github/workflows/test-mcp.yml @@ -40,9 +40,7 @@ jobs: - name: Setup litellm-enterprise as local package run: | - cd enterprise - python -m pip install --force-reinstall --no-deps -e . - cd .. + poetry run pip install --force-reinstall --no-deps -e enterprise/ - name: Run MCP tests run: |