litellm/ui/litellm-dashboard/src/contexts
yuneng-jiang 122675c309
feat(ui): let admins supply a dark-mode variant of their custom logo (#37662)
* feat(ui): let admins supply a dark-mode variant of their custom logo

A deployment branded through UI_LOGO_PATH got its light artwork on the
dark sidebar, and there was nothing an admin could set to change that.

Adds UI_LOGO_PATH_DARK, exposed as the logo_url_dark theme setting and a
second field on the UI theme page. /get_image now walks an ordered list
of candidates for the requested theme and serves the first usable one:
the dark logo, then the light logo, then the bundled default.

Falling through rather than failing is the point. An admin who never
sets a dark logo keeps their own light one instead of reverting to
LiteLLM's, and a dark logo that goes missing later degrades to their
light logo rather than dropping their branding entirely.

* fix(ui): recover from a dark logo the browser cannot load

A dark logo given as an http(s) URL is loaded by the browser straight
from the sidebar, so it never passes through the proxy's fallback chain.
A URL that 404s left a broken image where the admin's light logo should
have been, while the same logo given as a local path fell back cleanly.

The sidebar now remembers the dark URL that failed and drops to the light
logo, matching how the proxy resolves an unusable dark logo and how the
provider Logo component already handles a broken image.
2026-08-20 12:48:55 -07:00
..
AuthContext.tsx fix(proxy): give proxy_admin_viewer read parity with proxy_admin (#35851) 2026-08-05 18:33:55 +00:00
ChatShellContext.tsx feat(ui): render request metrics on the /ui/chat surface (#36845) 2026-08-13 17:31:13 -07:00
PluginModeContext.test.tsx test(ui): assert presence and state so dashboard tests fail when behaviour breaks 2026-08-17 14:46:55 -07:00
PluginModeContext.tsx feat: litellm plugin architecture v2 (#30688) 2026-06-20 20:37:22 -07:00
ReactQueryProvider.tsx refactor: extract ReactQueryProvider into dedicated context file 2026-02-28 17:47:47 -08:00
ThemeContext.tsx feat(ui): let admins supply a dark-mode variant of their custom logo (#37662) 2026-08-20 12:48:55 -07:00