From 3f6c0090c0fee3cf2d6328889e3a31bbc6c4a714 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Thu, 14 May 2026 13:43:45 -0700 Subject: [PATCH] chore(ci): remove unused GitHub Actions workflows and orphan files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Audit of .github/workflows/ via gh run history shows the following have either never run or have been dormant for 10+ weeks. CI coverage that still matters is preserved on CircleCI (e.g. llm_translation_testing). Removed workflows: - test-litellm.yml — workflow_dispatch only, last run 2026-02-12 (cancelled); CCI local_testing_part1/2 covers the same tests - llm-translation-testing.yml — last run 2025-07-10; replaced by CCI llm_translation_testing job (run_llm_translation_tests.py kept for the make test-llm-translation target) - run_observatory_tests.yml — last run 2026-03-03 (cancelled) - scan_duplicate_issues.yml — last run 2026-03-02 (failure) - publish_to_pypi.yml — never run - read_pyproject_version.yml — fires on every push to main but its echoed version output is not consumed by any downstream step Removed orphan files (no callers in workflows, CCI, or Makefile): - .github/workflows/README.md — documented only publish_to_pypi.yml - .github/workflows/update_release.py + results_stats.csv - .github/actions/helm-oci-chart-releaser/ --- .../helm-oci-chart-releaser/action.yml | 94 ------- .github/workflows/README.md | 35 --- .github/workflows/llm-translation-testing.yml | 92 ------- .github/workflows/publish_to_pypi.yml | 153 ------------ .github/workflows/read_pyproject_version.yml | 28 --- .github/workflows/results_stats.csv | 27 --- .github/workflows/run_observatory_tests.yml | 229 ------------------ .github/workflows/scan_duplicate_issues.yml | 48 ---- .github/workflows/test-litellm.yml | 45 ---- .github/workflows/update_release.py | 54 ----- 10 files changed, 805 deletions(-) delete mode 100644 .github/actions/helm-oci-chart-releaser/action.yml delete mode 100644 .github/workflows/README.md delete mode 100644 .github/workflows/llm-translation-testing.yml delete mode 100644 .github/workflows/publish_to_pypi.yml delete mode 100644 .github/workflows/read_pyproject_version.yml delete mode 100644 .github/workflows/results_stats.csv delete mode 100644 .github/workflows/run_observatory_tests.yml delete mode 100644 .github/workflows/scan_duplicate_issues.yml delete mode 100644 .github/workflows/test-litellm.yml delete mode 100644 .github/workflows/update_release.py diff --git a/.github/actions/helm-oci-chart-releaser/action.yml b/.github/actions/helm-oci-chart-releaser/action.yml deleted file mode 100644 index 454c591d43..0000000000 --- a/.github/actions/helm-oci-chart-releaser/action.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: Helm OCI Chart Releaser -description: Push Helm charts to OCI-based (Docker) registries -author: sergeyshaykhullin -branding: - color: yellow - icon: upload-cloud -inputs: - name: - required: true - description: Chart name - repository: - required: true - description: Chart repository name - tag: - required: true - description: Chart version - app_version: - required: true - description: App version - path: - required: false - description: Chart path (Default 'charts/{name}') - registry: - required: true - description: OCI registry - registry_username: - required: true - description: OCI registry username - registry_password: - required: true - description: OCI registry password - update_dependencies: - required: false - default: 'false' - description: Update chart dependencies before packaging (Default 'false') -outputs: - image: - value: ${{ steps.output.outputs.image }} - description: Chart image (Default '{registry}/{repository}/{image}:{tag}') -runs: - using: composite - steps: - - name: Helm | Setup - uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 - with: - version: v3.20.0 - - - name: Helm | Login - shell: bash - env: - REGISTRY_PASSWORD: ${{ inputs.registry_password }} - REGISTRY_USERNAME: ${{ inputs.registry_username }} - REGISTRY: ${{ inputs.registry }} - run: echo "$REGISTRY_PASSWORD" | helm registry login -u "$REGISTRY_USERNAME" --password-stdin "$REGISTRY" - - - name: Helm | Dependency - if: inputs.update_dependencies == 'true' - shell: bash - env: - CHART_PATH: ${{ inputs.path == null && format('{0}/{1}', 'charts', inputs.name) || inputs.path }} - run: helm dependency update "$CHART_PATH" - - - name: Helm | Package - shell: bash - env: - CHART_PATH: ${{ inputs.path == null && format('{0}/{1}', 'charts', inputs.name) || inputs.path }} - TAG: ${{ inputs.tag }} - APP_VERSION: ${{ inputs.app_version }} - run: helm package "$CHART_PATH" --version "$TAG" --app-version "$APP_VERSION" - - - name: Helm | Push - shell: bash - env: - NAME: ${{ inputs.name }} - TAG: ${{ inputs.tag }} - REGISTRY: ${{ inputs.registry }} - REPOSITORY: ${{ inputs.repository }} - run: helm push "${NAME}-${TAG}.tgz" "oci://${REGISTRY}/${REPOSITORY}" - - - name: Helm | Logout - shell: bash - env: - REGISTRY: ${{ inputs.registry }} - run: helm registry logout "$REGISTRY" - - - name: Helm | Output - id: output - shell: bash - env: - REGISTRY: ${{ inputs.registry }} - REPOSITORY: ${{ inputs.repository }} - NAME: ${{ inputs.name }} - TAG: ${{ inputs.tag }} - run: echo "image=${REGISTRY}/${REPOSITORY}/${NAME}:${TAG}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index b4e777969d..0000000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Simple PyPI Publishing - -A GitHub workflow to manually publish LiteLLM packages to PyPI with a specified version. - -## How to Use - -1. Go to the **Actions** tab in the GitHub repository -2. Select **Simple PyPI Publish** from the workflow list -3. Click **Run workflow** -4. Enter the version to publish (e.g., `1.74.10`) - -## What the Workflow Does - -1. **Updates** the version in `pyproject.toml` -2. **Copies** the model prices backup file -3. **Builds** the Python package -4. **Publishes** to PyPI - -## Prerequisites - -Make sure the following secret is configured in the repository: -- `PYPI_PUBLISH_PASSWORD`: PyPI API token for authentication - -## Example Usage - -- Version: `1.74.11` → Publishes as v1.74.11 -- Version: `1.74.10-hotfix1` → Publishes as v1.74.10-hotfix1 - -## Features - -- ✅ Manual trigger with version input -- ✅ Automatic version updates in `pyproject.toml` -- ✅ Repository safety check (only runs on official repo) -- ✅ Clean package building and publishing -- ✅ Success confirmation with PyPI package link \ No newline at end of file diff --git a/.github/workflows/llm-translation-testing.yml b/.github/workflows/llm-translation-testing.yml deleted file mode 100644 index 8d9d52f4e5..0000000000 --- a/.github/workflows/llm-translation-testing.yml +++ /dev/null @@ -1,92 +0,0 @@ -name: LLM Translation Tests - -on: - workflow_dispatch: - inputs: - release_candidate_tag: - description: "Release candidate tag/version" - required: true - type: string - push: - tags: - - "v*-rc*" # Triggers on release candidate tags like v1.0.0-rc1 - -permissions: - contents: read - -jobs: - run-llm-translation-tests: - runs-on: ubuntu-latest - timeout-minutes: 90 - - steps: - - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - with: - persist-credentials: false - ref: ${{ github.event.inputs.release_candidate_tag || github.ref }} - - - name: Set up Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: "3.12" - - - name: Set up uv - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 - with: - version: "0.10.9" - enable-cache: false - - - name: Restore uv dependencies cache - uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 - with: - path: | - ~/.cache/uv - .venv - key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }} - restore-keys: | - ${{ runner.os }}-uv- - - - name: Install dependencies - run: | - uv sync --frozen - - - name: Create test results directory - run: mkdir -p test-results - - - name: Run LLM Translation Tests - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} - GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} - AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }} - AZURE_API_BASE: ${{ secrets.AZURE_API_BASE }} - AZURE_API_VERSION: ${{ secrets.AZURE_API_VERSION }} - RC_TAG: ${{ github.event.inputs.release_candidate_tag || github.ref_name }} - COMMIT_SHA: ${{ github.sha }} - run: | - python .github/workflows/run_llm_translation_tests.py \ - --tag "$RC_TAG" \ - --commit "$COMMIT_SHA" \ - || true # Continue even if tests fail - - - name: Display test summary - if: always() - run: | - if [ -f "test-results/llm_translation_report.md" ]; then - echo "Test report generated successfully!" - echo "Artifact will contain:" - echo "- test-results/junit.xml (JUnit XML results)" - echo "- test-results/llm_translation_report.md (Beautiful markdown report)" - else - echo "Warning: Test report was not generated" - fi - - - name: Upload test artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: always() - with: - name: LLM-Translation-Artifact-${{ github.event.inputs.release_candidate_tag || github.ref_name }} - path: test-results/ - retention-days: 30 diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml deleted file mode 100644 index d60254a0ac..0000000000 --- a/.github/workflows/publish_to_pypi.yml +++ /dev/null @@ -1,153 +0,0 @@ -name: Publish to PyPI - -on: - workflow_dispatch: - -jobs: - preflight-checks: - name: Preflight Checks - runs-on: ubuntu-latest - timeout-minutes: 10 - permissions: - contents: read - # No environment — read-only checks, no approval needed - outputs: - needs_publish: ${{ steps.check-litellm.outputs.needs_publish }} - version: ${{ steps.check-litellm.outputs.version }} - - steps: - - name: Checkout repo - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - - - name: Set up Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: "3.12" - - - name: Set up uv - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 - with: - version: "0.10.9" - enable-cache: false - - - name: Check litellm version on PyPI - id: check-litellm - run: | - VERSION=$(python - <<'PY' - import tomllib - - with open("pyproject.toml", "rb") as f: - print(tomllib.load(f)["project"]["version"]) - PY - ) - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - echo "Checking if litellm $VERSION exists on PyPI..." - - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/litellm/$VERSION/json") - if [ "$HTTP_STATUS" = "200" ]; then - echo "litellm $VERSION already exists on PyPI. Skipping publish." - echo "needs_publish=false" >> "$GITHUB_OUTPUT" - else - echo "litellm $VERSION not found on PyPI. Publish needed." - echo "needs_publish=true" >> "$GITHUB_OUTPUT" - fi - - - name: Sanity check proxy-extras version - run: | - # Read pinned version from project optional dependencies - PYPROJECT_VERSION=$(python3 - <<'PY' - import sys - import tomllib - - with open("pyproject.toml", "rb") as f: - proxy_requirements = tomllib.load(f)["project"]["optional-dependencies"]["proxy"] - - version = None - for requirement in proxy_requirements: - normalized = requirement.split(";", 1)[0].strip() - if not normalized.startswith("litellm-proxy-extras"): - continue - parts = normalized.split("==", 1) - if len(parts) == 2 and parts[0].strip() == "litellm-proxy-extras": - candidate = parts[1].strip() - if candidate: - version = candidate - break - - if version is None: - print( - "::error::Could not find an exact litellm-proxy-extras pin in project.optional-dependencies.proxy", - file=sys.stderr, - ) - sys.exit(1) - - print(version) - PY - ) - echo "pyproject.toml pins litellm-proxy-extras version: $PYPROJECT_VERSION" - - # Check that the pinned version exists on PyPI - echo "Checking if litellm-proxy-extras $PYPROJECT_VERSION exists on PyPI..." - HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/litellm-proxy-extras/$PYPROJECT_VERSION/json") - if [ "$HTTP_STATUS" != "200" ]; then - echo "::error::litellm-proxy-extras $PYPROJECT_VERSION is not published on PyPI yet. Publish it before releasing litellm." - exit 1 - fi - echo "litellm-proxy-extras $PYPROJECT_VERSION exists on PyPI. Sanity check passed." - - publish-litellm: - name: Publish litellm to PyPI - needs: preflight-checks - if: needs.preflight-checks.outputs.needs_publish == 'true' - runs-on: ubuntu-latest - timeout-minutes: 10 - permissions: - id-token: write - contents: read - environment: pypi-publish - - steps: - - name: Checkout repo - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - - - name: Set up Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: "3.12" - - - name: Set up uv - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 - with: - version: "0.10.9" - enable-cache: false - - - name: Copy model prices backup - run: cp model_prices_and_context_window.json litellm/model_prices_and_context_window_backup.json - - - name: Build package - run: | - rm -rf build dist - uv build - - - name: Verify build artifacts - env: - EXPECTED_VERSION: ${{ needs.preflight-checks.outputs.version }} - run: | - echo "Contents of dist/:" - ls -la dist/ - # Ensure we have both sdist and wheel - ls dist/*.tar.gz - ls dist/*.whl - # Verify built version matches expected - ls dist/ | grep -q "litellm-${EXPECTED_VERSION}" || { - echo "::error::Built artifacts do not match expected version $EXPECTED_VERSION" - ls dist/ - exit 1 - } - - - name: Validate package metadata - run: | - uv tool run --from 'twine==6.2.0' twine check dist/* - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 diff --git a/.github/workflows/read_pyproject_version.yml b/.github/workflows/read_pyproject_version.yml deleted file mode 100644 index 04b4a38ce1..0000000000 --- a/.github/workflows/read_pyproject_version.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Read Version from pyproject.toml - -on: - push: - branches: - - main # Change this to the default branch of your repository - -permissions: - contents: read - -jobs: - read-version: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - with: - persist-credentials: false - - - name: Read version from pyproject.toml - id: read-version - run: | - version=$(grep -m1 '^version' pyproject.toml | sed 's/version = "\(.*\)"/\1/') - printf "LITELLM_VERSION=%s" "$version" >> $GITHUB_ENV - - - name: Display version - run: echo "Current version is $LITELLM_VERSION" diff --git a/.github/workflows/results_stats.csv b/.github/workflows/results_stats.csv deleted file mode 100644 index bcef047b0f..0000000000 --- a/.github/workflows/results_stats.csv +++ /dev/null @@ -1,27 +0,0 @@ -Date,"Ben -Ashley",Tom Brooks,Jimmy Cooney,"Sue -Daniels",Berlinda Fong,Terry Jones,Angelina Little,Linda Smith -10/1,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE -10/2,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/3,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/4,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/5,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/6,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/7,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/8,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/9,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/10,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/11,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/12,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/13,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/14,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/15,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/16,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/17,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/18,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/19,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/20,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/21,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/22,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -10/23,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE -Total,0,1,1,1,1,1,0,1 \ No newline at end of file diff --git a/.github/workflows/run_observatory_tests.yml b/.github/workflows/run_observatory_tests.yml deleted file mode 100644 index a25b96766d..0000000000 --- a/.github/workflows/run_observatory_tests.yml +++ /dev/null @@ -1,229 +0,0 @@ -name: Run Observatory Tests -on: - workflow_dispatch: - inputs: - tag: - description: "Docker image tag to test (e.g. v1.61.0.rc1)" - required: true - type: string - commit_hash: - description: "Commit hash (defaults to HEAD of current branch)" - required: false - type: string - workflow_call: - inputs: - tag: - description: "Docker image tag to test" - required: true - type: string - commit_hash: - description: "Commit hash of the release" - required: true - type: string - -permissions: - contents: read - -env: - LITELLM_MASTER_KEY: ${{ secrets.LITELLM_MASTER_KEY_STAGING }} - -jobs: - observatory-tests: - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - name: Checkout repository - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - with: - persist-credentials: false - - - name: Validate tag input - env: - TAG: ${{ inputs.tag }} - run: | - if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then - echo "Invalid tag format: $TAG (expected vX.Y.Z...)" - exit 1 - fi - - - name: Start LiteLLM container - env: - TAG: ${{ inputs.tag }} - AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }} - AZURE_API_BASE: ${{ secrets.AZURE_API_BASE }} - WORKSPACE: ${{ github.workspace }} - run: | - docker run -d \ - --name litellm-rc \ - -p 4000:4000 \ - -v "${WORKSPACE}/.github/observatory/litellm_config.yaml:/app/config.yaml" \ - -e LITELLM_MASTER_KEY="${LITELLM_MASTER_KEY}" \ - -e AZURE_API_KEY="${AZURE_API_KEY}" \ - -e AZURE_API_BASE="${AZURE_API_BASE}" \ - "litellm/litellm:${TAG}" \ - --config /app/config.yaml --port 4000 - - - name: Wait for LiteLLM health check - run: | - echo "Waiting for LiteLLM to be ready..." - for i in $(seq 1 30); do - if curl -s -f http://localhost:4000/health/liveliness > /dev/null 2>&1; then - echo "LiteLLM is healthy" - exit 0 - fi - echo "Attempt $i/30 - not ready yet, waiting 10s..." - sleep 10 - done - echo "LiteLLM failed to start within 5 minutes" - docker logs litellm-rc - exit 1 - - - name: Start cloudflared tunnel - run: | - # Install cloudflared (pinned version + checksum) - curl -sL https://github.com/cloudflare/cloudflared/releases/download/2025.2.1/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared - echo "afdfadd1ef552e66bffc35246fe30a9bd578356d2d386de95585ccfc432472b8 /usr/local/bin/cloudflared" | sha256sum -c - - chmod +x /usr/local/bin/cloudflared - - # Start a quick tunnel (no account needed) and capture the URL - cloudflared tunnel --url http://localhost:4000 --no-autoupdate > /tmp/cloudflared.log 2>&1 & - CLOUDFLARED_PID=$! - echo "CLOUDFLARED_PID=$CLOUDFLARED_PID" >> $GITHUB_ENV - - # Wait for tunnel URL to appear in logs - echo "Waiting for tunnel URL..." - for i in $(seq 1 30); do - TUNNEL_URL=$(grep -oP 'https://[a-z0-9-]+\.trycloudflare\.com' /tmp/cloudflared.log | head -1 || true) - if [ -n "$TUNNEL_URL" ]; then - echo "Tunnel URL: $TUNNEL_URL" - echo "TUNNEL_URL=$TUNNEL_URL" >> $GITHUB_ENV - exit 0 - fi - sleep 2 - done - echo "Failed to get tunnel URL" - cat /tmp/cloudflared.log - exit 1 - - - name: Verify tunnel connectivity - run: | - echo "Testing tunnel at ${TUNNEL_URL}..." - # Quick tunnels need time for DNS propagation; retry to avoid - # transient NXDOMAIN (curl exit code 6) on first attempt. - for i in $(seq 1 10); do - if curl -sf "${TUNNEL_URL}/health/liveliness" > /dev/null 2>&1; then - echo "Tunnel is working (attempt $i)" - exit 0 - fi - echo "Attempt $i/10 - tunnel not routable yet, waiting 5s..." - sleep 5 - done - echo "Tunnel failed to become reachable after 50s" - cat /tmp/cloudflared.log - exit 1 - - - name: Trigger observatory test run - id: trigger - env: - OBSERVATORY_URL: ${{ secrets.OBSERVATORY_URL }} - OBSERVATORY_API_KEY: ${{ secrets.OBSERVATORY_API_KEY }} - run: | - PAYLOAD=$(jq -n \ - --arg url "${TUNNEL_URL}" \ - --arg key "${LITELLM_MASTER_KEY}" \ - '{ - deployment_url: $url, - api_key: $key, - test_suite: "TestOAIAzureRelease", - models: ["gpt-4o-mini", "gpt-4o"] - }') - RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "${OBSERVATORY_URL}/run-test" \ - -H "Content-Type: application/json" \ - -H "X-LiteLLM-Observatory-API-Key: ${OBSERVATORY_API_KEY}" \ - -d "$PAYLOAD") - HTTP_CODE=$(echo "$RESPONSE" | tail -1) - BODY=$(echo "$RESPONSE" | head -n -1) - echo "Response ($HTTP_CODE): $BODY" - if [ "$HTTP_CODE" -ge 400 ]; then - echo "Failed to trigger test run" - exit 1 - fi - - # Extract request_id for polling this specific run - REQUEST_ID=$(echo "$BODY" | jq -r '.results.request_id') - if [ -z "$REQUEST_ID" ] || [ "$REQUEST_ID" = "null" ]; then - echo "Failed to extract request_id from response" - exit 1 - fi - echo "Request ID: $REQUEST_ID" - echo "request_id=$REQUEST_ID" >> $GITHUB_OUTPUT - - - name: Poll for test completion - id: poll - env: - OBSERVATORY_URL: ${{ secrets.OBSERVATORY_URL }} - OBSERVATORY_API_KEY: ${{ secrets.OBSERVATORY_API_KEY }} - REQUEST_ID: ${{ steps.trigger.outputs.request_id }} - run: | - TIMEOUT=900 # 15 minutes - INTERVAL=30 - ELAPSED=0 - while [ $ELAPSED -lt $TIMEOUT ]; do - STATUS=$(curl -s "${OBSERVATORY_URL}/run-status/${REQUEST_ID}" \ - -H "X-LiteLLM-Observatory-API-Key: ${OBSERVATORY_API_KEY}") - RUN_STATUS=$(echo "$STATUS" | jq -r '.status') - echo "Run status (${ELAPSED}s elapsed): $RUN_STATUS" - - if [ "$RUN_STATUS" = "completed" ] || [ "$RUN_STATUS" = "failed" ]; then - echo "Test finished with status: $RUN_STATUS" - echo "$STATUS" > /tmp/observatory_result.json - exit 0 - fi - - sleep $INTERVAL - ELAPSED=$((ELAPSED + INTERVAL)) - done - echo "Timed out waiting for test to complete after ${TIMEOUT}s" - exit 1 - - - name: Verify test results - run: | - RESULT=$(cat /tmp/observatory_result.json) - echo "Full result: $RESULT" - - STATUS=$(echo "$RESULT" | jq -r '.status') - TEST_PASSED=$(echo "$RESULT" | jq -r '.result.test_passed // false') - FAILURE_RATE=$(echo "$RESULT" | jq -r '.result.failure_rate // "N/A"') - ERROR=$(echo "$RESULT" | jq -r '.error // empty') - - echo "Status: $STATUS" - echo "Test passed: $TEST_PASSED" - echo "Failure rate: $FAILURE_RATE" - - if [ -n "$ERROR" ]; then - echo "Error: $ERROR" - fi - - if [ "$STATUS" = "failed" ]; then - echo "Test run failed" - exit 1 - fi - - if [ "$TEST_PASSED" != "true" ]; then - echo "Tests did not pass (failure rate: $FAILURE_RATE)" - exit 1 - fi - - echo "All tests passed!" - - - name: Print LiteLLM logs on failure - if: failure() - run: | - docker logs litellm-rc 2>/dev/null || true - cat /tmp/cloudflared.log 2>/dev/null || true - - - name: Cleanup - if: always() - run: | - kill "$CLOUDFLARED_PID" 2>/dev/null || true - docker rm -f litellm-rc 2>/dev/null || true diff --git a/.github/workflows/scan_duplicate_issues.yml b/.github/workflows/scan_duplicate_issues.yml deleted file mode 100644 index ab0ac2aa3a..0000000000 --- a/.github/workflows/scan_duplicate_issues.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Scan Duplicate Issues (One-Time) - -on: - workflow_dispatch: - inputs: - threshold: - description: "Similarity threshold (0-1)" - required: false - default: "0.85" - close: - description: "Actually close duplicates (false = dry run)" - required: false - type: boolean - default: false - -jobs: - scan: - runs-on: ubuntu-latest - permissions: - issues: write - contents: read - steps: - - name: Checkout scripts - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - with: - sparse-checkout: .github/scripts - persist-credentials: false - - - name: Set up Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: "3.12" - - - name: Scan for duplicate issues - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - INPUT_THRESHOLD: ${{ inputs.threshold }} - INPUT_CLOSE: ${{ inputs.close }} - run: | - CLOSE_FLAG="" - if [ "$INPUT_CLOSE" = "true" ]; then - CLOSE_FLAG="--close" - fi - python3 .github/scripts/close_duplicate_issues.py \ - --scan \ - --repo ${{ github.repository }} \ - --threshold "$INPUT_THRESHOLD" \ - $CLOSE_FLAG diff --git a/.github/workflows/test-litellm.yml b/.github/workflows/test-litellm.yml deleted file mode 100644 index 938647f5d0..0000000000 --- a/.github/workflows/test-litellm.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: LiteLLM Mock Tests (folder - tests/test_litellm) - -# DEPRECATED: This workflow is replaced by test-litellm-matrix.yml which runs -# the same tests in parallel across 10 jobs for faster CI times. -# Kept for manual debugging only. -on: - workflow_dispatch: # Manual trigger only - # pull_request: - # branches: [ main ] - -permissions: - contents: read - -jobs: - test: - runs-on: ubuntu-latest - timeout-minutes: 25 - - steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - with: - persist-credentials: false - - - name: Thank You Message - run: | - echo "### 🙏 Thank you for contributing to LiteLLM!" >> $GITHUB_STEP_SUMMARY - echo "Your PR is being tested now. We appreciate your help in making LiteLLM better!" >> $GITHUB_STEP_SUMMARY - - - name: Set up Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: "3.12" - - - name: Set up uv - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 - with: - version: "0.10.9" - - - name: Install dependencies - run: | - uv lock --check - uv sync --frozen --group ci --group proxy-dev --extra google --extra proxy --extra semantic-router - - name: Run tests - run: | - uv run --no-sync pytest tests/test_litellm --tb=short -vv --maxfail=10 -n 4 --durations=50 diff --git a/.github/workflows/update_release.py b/.github/workflows/update_release.py deleted file mode 100644 index f70509e8e7..0000000000 --- a/.github/workflows/update_release.py +++ /dev/null @@ -1,54 +0,0 @@ -import os -import requests -from datetime import datetime - -# GitHub API endpoints -GITHUB_API_URL = "https://api.github.com" -REPO_OWNER = "BerriAI" -REPO_NAME = "litellm" - -# GitHub personal access token (required for uploading release assets) -GITHUB_ACCESS_TOKEN = os.environ.get("GITHUB_ACCESS_TOKEN") - -# Headers for GitHub API requests -headers = { - "Accept": "application/vnd.github+json", - "Authorization": f"Bearer {GITHUB_ACCESS_TOKEN}", - "X-GitHub-Api-Version": "2022-11-28", -} - -# Get the latest release -releases_url = f"{GITHUB_API_URL}/repos/{REPO_OWNER}/{REPO_NAME}/releases/latest" -response = requests.get(releases_url, headers=headers) -latest_release = response.json() -print("Latest release:", latest_release) - -# Upload an asset to the latest release -upload_url = latest_release["upload_url"].split("{?")[0] -asset_name = "results_stats.csv" -asset_path = os.path.join(os.getcwd(), asset_name) -print("upload_url:", upload_url) - -with open(asset_path, "rb") as asset_file: - asset_data = asset_file.read() - -upload_payload = { - "name": asset_name, - "label": "Load test results", - "created_at": datetime.utcnow().isoformat() + "Z", -} - -upload_headers = headers.copy() -upload_headers["Content-Type"] = "application/octet-stream" - -upload_response = requests.post( - upload_url, - headers=upload_headers, - data=asset_data, - params=upload_payload, -) - -if upload_response.status_code == 201: - print(f"Asset '{asset_name}' uploaded successfully to the latest release.") -else: - print(f"Failed to upload asset. Response: {upload_response.text}")