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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(e2e): move Admin UI Playwright suite to tests/e2e/ui (#34196)
ryan-crabbe-berri0fcaadf11ca1
diff --git a/.circleci/config.yml b/.circleci/config.ymlindex b0a705966a2..2f01b6de4f3 100644--- a/.circleci/config.yml+++ b/.circleci/config.yml@@ -2731,7 +2731,7 @@ jobs:- ~/.cache/uv- restore_cache:keys:- - ui-e2e-node-deps-v2-{{ checksum "ui/litellm-dashboard/package-lock.json" }}+ - ui-e2e-node-deps-v3-{{ checksum "ui/litellm-dashboard/package-lock.json" }}-{{ checksum "tests/e2e/ui/package-lock.json" }}- run:name: Install Node dependencies and Playwright# The cimg/python:3.12-browsers image already ships the Chromium system@@ -2742,11 +2742,14 @@ jobs:command: |cd ui/litellm-dashboardnpm ci+ cd ../../tests/e2e/ui+ npm cinpx playwright install chromium- save_cache:- key: ui-e2e-node-deps-v2-{{ checksum "ui/litellm-dashboard/package-lock.json" }}+ key: ui-e2e-node-deps-v3-{{ checksum "ui/litellm-dashboard/package-lock.json" }}-{{ checksum "tests/e2e/ui/package-lock.json" }}paths:- ui/litellm-dashboard/node_modules+ - tests/e2e/ui/node_modules- ~/.cache/ms-playwright- run:name: Build UI from source@@ -2777,10 +2780,10 @@ jobs:name: Seed databasecommand: |PGPASSWORD=e2epassword psql -h localhost -p 5432 -U e2euser -d litellm_e2e \- -f ui/litellm-dashboard/e2e_tests/fixtures/seed.sql+ -f tests/e2e/ui/fixtures/seed.sql- run:name: Start mock LLM server- command: uv run --no-sync python ui/litellm-dashboard/e2e_tests/fixtures/mock_llm_server/server.py+ command: uv run --no-sync python tests/e2e/ui/fixtures/mock_llm_server/server.pybackground: true- run:name: Start LiteLLM proxy@@ -2798,7 +2801,7 @@ jobs:command: |LITELLM_LICENSE="$LITELLM_LICENSE" \uv run --no-sync python -m litellm.proxy.proxy_cli \- --config ui/litellm-dashboard/e2e_tests/fixtures/config.yml \+ --config tests/e2e/ui/fixtures/config.yml \--port 4000background: true- run:@@ -2819,15 +2822,15 @@ jobs:# Forward LITELLM_LICENSE so license.spec.ts can detect that the# proxy was launched with a license and assert premium_user=true.command: |- cd ui/litellm-dashboard+ cd tests/e2e/uiLITELLM_LICENSE="$LITELLM_LICENSE" \- npx playwright test --config e2e_tests/playwright.config.ts+ npx playwright test --config playwright.config.tsno_output_timeout: 10m- store_artifacts:- path: ui/litellm-dashboard/test-results+ path: tests/e2e/ui/test-resultsdestination: e2e-test-results- store_artifacts:- path: ui/litellm-dashboard/playwright-report+ path: tests/e2e/ui/playwright-reportdestination: e2e-playwright-reporte2e_ui_testing_server_root_path:@@ -2870,17 +2873,20 @@ jobs:- ~/.cache/uv- restore_cache:keys:- - ui-e2e-node-deps-v2-{{ checksum "ui/litellm-dashboard/package-lock.json" }}+ - ui-e2e-node-deps-v3-{{ checksum "ui/litellm-dashboard/package-lock.json" }}-{{ checksum "tests/e2e/ui/package-lock.json" }}- run:name: Install Node dependencies and Playwrightcommand: |cd ui/litellm-dashboardnpm ci+ cd ../../tests/e2e/ui+ npm cinpx playwright install chromium- save_cache:- key: ui-e2e-node-deps-v2-{{ checksum "ui/litellm-dashboard/package-lock.json" }}+ key: ui-e2e-node-deps-v3-{{ checksum "ui/litellm-dashboard/package-lock.json" }}-{{ checksum "tests/e2e/ui/package-lock.json" }}paths:- ui/litellm-dashboard/node_modules+ - tests/e2e/ui/node_modules- ~/.cache/ms-playwright- run:name: Build UI from source@@ -2902,10 +2908,10 @@ jobs:name: Seed databasecommand: |PGPASSWORD=e2epassword psql -h localhost -p 5432 -U e2euser -d litellm_e2e \- -f ui/litellm-dashboard/e2e_tests/fixtures/seed.sql+ -f tests/e2e/ui/fixtures/seed.sql- run:name: Start mock LLM server- command: uv run --no-sync python ui/litellm-dashboard/e2e_tests/fixtures/mock_llm_server/server.py+ command: uv run --no-sync python tests/e2e/ui/fixtures/mock_llm_server/server.pybackground: true- run:name: Start LiteLLM proxy under a server root path@@ -2918,7 +2924,7 @@ jobs:command: |LITELLM_LICENSE="$LITELLM_LICENSE" \uv run --no-sync python -m litellm.proxy.proxy_cli \- --config ui/litellm-dashboard/e2e_tests/fixtures/config.yml \+ --config tests/e2e/ui/fixtures/config.yml \--port 4000background: true- run:@@ -2937,15 +2943,15 @@ jobs:- run:name: Run migration smoke under SERVER_ROOT_PATHcommand: |- cd ui/litellm-dashboard+ cd tests/e2e/uiLITELLM_LICENSE="$LITELLM_LICENSE" \- npx playwright test --config e2e_tests/migration.serverRootPath.config.ts+ npx playwright test --config migration.serverRootPath.config.tsno_output_timeout: 10m- store_artifacts:- path: ui/litellm-dashboard/test-results+ path: tests/e2e/ui/test-resultsdestination: e2e-server-root-path-test-results- store_artifacts:- path: ui/litellm-dashboard/playwright-report+ path: tests/e2e/ui/playwright-reportdestination: e2e-server-root-path-playwright-reportbuild_docker_database_image:diff --git a/.circleci/scripts/classify_changes.sh b/.circleci/scripts/classify_changes.shindex 2c15428be6a..2ca2654a207 100755--- a/.circleci/scripts/classify_changes.sh+++ b/.circleci/scripts/classify_changes.sh@@ -8,7 +8,7 @@ has_backend=falsewhile IFS= read -r file || [ -n "$file" ]; do[ -n "$file" ] || continuecase "$file" in- ui/*) has_client=true ;;+ ui/* | tests/e2e/ui/*) has_client=true ;;docs/* | *.md | *.mdx) : ;;*) has_backend=true ;;esacdiff --git a/.github/workflows/test_server_root_path.yml b/.github/workflows/test_server_root_path.ymlindex f59cee29893..01f70511e79 100644--- a/.github/workflows/test_server_root_path.yml+++ b/.github/workflows/test_server_root_path.yml@@ -106,8 +106,8 @@ jobs:with:node-version: "20"- - name: Install UI deps and Chromium- working-directory: ui/litellm-dashboard+ - name: Install e2e deps and Chromium+ working-directory: tests/e2e/uirun: |retry() {local attempt=1@@ -131,17 +131,17 @@ jobs:retry npx playwright install --with-deps chromium- name: Run SERVER_ROOT_PATH redirect e2e- working-directory: ui/litellm-dashboard+ working-directory: tests/e2e/uienv:SERVER_ROOT_PATH: ${{ matrix.root_path }}- run: npx playwright test --config=e2e_tests/serverRootPath.config.ts+ run: npx playwright test --config=serverRootPath.config.ts- name: Upload Playwright artifacts on failureif: failure()uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2with:name: playwright-trace-${{ strategy.job-index }}- path: ui/litellm-dashboard/test-results/+ path: tests/e2e/ui/test-results/retention-days: 7- name: Cleanupdiff --git a/pyrightconfig.json b/pyrightconfig.jsonindex eabfbf515c4..2686ccd73d9 100644--- a/pyrightconfig.json+++ b/pyrightconfig.json@@ -1,7 +1,7 @@{"include": ["litellm"],"ignore": [],- "exclude": ["**/node_modules", "**/__pycache__", "tests/e2e/claude_code", "litellm/types/utils.py", "litellm/proxy/_types.py"],+ "exclude": ["**/node_modules", "**/__pycache__", "tests/e2e/claude_code", "tests/e2e/ui", "litellm/types/utils.py", "litellm/proxy/_types.py"],"pythonVersion": "3.12","typeCheckingMode": "strict","enableTypeIgnoreComments": false,diff --git a/tests/e2e/CLAUDE.md b/tests/e2e/CLAUDE.mdindex 186517290ea..0e39664e358 100644--- a/tests/e2e/CLAUDE.md+++ b/tests/e2e/CLAUDE.md@@ -22,6 +22,7 @@ Each subdirectory under `tests/e2e/` is one suite, scoped to an endpoint family- `other/` - the holding-pen suite for the `other.*` registry cluster with no home of its own yet: the master-key auth gate and the process-lifecycle health probes (liveness, public readiness, authenticated readiness diagnostics). Promote a cluster out once it is large/stable enough for its own suite- `gateway/` - proxy configuration only (`litellm-config.yml`); no tests- `claude_code/` - the Claude Code compatibility matrix: drives the real `claude` CLI (and HTTP probes) against a proxy for each feature x provider cell, reporting tagged-union outcomes via the `compat_result` fixture; ships its own driver/builder/publisher plus `_*_unit_tests/` trees. The HTTP probes ride the shared transport (`ProxyClient.count_tokens` / `ProxyClient.messages`); the CLI-driving path stays bespoke+- `ui/` - the Admin UI browser suite: Playwright in TypeScript, driving the dashboard served by a live proxy on port 4000 (seeded postgres + mock LLM upstream; see its `run_e2e.sh`). It is a self-contained npm package with its own lockfile and does not use the Python harness, pytest markers, or the shared transport; the Python rules in this file (typed models, `Result` unions, basedpyright zero-error gate) do not apply inside it. Its only Python file, `fixtures/mock_llm_server/server.py`, is excluded from the e2e basedpyright gate via the root `pyrightconfig.json`## MCP suite: real Datadog onlydiff --git a/tests/e2e/load/test_session_anomaly.py b/tests/e2e/load/test_session_anomaly.pyindex 80f8aff3ba4..7062587352b 100644--- a/tests/e2e/load/test_session_anomaly.py+++ b/tests/e2e/load/test_session_anomaly.py@@ -62,7 +62,7 @@ class TestSummarizePlannedTurns:class TestRetried:def test_transient_failures_then_success_returns_the_success(self) -> None:- outcome = Success(data=SessionMessagesResponse())+ outcome = Success[SessionMessagesResponse](status_code=200, data=SessionMessagesResponse())calls = iter((NetworkError(message="overloaded"), NetworkError(message="overloaded"), outcome))@@ -88,7 +88,7 @@ class TestRetried:raise AssertionError("slept after a successful attempt")result = retried(- lambda: Success(data=SessionMessagesResponse()),+ lambda: Success[SessionMessagesResponse](status_code=200, data=SessionMessagesResponse()),attempts=3,sleep=sleep_means_retry,)diff --git a/ui/litellm-dashboard/e2e_tests/constants.ts b/tests/e2e/ui/constants.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/constants.tsrename to tests/e2e/ui/constants.tsdiff --git a/ui/litellm-dashboard/e2e_tests/fixtures/config.yml b/tests/e2e/ui/fixtures/config.ymlsimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/fixtures/config.ymlrename to tests/e2e/ui/fixtures/config.ymldiff --git a/ui/litellm-dashboard/e2e_tests/fixtures/menuMappings.ts b/tests/e2e/ui/fixtures/menuMappings.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/fixtures/menuMappings.tsrename to tests/e2e/ui/fixtures/menuMappings.tsdiff --git a/ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.ts b/tests/e2e/ui/fixtures/migratedPages.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/fixtures/migratedPages.tsrename to tests/e2e/ui/fixtures/migratedPages.tsdiff --git a/ui/litellm-dashboard/e2e_tests/fixtures/mock_llm_server/server.py b/tests/e2e/ui/fixtures/mock_llm_server/server.pysimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/fixtures/mock_llm_server/server.pyrename to tests/e2e/ui/fixtures/mock_llm_server/server.pydiff --git a/ui/litellm-dashboard/e2e_tests/fixtures/pages.ts b/tests/e2e/ui/fixtures/pages.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/fixtures/pages.tsrename to tests/e2e/ui/fixtures/pages.tsdiff --git a/ui/litellm-dashboard/e2e_tests/fixtures/roles.ts b/tests/e2e/ui/fixtures/roles.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/fixtures/roles.tsrename to tests/e2e/ui/fixtures/roles.tsdiff --git a/ui/litellm-dashboard/e2e_tests/fixtures/seed.sql b/tests/e2e/ui/fixtures/seed.sqlsimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/fixtures/seed.sqlrename to tests/e2e/ui/fixtures/seed.sqldiff --git a/ui/litellm-dashboard/e2e_tests/fixtures/users.ts b/tests/e2e/ui/fixtures/users.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/fixtures/users.tsrename to tests/e2e/ui/fixtures/users.tsdiff --git a/ui/litellm-dashboard/e2e_tests/globalSetup.ts b/tests/e2e/ui/globalSetup.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/globalSetup.tsrename to tests/e2e/ui/globalSetup.tsdiff --git a/ui/litellm-dashboard/e2e_tests/helpers/navigation.ts b/tests/e2e/ui/helpers/navigation.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/helpers/navigation.tsrename to tests/e2e/ui/helpers/navigation.tsdiff --git a/ui/litellm-dashboard/e2e_tests/migration.serverRootPath.config.ts b/tests/e2e/ui/migration.serverRootPath.config.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/migration.serverRootPath.config.tsrename to tests/e2e/ui/migration.serverRootPath.config.tsdiff --git a/ui/litellm-dashboard/e2e_tests/migration.serverRootPath.globalSetup.ts b/tests/e2e/ui/migration.serverRootPath.globalSetup.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/migration.serverRootPath.globalSetup.tsrename to tests/e2e/ui/migration.serverRootPath.globalSetup.tsdiff --git a/tests/e2e/ui/package-lock.json b/tests/e2e/ui/package-lock.jsonnew file mode 100644index 00000000000..b22673a3535--- /dev/null+++ b/tests/e2e/ui/package-lock.json@@ -0,0 +1,111 @@+{+ "name": "litellm-ui-e2e",+ "version": "0.0.0",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "litellm-ui-e2e",+ "version": "0.0.0",+ "devDependencies": {+ "@playwright/test": "1.58.1",+ "@types/node": "20.19.37",+ "typescript": "5.9.3"+ }+ },+ "node_modules/@playwright/test": {+ "version": "1.58.1",+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.1.tgz",+ "integrity": "sha512-6LdVIUERWxQMmUSSQi0I53GgCBYgM2RpGngCPY7hSeju+VrKjq3lvs7HpJoPbDiY5QM5EYRtRX5fvrinnMAz3w==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "playwright": "1.58.1"+ },+ "bin": {+ "playwright": "cli.js"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@types/node": {+ "version": "20.19.37",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz",+ "integrity": "sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "undici-types": "~6.21.0"+ }+ },+ "node_modules/fsevents": {+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"+ }+ },+ "node_modules/playwright": {+ "version": "1.58.1",+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.1.tgz",+ "integrity": "sha512-+2uTZHxSCcxjvGc5C891LrS1/NlxglGxzrC4seZiVjcYVQfUa87wBL6rTDqzGjuoWNjnBzRqKmF6zRYGMvQUaQ==",+ "dev": true,+ "license": "Apache-2.0",+ "dependencies": {+ "playwright-core": "1.58.1"+ },+ "bin": {+ "playwright": "cli.js"+ },+ "engines": {+ "node": ">=18"+ },+ "optionalDependencies": {+ "fsevents": "2.3.2"+ }+ },+ "node_modules/playwright-core": {+ "version": "1.58.1",+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.1.tgz",+ "integrity": "sha512-bcWzOaTxcW+VOOGBCQgnaKToLJ65d6AqfLVKEWvexyS3AS6rbXl+xdpYRMGSRBClPvyj44njOWoxjNdL/H9UNg==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "playwright-core": "cli.js"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/typescript": {+ "version": "5.9.3",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "tsc": "bin/tsc",+ "tsserver": "bin/tsserver"+ },+ "engines": {+ "node": ">=14.17"+ }+ },+ "node_modules/undici-types": {+ "version": "6.21.0",+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",+ "dev": true,+ "license": "MIT"+ }+ }+}diff --git a/tests/e2e/ui/package.json b/tests/e2e/ui/package.jsonnew file mode 100644index 00000000000..ede759d97cb--- /dev/null+++ b/tests/e2e/ui/package.json@@ -0,0 +1,16 @@+{+ "name": "litellm-ui-e2e",+ "version": "0.0.0",+ "private": true,+ "scripts": {+ "e2e": "playwright test --config playwright.config.ts",+ "e2e:ui": "playwright test --ui --config playwright.config.ts",+ "e2e:migration": "playwright test tests/migration/migratedPages.spec.ts --config playwright.config.ts",+ "e2e:migration:root": "playwright test --config migration.serverRootPath.config.ts"+ },+ "devDependencies": {+ "@playwright/test": "1.58.1",+ "@types/node": "20.19.37",+ "typescript": "5.9.3"+ }+}diff --git a/ui/litellm-dashboard/e2e_tests/playwright.config.ts b/tests/e2e/ui/playwright.config.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/playwright.config.tsrename to tests/e2e/ui/playwright.config.tsdiff --git a/ui/litellm-dashboard/e2e_tests/run_e2e.sh b/tests/e2e/ui/run_e2e.shsimilarity index 98%rename from ui/litellm-dashboard/e2e_tests/run_e2e.shrename to tests/e2e/ui/run_e2e.shindex ea95f18890c..858eb401c8e 100755--- a/ui/litellm-dashboard/e2e_tests/run_e2e.sh+++ b/tests/e2e/ui/run_e2e.sh@@ -20,8 +20,8 @@ set -euo pipefail# ================================================================SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"-DASHBOARD_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"+DASHBOARD_DIR="$REPO_ROOT/ui/litellm-dashboard"IS_CI="${CI:-false}"CONTAINER_NAME="litellm-e2e-postgres-$$"MOCK_PID=""@@ -187,12 +187,12 @@ PGPASSWORD="$DB_PASS" psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAM# --- Playwright ---echo "=== Installing Playwright dependencies ==="-cd "$DASHBOARD_DIR"+cd "$SCRIPT_DIR"npm install --silent 2>/dev/null || truenpx playwright install chromium --with-deps 2>/dev/null || npx playwright install chromiumecho "=== Running Playwright tests ==="-npx playwright test --config e2e_tests/playwright.config.ts "$@"+npx playwright test --config playwright.config.ts "$@"EXIT_CODE=$?exit $EXIT_CODEdiff --git a/ui/litellm-dashboard/e2e_tests/serverRootPath.config.ts b/tests/e2e/ui/serverRootPath.config.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/serverRootPath.config.tsrename to tests/e2e/ui/serverRootPath.config.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/auth/logout.spec.ts b/tests/e2e/ui/tests/auth/logout.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/auth/logout.spec.tsrename to tests/e2e/ui/tests/auth/logout.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/auth/proxyLogoutUrl.spec.ts b/tests/e2e/ui/tests/auth/proxyLogoutUrl.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/auth/proxyLogoutUrl.spec.tsrename to tests/e2e/ui/tests/auth/proxyLogoutUrl.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/auth/unauthenticatedRedirect.spec.ts b/tests/e2e/ui/tests/auth/unauthenticatedRedirect.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/auth/unauthenticatedRedirect.spec.tsrename to tests/e2e/ui/tests/auth/unauthenticatedRedirect.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/internal-user/internalUser.spec.ts b/tests/e2e/ui/tests/internal-user/internalUser.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/internal-user/internalUser.spec.tsrename to tests/e2e/ui/tests/internal-user/internalUser.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/internal-user/internalUserNoTeam.spec.ts b/tests/e2e/ui/tests/internal-user/internalUserNoTeam.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/internal-user/internalUserNoTeam.spec.tsrename to tests/e2e/ui/tests/internal-user/internalUserNoTeam.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/internal-user/internalUserWithTeams.spec.ts b/tests/e2e/ui/tests/internal-user/internalUserWithTeams.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/internal-user/internalUserWithTeams.spec.tsrename to tests/e2e/ui/tests/internal-user/internalUserWithTeams.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/internal-viewer/internalViewer.spec.ts b/tests/e2e/ui/tests/internal-viewer/internalViewer.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/internal-viewer/internalViewer.spec.tsrename to tests/e2e/ui/tests/internal-viewer/internalViewer.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/login/internalUserIdentity.spec.ts b/tests/e2e/ui/tests/login/internalUserIdentity.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/login/internalUserIdentity.spec.tsrename to tests/e2e/ui/tests/login/internalUserIdentity.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/login/login.spec.ts b/tests/e2e/ui/tests/login/login.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/login/login.spec.tsrename to tests/e2e/ui/tests/login/login.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/login/serverRootPathRedirect.spec.ts b/tests/e2e/ui/tests/login/serverRootPathRedirect.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/login/serverRootPathRedirect.spec.tsrename to tests/e2e/ui/tests/login/serverRootPathRedirect.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/mcp/mcpServers.spec.ts b/tests/e2e/ui/tests/mcp/mcpServers.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/mcp/mcpServers.spec.tsrename to tests/e2e/ui/tests/mcp/mcpServers.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/migration/README.md b/tests/e2e/ui/tests/migration/README.mdsimilarity index 84%rename from ui/litellm-dashboard/e2e_tests/tests/migration/README.mdrename to tests/e2e/ui/tests/migration/README.mdindex 4b3a391d421..d6b33598ec4 100644--- a/ui/litellm-dashboard/e2e_tests/tests/migration/README.md+++ b/tests/e2e/ui/tests/migration/README.md@@ -9,8 +9,9 @@ the default mount and a non-root `SERVER_ROOT_PATH` mount.## Adding a pageWhen a page's migration merges, add its route segment to-`e2e_tests/fixtures/migratedPages.ts` (keep it in lockstep with `MIGRATED_PAGES`-in `src/utils/migratedPages.ts`). Both suites pick it up automatically.+`tests/e2e/ui/fixtures/migratedPages.ts` (keep it in lockstep with `MIGRATED_PAGES`+in `ui/litellm-dashboard/src/utils/migratedPages.ts`). Both suites pick it up+automatically.## Runningdiff --git a/ui/litellm-dashboard/e2e_tests/tests/migration/migratedPages.spec.ts b/tests/e2e/ui/tests/migration/migratedPages.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/migration/migratedPages.spec.tsrename to tests/e2e/ui/tests/migration/migratedPages.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/modelHub/modelHub.spec.ts b/tests/e2e/ui/tests/modelHub/modelHub.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/modelHub/modelHub.spec.tsrename to tests/e2e/ui/tests/modelHub/modelHub.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/modelsPage/addModel.spec.ts b/tests/e2e/ui/tests/modelsPage/addModel.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/modelsPage/addModel.spec.tsrename to tests/e2e/ui/tests/modelsPage/addModel.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/modelsPage/clearCustomPricing.spec.ts b/tests/e2e/ui/tests/modelsPage/clearCustomPricing.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/modelsPage/clearCustomPricing.spec.tsrename to tests/e2e/ui/tests/modelsPage/clearCustomPricing.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/modelsPage/credentials.spec.ts b/tests/e2e/ui/tests/modelsPage/credentials.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/modelsPage/credentials.spec.tsrename to tests/e2e/ui/tests/modelsPage/credentials.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/navigation/sidebar.spec.ts b/tests/e2e/ui/tests/navigation/sidebar.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/navigation/sidebar.spec.tsrename to tests/e2e/ui/tests/navigation/sidebar.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/proxy-admin/keys.spec.ts b/tests/e2e/ui/tests/proxy-admin/keys.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/proxy-admin/keys.spec.tsrename to tests/e2e/ui/tests/proxy-admin/keys.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/proxy-admin/license.spec.ts b/tests/e2e/ui/tests/proxy-admin/license.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/proxy-admin/license.spec.tsrename to tests/e2e/ui/tests/proxy-admin/license.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/proxy-admin/teams.spec.ts b/tests/e2e/ui/tests/proxy-admin/teams.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/proxy-admin/teams.spec.tsrename to tests/e2e/ui/tests/proxy-admin/teams.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/settings/adminSettings.spec.ts b/tests/e2e/ui/tests/settings/adminSettings.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/settings/adminSettings.spec.tsrename to tests/e2e/ui/tests/settings/adminSettings.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/settings/routerSettings.spec.ts b/tests/e2e/ui/tests/settings/routerSettings.spec.tssimilarity index 98%rename from ui/litellm-dashboard/e2e_tests/tests/settings/routerSettings.spec.tsrename to tests/e2e/ui/tests/settings/routerSettings.spec.tsindex 3e140b9ab56..ffa5f2c2ae2 100644--- a/ui/litellm-dashboard/e2e_tests/tests/settings/routerSettings.spec.ts+++ b/tests/e2e/ui/tests/settings/routerSettings.spec.ts@@ -6,7 +6,7 @@ import { Role, users } from "../../fixtures/users";// Type-only import of the OpenAPI-generated backend schema, erased at runtime by// esbuild. It types the round-trips below so mistakes surface in the editor; the live// test against the real proxy is what actually enforces the contract.-import type { components } from "../../../src/lib/http/schema";+import type { components } from "../../../../../ui/litellm-dashboard/src/lib/http/schema";// These tests mutate the proxy's shared router_settings, and the Loadbalancing save// echoes the whole settings object, so they must not run concurrently.diff --git a/ui/litellm-dashboard/e2e_tests/tests/team-admin/teamAdmin.spec.ts b/tests/e2e/ui/tests/team-admin/teamAdmin.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/team-admin/teamAdmin.spec.tsrename to tests/e2e/ui/tests/team-admin/teamAdmin.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/users/searchUsers.spec.ts b/tests/e2e/ui/tests/users/searchUsers.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/users/searchUsers.spec.tsrename to tests/e2e/ui/tests/users/searchUsers.spec.tsdiff --git a/ui/litellm-dashboard/e2e_tests/tests/users/viewInternalUsers.spec.ts b/tests/e2e/ui/tests/users/viewInternalUsers.spec.tssimilarity index 100%rename from ui/litellm-dashboard/e2e_tests/tests/users/viewInternalUsers.spec.tsrename to tests/e2e/ui/tests/users/viewInternalUsers.spec.tsdiff --git a/tests/e2e/ui/tsconfig.json b/tests/e2e/ui/tsconfig.jsonnew file mode 100644index 00000000000..f9290fe7b49--- /dev/null+++ b/tests/e2e/ui/tsconfig.json@@ -0,0 +1,16 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "module": "commonjs",+ "moduleResolution": "node",+ "lib": ["ES2022", "DOM"],+ "strict": true,+ "esModuleInterop": true,+ "skipLibCheck": true,+ "resolveJsonModule": true,+ "noEmit": true,+ "types": ["node"]+ },+ "include": ["**/*.ts"],+ "exclude": ["node_modules"]+}diff --git a/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py b/tests/test_litellm/proxy/management_endpoints/test_ui_sso.pyindex 47ceb0c05fa..c693017e134 100644--- a/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py+++ b/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py@@ -7756,6 +7756,7 @@ async def test_cli_completion_persists_assertion_under_db_user_id():user_defined_values=None,prisma_client=MagicMock(),user_api_key_cache=MagicMock(),+ cli_sso_session_cache=MagicMock(),proxy_logging_obj=MagicMock(),sso_assertion=assertion,)diff --git a/ui/litellm-dashboard/knip.json b/ui/litellm-dashboard/knip.jsonindex afed6b0f90e..48b39e8122d 100644--- a/ui/litellm-dashboard/knip.json+++ b/ui/litellm-dashboard/knip.json@@ -1,7 +1,7 @@{"$schema": "https://unpkg.com/knip@5/schema.json","entry": ["scripts/**/*.{ts,mjs}", "src/components/ui/**/*.{ts,tsx}"],- "project": ["src/**/*.{ts,tsx}", "tests/**/*.{ts,tsx}", "scripts/**/*.{ts,mjs}", "e2e_tests/**/*.ts"],+ "project": ["src/**/*.{ts,tsx}", "tests/**/*.{ts,tsx}", "scripts/**/*.{ts,mjs}"],"ignore": ["src/lib/http/schema.d.ts"],"ignoreDependencies": ["openapi-typescript",@@ -10,14 +10,6 @@"tailwindcss","tw-animate-css"],- "playwright": {- "config": [- "e2e_tests/playwright.config.ts",- "e2e_tests/serverRootPath.config.ts",- "e2e_tests/migration.serverRootPath.config.ts"- ],- "entry": ["e2e_tests/**/*.spec.ts", "e2e_tests/**/*.setup.ts", "e2e_tests/globalSetup.ts"]- },"vitest": {"config": ["vitest.config.ts"]},diff --git a/ui/litellm-dashboard/package-lock.json b/ui/litellm-dashboard/package-lock.jsonindex 742c1e4a63f..14c8f0fdc18 100644--- a/ui/litellm-dashboard/package-lock.json+++ b/ui/litellm-dashboard/package-lock.json@@ -47,7 +47,6 @@},"devDependencies": {"@eslint/js": "9.39.2",- "@playwright/test": "1.58.1","@tailwindcss/forms": "0.5.11","@tailwindcss/postcss": "4.3.2","@testing-library/dom": "10.4.1",@@ -2723,8 +2722,9 @@"version": "1.58.1","resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.1.tgz","integrity": "sha512-6LdVIUERWxQMmUSSQi0I53GgCBYgM2RpGngCPY7hSeju+VrKjq3lvs7HpJoPbDiY5QM5EYRtRX5fvrinnMAz3w==",- "devOptional": true,"license": "Apache-2.0",+ "optional": true,+ "peer": true,"dependencies": {"playwright": "1.58.1"},@@ -7361,7 +7361,6 @@"version": "2.3.2","resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz","integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",- "dev": true,"hasInstallScript": true,"license": "MIT","optional": true,@@ -10948,8 +10947,9 @@"version": "1.58.1","resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.1.tgz","integrity": "sha512-+2uTZHxSCcxjvGc5C891LrS1/NlxglGxzrC4seZiVjcYVQfUa87wBL6rTDqzGjuoWNjnBzRqKmF6zRYGMvQUaQ==",- "devOptional": true,"license": "Apache-2.0",+ "optional": true,+ "peer": true,"dependencies": {"playwright-core": "1.58.1"},@@ -10967,8 +10967,9 @@"version": "1.58.1","resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.1.tgz","integrity": "sha512-bcWzOaTxcW+VOOGBCQgnaKToLJ65d6AqfLVKEWvexyS3AS6rbXl+xdpYRMGSRBClPvyj44njOWoxjNdL/H9UNg==",- "devOptional": true,"license": "Apache-2.0",+ "optional": true,+ "peer": true,"bin": {"playwright-core": "cli.js"},diff --git a/ui/litellm-dashboard/package.json b/ui/litellm-dashboard/package.jsonindex 0f54c536297..5add2ad4e9e 100644--- a/ui/litellm-dashboard/package.json+++ b/ui/litellm-dashboard/package.json@@ -14,10 +14,6 @@"test:coverage": "vitest run --coverage","format": "prettier --write .","format:check": "prettier --check .",- "e2e": "playwright test --config e2e_tests/playwright.config.ts",- "e2e:ui": "playwright test --ui --config e2e_tests/playwright.config.ts",- "e2e:migration": "playwright test e2e_tests/tests/migration/migratedPages.spec.ts --config e2e_tests/playwright.config.ts",- "e2e:migration:root": "playwright test --config e2e_tests/migration.serverRootPath.config.ts","knip": "knip","knip:ci": "knip --exclude exports,nsExports,types,nsTypes,enumMembers,classMembers,duplicates","knip:fix": "knip --fix",@@ -63,7 +59,6 @@},"devDependencies": {"@eslint/js": "9.39.2",- "@playwright/test": "1.58.1","@tailwindcss/forms": "0.5.11","@tailwindcss/postcss": "4.3.2","@testing-library/dom": "10.4.1",diff --git a/ui/litellm-dashboard/tsconfig.json b/ui/litellm-dashboard/tsconfig.jsonindex 8ca1752013a..5ca97e3e9db 100644--- a/ui/litellm-dashboard/tsconfig.json+++ b/ui/litellm-dashboard/tsconfig.json@@ -23,5 +23,5 @@"target": "ES2017"},"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"],- "exclude": ["node_modules", "e2e_tests", "scripts"]+ "exclude": ["node_modules", "scripts"]}diff --git a/ui/litellm-dashboard/vitest.config.ts b/ui/litellm-dashboard/vitest.config.tsindex e1c58a0c2b5..da4734eeaf2 100644--- a/ui/litellm-dashboard/vitest.config.ts+++ b/ui/litellm-dashboard/vitest.config.ts@@ -32,7 +32,6 @@ const config: ViteUserConfig = {"**/*.spec.*","tests/**",- "e2e_tests/**","node_modules/**",".next/**",@@ -44,7 +43,7 @@ const config: ViteUserConfig = {"next.config.*",],},- exclude: ["e2e_tests/**", "node_modules/**"],+ exclude: ["node_modules/**"],include: ["src/**/*.test.ts", "src/**/*.test.tsx", "tests/**/*.test.ts", "tests/**/*.test.tsx"],},resolve: {