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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2592,14 +2592,14 @@ jobs:
bundle exec rspec
no_output_timeout: 30m
# Install Node.js directly from nodejs.org with SHA256 verification,
# instead of piping NodeSource's setup_18.x apt-repo installer into
# instead of piping NodeSource's setup_24.x apt-repo installer into
Comment thread
greptile-apps[bot] marked this conversation as resolved.
# sudo bash (which runs a mutable upstream script unattended).
- run:
name: Install Node.js 18.20.8
name: Install Node.js 24.19.0
command: |
NODE_VERSION="18.20.8"
NODE_VERSION="24.19.0"
NODE_TARBALL="node-v${NODE_VERSION}-linux-x64.tar.xz"
NODE_EXPECTED_SHA="5467ee62d6af1411d46b6a10e3fb5cacc92734dbcef465fea14e7b90993001c9"
NODE_EXPECTED_SHA="14b342e71204f811bde6153be8e04b62aef63c236fef92b55f9c83154b409647"
curl -sSLf -o "/tmp/${NODE_TARBALL}" "https://nodejs.org/dist/v${NODE_VERSION}/${NODE_TARBALL}"
echo "${NODE_EXPECTED_SHA} /tmp/${NODE_TARBALL}" | sha256sum -c -
sudo tar -xJf "/tmp/${NODE_TARBALL}" -C /usr/local --strip-components=1
Expand Down Expand Up @@ -2734,7 +2734,7 @@ jobs:

ui_build:
docker:
- image: cimg/node:20.19@sha256:35e64883e8d21bc345b0a7b04c35ee46442c127607ed1d8d7d37d8a1ed76db81
- image: cimg/node:24.19@sha256:8966565f07189a67d64d6808a2b127f31dafae566508e3547f55640e1070bfad
auth:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
Expand Down Expand Up @@ -2778,7 +2778,7 @@ jobs:

ui_unit_tests:
docker:
- image: cimg/node:20.19@sha256:35e64883e8d21bc345b0a7b04c35ee46442c127607ed1d8d7d37d8a1ed76db81
- image: cimg/node:24.19@sha256:8966565f07189a67d64d6808a2b127f31dafae566508e3547f55640e1070bfad
auth:
username: ${DOCKERHUB_USERNAME}
password: ${DOCKERHUB_PASSWORD}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-ui-api-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: "20"
node-version-file: ui/litellm-dashboard/.nvmrc
cache: "npm"
cache-dependency-path: ui/litellm-dashboard/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-litellm-ui-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: "20"
node-version-file: ui/litellm-dashboard/.nvmrc
cache: "npm"
cache-dependency-path: ui/litellm-dashboard/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-litellm-ui-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
if: steps.changed.outputs.has_files == 'true'
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: "20"
node-version-file: ui/litellm-dashboard/.nvmrc
cache: "npm"
cache-dependency-path: ui/litellm-dashboard/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-litellm-ui-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: "20"
node-version-file: ui/litellm-dashboard/.nvmrc
cache: "npm"
cache-dependency-path: ui/litellm-dashboard/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/wolfi-base@sha256:42df77a9974d6ec8b17
ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/wolfi-base@sha256:42df77a9974d6ec8b17a5ee8bc23b532600a44d705acef2409e0933c1251b45f
ARG UV_IMAGE=ghcr.io/astral-sh/uv:0.11.7@sha256:240fb85ab0f263ef12f492d8476aa3a2e4e1e333f7d67fbdd923d00a506a516a
# Pinned by digest like the other base images; bump explicitly on Node upgrades.
ARG UI_BUILD_IMAGE=node:20.18-alpine3.20@sha256:3488b10bf958af7125a176419d2d8a9937d895bf124012aae811651988d2ffe6
ARG UI_BUILD_IMAGE=node:24.19-alpine3.24@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43

FROM $UV_IMAGE AS uvbin

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.database
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/wolfi-base@sha256:42df77a9974d6ec8b17
ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/wolfi-base@sha256:42df77a9974d6ec8b17a5ee8bc23b532600a44d705acef2409e0933c1251b45f
ARG UV_IMAGE=ghcr.io/astral-sh/uv:0.11.7@sha256:240fb85ab0f263ef12f492d8476aa3a2e4e1e333f7d67fbdd923d00a506a516a
# Pinned by digest like the other base images; bump explicitly on Node upgrades.
ARG UI_BUILD_IMAGE=node:20.18-alpine3.20@sha256:3488b10bf958af7125a176419d2d8a9937d895bf124012aae811651988d2ffe6
ARG UI_BUILD_IMAGE=node:24.19-alpine3.24@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43

FROM $UV_IMAGE AS uvbin

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.non_root
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/wolfi-base@sha256:42df77a9974d6ec8b
ARG PROXY_EXTRAS_SOURCE=published
ARG UV_IMAGE=ghcr.io/astral-sh/uv:0.11.7@sha256:240fb85ab0f263ef12f492d8476aa3a2e4e1e333f7d67fbdd923d00a506a516a
# Pinned by digest like the other base images; bump explicitly on Node upgrades.
ARG UI_BUILD_IMAGE=node:20.18-alpine3.20@sha256:3488b10bf958af7125a176419d2d8a9937d895bf124012aae811651988d2ffe6
ARG UI_BUILD_IMAGE=node:24.19-alpine3.24@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43

FROM $UV_IMAGE AS uvbin

Expand Down
5 changes: 3 additions & 2 deletions docker/build_admin_ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ else
fi || { echo "nvm checksum verification failed"; exit 1; }
bash "$NVM_SCRIPT"
source ~/.nvm/nvm.sh
nvm install v18.17.0
nvm use v18.17.0
NODE_VERSION="$(cat ui/litellm-dashboard/.nvmrc)"
nvm install "v${NODE_VERSION}"
nvm use "v${NODE_VERSION}"


# cd in to /ui/litellm-dashboard
Expand Down
4 changes: 2 additions & 2 deletions ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

# UI container — Next.js static export served by nginx.

ARG NODE_VERSION=20.18-alpine3.20
ARG UI_BUILD_IMAGE=node:24.19-alpine3.24@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43
ARG NGINX_VERSION=1.27-alpine

# ---------- builder ----------
FROM node:${NODE_VERSION} AS builder
FROM ${UI_BUILD_IMAGE} AS builder

ENV NEXT_TELEMETRY_DISABLED=1 \
npm_config_fund=false \
Expand Down
1 change: 1 addition & 0 deletions ui/litellm-dashboard/.npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
ignore-scripts=true
# Protects local npm install only — npm ci (used in CI) ignores this
min-release-age=3
engine-strict=true
2 changes: 1 addition & 1 deletion ui/litellm-dashboard/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
24.19.0
5 changes: 3 additions & 2 deletions ui/litellm-dashboard/build_ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ if ! command -v nvm &> /dev/null; then
fi

# Use nvm to set the required Node.js version
nvm use v20
nvm install
nvm use

# Check if nvm use was successful
if [ $? -ne 0 ]; then
echo "Error: Failed to switch to Node.js v20. Deployment aborted."
echo "Error: Failed to switch to the Node.js version in .nvmrc. Deployment aborted."
exit 1
fi

Expand Down
5 changes: 3 additions & 2 deletions ui/litellm-dashboard/build_ui_custom_path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ if ! command -v nvm &> /dev/null; then
fi

# Use nvm to set the required Node.js version
nvm use v18.17.0
nvm install
nvm use

# Check if nvm use was successful
if [ $? -ne 0 ]; then
echo "Error: Failed to switch to Node.js v18.17.0. Deployment aborted."
echo "Error: Failed to switch to the Node.js version in .nvmrc. Deployment aborted."
exit 1
fi

Expand Down
56 changes: 3 additions & 53 deletions ui/litellm-dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ui/litellm-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"sharp": "^0.35.0"
},
"engines": {
"node": ">=20.9.0",
"npm": ">=8.3.0"
"node": ">=24.0.0",
"npm": ">=11.10.0"
Comment thread
greptile-apps[bot] marked this conversation as resolved.
}
}
24 changes: 24 additions & 0 deletions ui/litellm-dashboard/tests/jsdomFetchEnv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { builtinEnvironments, type Environment } from "vitest/environments";

const env: Environment = {
name: "jsdom-fetch",
transformMode: "web",
async setup(global, options) {
const nativeAbortController = global.AbortController;
const nativeAbortSignal = global.AbortSignal;
const { teardown } = await builtinEnvironments.jsdom.setup(global, options);
Object.defineProperty(global, "AbortController", {
configurable: true,
writable: true,
value: nativeAbortController,
});
Object.defineProperty(global, "AbortSignal", {
configurable: true,
writable: true,
value: nativeAbortSignal,
});
return { teardown };
},
};

export default env;
2 changes: 1 addition & 1 deletion ui/litellm-dashboard/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const staticImageData: Plugin = {
const config: ViteUserConfig = {
plugins: [staticImageData],
test: {
environment: "jsdom",
environment: "./tests/jsdomFetchEnv.ts",
setupFiles: ["tests/setupTests.ts"],
globals: true,
css: true, // lets you import CSS/modules without extra mocks
Expand Down
Loading