Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,16 @@ STABILIZATION_TODO.md
**/test-results
**/playwright-report
**/*.storageState.json
**/coverage
**/coverage

# Next.js admin UI build output. Upstream BerriAI/litellm commits this
# (their docker build doesn't rebuild the UI), but in this fork the
# Dockerfile rebuilds from ui/litellm-dashboard/src/ on every image
# build — so committing the artifacts adds 100+ file churn per UI PR
# for zero deploy benefit. Local dev that runs the proxy outside docker
# can `cd ui/litellm-dashboard && npm run build` to populate this for
# direct serving.
litellm/proxy/_experimental/out/
ui/litellm-dashboard/out/
ui/litellm-dashboard/.next/
ui/litellm-dashboard/node_modules/
25 changes: 24 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,30 @@ RUN uv sync --frozen --no-install-project --no-install-workspace --no-default-gr
# Copy full source tree
COPY . .

# Build Admin UI before final sync
# Build the LiteLLM dashboard UI from source. Upstream commits a
# pre-built bundle at litellm/proxy/_experimental/out/ and expects
# `build_admin_ui.sh` to be a no-op customization hook for enterprise.
# That model means a UI source change in this fork (under
# ui/litellm-dashboard/src/) does NOT reach the runtime image unless
# we rebuild here — and the upstream-shipped bundle becomes the
# served UI by default, hiding our patches at deploy time.
#
# So: always run `npm run build` from current source, overwrite
# `_experimental/out/`, and prune node_modules to keep the builder
# layer slim. The committed bundle (now .gitignored) is treated as a
# "seed for fresh clones that don't run docker build" only — it is
# always overwritten by this step in any image that actually ships.
RUN cd ui/litellm-dashboard && \
npm ci --no-audit --no-fund --prefer-offline && \
npm run build && \
rm -rf /app/litellm/proxy/_experimental/out && \
cp -r out /app/litellm/proxy/_experimental/out && \
cd /app && \
rm -rf ui/litellm-dashboard/node_modules ui/litellm-dashboard/out && \
npm cache clean --force 2>/dev/null || true

# Preserved upstream hook: enterprise customizations can still override
# the bundle via the canonical build_admin_ui.sh path. Default is no-op.
RUN sed -i 's/\r$//' docker/build_admin_ui.sh && chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh

# Install project and workspace packages (fast - deps already cached)
Expand Down
1 change: 0 additions & 1 deletion litellm/proxy/_experimental/out/404.html

This file was deleted.

Loading