From 4f41a9e140ebcf12ec56bfc8d24b4dd5ba78ed4f Mon Sep 17 00:00:00 2001 From: ryan-crabbe-berri Date: Tue, 30 Jun 2026 12:49:46 -0700 Subject: [PATCH] test(ui): drop the e2e typecheck CI gate, keep the typed import for the editor The e2e runs against the real proxy, so a contract drift already fails the test at runtime; tsc only checks the spec against schema.d.ts, a generated snapshot, so a backend change with a stale snapshot would pass tsc while the live test still catches it. The dedicated tsconfig + script + CI step were circular ceremony for that. Keep the zero-runtime-cost type-only import, which still catches mistakes in the editor, and make its comment honest about what enforces the contract. --- .circleci/config.yml | 8 -------- .../e2e_tests/tests/settings/routerSettings.spec.ts | 7 +++---- ui/litellm-dashboard/e2e_tests/tsconfig.json | 9 --------- ui/litellm-dashboard/package.json | 1 - 4 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 ui/litellm-dashboard/e2e_tests/tsconfig.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 009884cbfe4..f13e9bf66f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2687,14 +2687,6 @@ jobs: paths: - ui/litellm-dashboard/node_modules - ~/.cache/ms-playwright - - run: - name: Type-check E2E specs - # The specs type their request/response round-trips against the generated - # OpenAPI schema; this step turns that typing into a real gate, so a backend - # contract drift fails here instead of silently passing at runtime. - command: | - cd ui/litellm-dashboard - npm run typecheck:e2e - run: name: Build UI from source # Prior version used `cp -r out/ ../../litellm/proxy/_experimental/out/`. diff --git a/ui/litellm-dashboard/e2e_tests/tests/settings/routerSettings.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/settings/routerSettings.spec.ts index 64dab6d7cf6..3e140b9ab56 100644 --- a/ui/litellm-dashboard/e2e_tests/tests/settings/routerSettings.spec.ts +++ b/ui/litellm-dashboard/e2e_tests/tests/settings/routerSettings.spec.ts @@ -3,10 +3,9 @@ import { ADMIN_STORAGE_PATH } from "../../constants"; import { navigateToPage } from "../../helpers/navigation"; import { Page } from "../../fixtures/pages"; import { Role, users } from "../../fixtures/users"; -// Type-only import of the OpenAPI-generated backend schema. esbuild erases it at -// runtime; the round-trip below is enforced by the `typecheck:e2e` CI step (tsc over -// e2e_tests), so a drift in the /config/update or /router/settings contract fails the -// build rather than silently passing here. +// 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"; // These tests mutate the proxy's shared router_settings, and the Loadbalancing save diff --git a/ui/litellm-dashboard/e2e_tests/tsconfig.json b/ui/litellm-dashboard/e2e_tests/tsconfig.json deleted file mode 100644 index abda3fdb8b6..00000000000 --- a/ui/litellm-dashboard/e2e_tests/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "noEmit": true, - "types": ["node"] - }, - "include": ["**/*.ts"], - "exclude": ["node_modules"] -} diff --git a/ui/litellm-dashboard/package.json b/ui/litellm-dashboard/package.json index 1d2b505a172..a8948f4be34 100644 --- a/ui/litellm-dashboard/package.json +++ b/ui/litellm-dashboard/package.json @@ -19,7 +19,6 @@ "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", - "typecheck:e2e": "tsc -p e2e_tests/tsconfig.json --noEmit", "knip": "knip", "knip:fix": "knip --fix", "gen:api": "node scripts/gen-api-types.mjs"