mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
Adds the proxy's OpenAPI spec to the repo as openapi.json so diff tooling has a committed baseline, and replaces the inline drift check with the update/verify script pair Kubernetes uses so the same command runs locally and in CI. - scripts/update-codegen.sh is the single writer for generated artifacts - scripts/verify-codegen.sh runs it and fails on any git status change - the sync job now runs on every PR instead of a path filter, so routes defined outside litellm/proxy (enterprise/**) can no longer land a stale spec - git status --porcelain replaces git diff, which was blind to untracked files
20 lines
521 B
Bash
Executable file
20 lines
521 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
|
DASHBOARD_DIR="${REPO_ROOT}/ui/litellm-dashboard"
|
|
|
|
if [[ -z "${LITELLM_PYTHON:-}" && -x "${REPO_ROOT}/.venv/bin/python" ]]; then
|
|
export LITELLM_PYTHON="${REPO_ROOT}/.venv/bin/python"
|
|
fi
|
|
|
|
if [[ ! -x "${DASHBOARD_DIR}/node_modules/.bin/openapi-typescript" ]]; then
|
|
echo "Installing dashboard dependencies..." >&2
|
|
npm ci --prefix "${DASHBOARD_DIR}"
|
|
fi
|
|
|
|
cd "${DASHBOARD_DIR}"
|
|
npm run gen:api
|