Skip to content

[Bug]: /ui is not accessible without custom root path after basePath update in next.config.mjs #12161

Closed
@zolgear

Description

@zolgear

What happened?

After this commit, /ui was removed from the basePath setting in next.config.mjs. This fixed issues when using a custom root path, but caused a new problem:
When running LiteLLM with the default server root (no custom SERVER_ROOT_PATH), the /ui static assets are now returning 404 errors.

  • This only happens on the default root (without a custom base path).
  • Before this commit, /ui worked as expected in the default setup.

Reference:

You need to test that /ui is accessible both when the root path is not customized and when a custom root path is used.

Additionally, if NODE_ENV is not defined, the content size is returned as 0 or incorrect, and as a result, the UI does not render. This issue started to occur around the same time.
Example fix:

NODE_ENV: production

Relevant log output

GET https://litellm.***.example.com/index.txt?_rsc=1ps5x 404 (Not Found)
GET https://litellm.***.example.com/audit-logs-preview.png 404 (Not Found)

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.73.0-stable

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions