-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
UI - Custom Server Root Path (Multiple Fixes) #11337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
removes the swagger monkey patch - this seems to render the swagger on custom base paths
allows better documentation of expected params
…e returned ui token object
…reduce potential for errors
…r litellm ui config returns the server root path and proxy base url for constructing api calls
allows ui to query it
…network requests ensures requests are formatted correctly
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
allows it to work when proxy is mounted on root
This was referenced Jun 3, 2025
stefan--
pushed a commit
to stefan--/litellm
that referenced
this pull request
Jun 12, 2025
* fix(proxy_server.py): working swagger on custom base removes the swagger monkey patch - this seems to render the swagger on custom base paths * fix(ui/): working custom auth uptil login success event * fix(ui/): working custom server root path for login * fix(proxy_server.py): create typed dict for ui returned token allows better documentation of expected params * refactor(proxy_server.py): refactor all ui login endpoints to use same returned ui token object * feat(ui_sso.py): add server root path to ui token * feat(ui_sso.py): allows ui to call correct endpoint * fix(networking.tsx): update proxy base url with custom root path * fix(networking.tsx): handle updating proxy base url for non-local instances * refactor: remove uneccessary references to proxybaseurl in ui code - reduce potential for errors * fix: fix linting error * fix(onboarding_link.tsx): fix onboarding link when custom server path is set * feat(ui_discovery_endpoints.py): add new public .well-known/ route for litellm ui config returns the server root path and proxy base url for constructing api calls * feat(_types.py): add litellm well known config as public route allows ui to query it * fix(/_types.py): add .well-known config to as public route * fix(page.tsx): create pattern for loading in ui config before making network requests ensures requests are formatted correctly * fix(page.tsx): call credential endpoint once ui config is loaded * fix(page.tsx): route correctly to litellm dashboard from new user login * fix(page.tsx): remove hardcoded `/litellm` for /sso/key/generate request * fix(proxy_server.py): re-add moderations endpoint * fix(proxy_server.py): mount __next__ at / and /litellm allows it to work when proxy is mounted on root * docs(contributing.md): remove /ui on ui doc - it will now run on root * docs(custom_root_ui.md): add docs on custom root path
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title
Allow using litellm UI when the proxy is hosted on a custom root path
Screen.Recording.2025-06-02.at.4.20.48.PM.mov
Relevant issues
This enables running litellm proxy in the same container as OpenWebUI, where:
/
-> is all OpenWebUI routes/litellm
-> is all LiteLLM routesCloses #10310
Closes #5997
Closes #10685
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/
directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit
Type
🐛 Bug Fix
🧹 Refactoring
✅ Test
Changes
/litellm/.well-known/litellm-ui-config
route - this fixed route is used by the UI to discover the custom paths to set when creating a URL to call the proxy api endpoints