Skip to content

fix: proxy_base_url on the Proxy UI #11077

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wagnerjt
Copy link
Contributor

Proxy UI using PROXY_BASE_URL

Relevant issues

Handles #10761

Pre-Submission checklist

  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix
🧹 Refactoring

Changes

UI Proxy respecting the the PROXY_BASE_URL.

Copy link

vercel bot commented May 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2025 3:18am

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


wagnerjt seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -2,6 +2,7 @@
const nextConfig = {
output: 'export',
basePath: process.env.UI_BASE_PATH || '/ui',
baseProxyUrl: process.env.PROXY_BASE_URL || '/',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @wagnerjt could you explain what happens when this value is set on nextconfig?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since our UI is rendered from the server as static html - how is this change used ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During the custom UI build process, nextjs will recognize if this environment variable is set and inject the variable.

Something like RUN UI_BASE_PATH=${UI_BASE_PATH} npm run build.

To be even more dynamic, we could make anl new endpoint on the python server that returns the env variables for the UI on startup. Would this be preferred?

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.

3 participants