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]

[Fix] Restructure HTML files after UI build so extensionless routes work in CI

Yuneng Jiang4ee7d42981a2
diff --git a/.circleci/config.yml b/.circleci/config.yml
index cf2c4176613..dd7635592c0 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -3127,6 +3127,10 @@ jobs:
cd ui/litellm-dashboard
npm run build
cp -r out/ ../../litellm/proxy/_experimental/out/
+ # Restructure HTML so extensionless routes work (login.html -> login/index.html)
+ find ../../litellm/proxy/_experimental/out -name '*.html' ! -name 'index.html' | while read -r f; do
+ d="${f%.html}"; mkdir -p "$d"; mv "$f" "$d/index.html"
+ done
- run:
name: Wait for PostgreSQL
command: dockerize -wait tcp://localhost:5432 -timeout 30s
diff --git a/ui/litellm-dashboard/e2e_tests/run_e2e.sh b/ui/litellm-dashboard/e2e_tests/run_e2e.sh
index 9e979146584..4e3a47edfbd 100755
--- a/ui/litellm-dashboard/e2e_tests/run_e2e.sh
+++ b/ui/litellm-dashboard/e2e_tests/run_e2e.sh
@@ -103,7 +103,16 @@ npm install --silent 2>/dev/null || true
npm run build
# Copy the fresh build to the proxy's static UI directory
cp -r "$DASHBOARD_DIR/out/" "$REPO_ROOT/litellm/proxy/_experimental/out/"
-echo "UI build copied to proxy static directory"
+
+# Restructure HTML files so extensionless routes work (e.g. /ui/login)
+# Next.js export produces login.html; the proxy expects login/index.html
+find "$REPO_ROOT/litellm/proxy/_experimental/out" -name '*.html' ! -name 'index.html' | while read -r htmlfile; do
+ target_dir="${htmlfile%.html}"
+ target_path="$target_dir/index.html"
+ mkdir -p "$target_dir"
+ mv "$htmlfile" "$target_path"
+done
+echo "UI build copied and restructured"
# --- Python environment ---
echo "=== Setting up Python environment ==="