fix(k8s): serve the LiteLLM dashboard favicon - #98
Merged
Conversation
The dashboard requests its favicon at an absolute /get_favicon, which escaped
the /kartik prefix and hit the Next.js frontend, so the tab icon was blank.
LiteLLM's startup pass only rewrites asset paths built under its asset prefix
("/litellm-asset-prefix", proxy_server.py:1711) -- that's why the _next chunks
came out as /kartik/_next/... while this href did not. LITELLM_FAVICON_URL
doesn't help: it changes what /get_favicon serves, not the unprefixed href in
the HTML.
Route the exact path to litellm instead. The name is LiteLLM-specific so no
frontend route is shadowed, and reaching LiteLLM unprefixed is fine because
root_path only strips /kartik when it is actually present.
Leaves /favicon.ico alone -- that is the main site's icon path, and hijacking it
would put the LiteLLM icon on all of VCell-AI. It 404s for the frontend today,
which is a pre-existing gap unrelated to /kartik.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0174W6CHp7FMt7c9sKdBhbp1
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
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.
Follow-up to #97 — the last cosmetic wart on
/kartik. The dashboard requested its favicon at an absolute/get_favicon, which escaped the prefix and hit the Next.js frontend, leaving the tab icon blank.Why it wasn't prefixed. LiteLLM's startup pass rewrites only paths built under its asset prefix,
"/litellm-asset-prefix"(proxy_server.py:1711). That's why the 40_nextchunks came out correctly as/kartik/_next/...while this one didn't.LITELLM_FAVICON_URLis not a fix — it changes what/get_faviconserves, not the unprefixed href in the HTML./kartik/get_faviconalready returns a valid icon (200,image/x-icon, 6.4 KB), so it only needed to be reachable at the path the UI actually asks for. Exact-match rule tolitellm; the name is LiteLLM-specific, so no frontend route is shadowed, and reaching LiteLLM unprefixed is fine becauseroot_pathonly strips/kartikwhen it's actually present.Deliberately not touching
/favicon.ico. The UI references that too, but it's the main site's icon path — hijacking it would put the LiteLLM icon on all of VCell-AI. It 404s for the frontend today, which is a pre-existing gap unrelated to/kartik.Config-only, no image bump.
🤖 Generated with Claude Code
https://claude.ai/code/session_0174W6CHp7FMt7c9sKdBhbp1