Skip to content

feat: serve UI at /ui, add /whoami auth endpoint#26

Open
krrish-berri-2 wants to merge 1 commit into
mainfrom
feat/ui-at-slash-ui
Open

feat: serve UI at /ui, add /whoami auth endpoint#26
krrish-berri-2 wants to merge 1 commit into
mainfrom
feat/ui-at-slash-ui

Conversation

@krrish-berri-2

Copy link
Copy Markdown
Contributor

Summary

  • UI now served at /ui (Next.js basePath="/ui") instead of as root fallback
  • Root / redirects to /docs (swagger); swagger description links to /ui with bold code-styled link matching LiteLLM's style
  • Added GET /whoami endpoint to validate master key — used by login flow
  • Fixed hardcoded /login/ redirect paths in api.ts and login/page.tsx to use /ui/login/ so login works correctly with basePath

Test plan

  • GET / → 308 redirect to /docs
  • /docs shows swagger with 👉 LiteLLM Admin Panel on /ui link
  • /ui/ → redirects to /ui/login/ (unauthenticated)
  • Login with master key → redirects to /ui/sessions/
  • GET /whoami with valid Bearer token → 200
  • GET /whoami with invalid token → 401

- Mount Next.js static export at /ui (basePath="/ui")
- Root / redirects to /docs (swagger); swagger description links to /ui
- Add GET /whoami to validate master key (used by login flow)
- Fix hardcoded /login redirect paths in api.ts and login/page.tsx to respect /ui basePath
- Gitignore src/ui/out/ build artifact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant