Commit graph

3 commits

Author SHA1 Message Date
ryan-crabbe-berri
cca1b8f06e ci: commit openapi.json and gate it with a verify-codegen script
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
2026-08-07 15:53:16 -07:00
ryan-crabbe-berri
e53bd7cbd1
feat(ui): generate dashboard API types from the proxy OpenAPI spec (#29816)
* feat(ui): generate dashboard API types from the proxy OpenAPI spec

Introduces the shared type foundation for the dashboard without touching any
runtime code. The proxy's FastAPI app is the source of truth; app.openapi()
emits the spec and openapi-typescript turns it into src/lib/http/schema.d.ts.

Adds an npm run gen:api script (a Python spec dump piped into openapi-typescript)
and a Check UI API Types Sync CI job that regenerates the file from the live
spec and fails if it drifts, so the committed types can never silently fall out
of step with the backend. The generated file is pinned to openapi-typescript
7.13.0 and excluded from prettier, eslint, and knip, and marked linguist-generated
so it collapses in diffs.

No openapi-fetch and no call-site changes yet; this only makes the types exist.

* chore(ui): tidy gen-api-types script per review

Write the spec dump inside a with-block and clean up the temp dir in a
finally, so repeated local runs don't leave stray ~MB JSON files behind.
2026-06-05 17:20:01 -07:00
ishaan-jaff
4ce5e8e66d ignore ipynbs 2023-08-31 16:58:54 -07:00