docs: document LITELLM_MODEL_COST_MAP_URL for firewalled environments#2054
Conversation
Customers behind firewalls that block raw.githubusercontent.com cannot let LiteLLM refresh its model catalog. Robusta now mirrors the file at https://api.robusta.dev/litellm/model_prices_and_context_window.json, and LiteLLM honors LITELLM_MODEL_COST_MAP_URL out of the box. Documents the env var, the mirror URL, and the chained-relay setup for fully self-hosted deployments where the relay itself also cannot reach GitHub. Relay-side endpoint: robusta-dev/relay#533 (ROB-3898). Signed-off-by: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
WalkthroughAdds documentation for the LITELLM_MODEL_COST_MAP_URL environment variable, documents the Robusta mirror URL, and provides a Helm ChangesLiteLLM Model Cost Map Configuration Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for holmes-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/environment-variables.md`:
- Around line 188-190: The fenced code block containing the URL snippet
currently lacks a language identifier (MD040); update the triple-backtick fence
for the block that contains
"https://api.robusta.dev/litellm/model_prices_and_context_window.json" to
include a language token (for example add "text" after the opening ```), so the
block becomes a proper fenced code block with a language specifier for correct
rendering.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3daf8874-2b6e-49b8-b4cb-536695c58ba6
📒 Files selected for processing (1)
docs/reference/environment-variables.md
…ction The self-hosted-relay chaining note adds noise for the common case (a SaaS customer pointing at api.robusta.dev) without giving fully self-hosted users enough detail to act on. Keep the section focused on the env var and the mirror URL. Signed-off-by: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
docs/reference/environment-variables.md (1)
188-190:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd a language identifier to the fenced URL block.
This still triggers MD040 and should use a language token (e.g.,
text) for consistent markdown rendering/linting.Proposed fix
-``` +```text https://api.robusta.dev/litellm/model_prices_and_context_window.json</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@docs/reference/environment-variables.mdaround lines 188 - 190, The fenced
code block containing the URL should include a language identifier to satisfy
MD040; update the block that currently shows the URL
"https://api.robusta.dev/litellm/model_prices_and_context_window.json" by
changing the opening fence fromtotext so the block istext ...,
ensuring consistent markdown linting and rendering.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.Duplicate comments:
In@docs/reference/environment-variables.md:
- Around line 188-190: The fenced code block containing the URL should include a
language identifier to satisfy MD040; update the block that currently shows the
URL "https://api.robusta.dev/litellm/model_prices_and_context_window.json" by
changing the opening fence fromtotext so the block istext ...,
ensuring consistent markdown linting and rendering.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Organization UI **Review profile**: CHILL **Plan**: Pro **Run ID**: `3b05c455-0204-43e2-a726-8c81b8e4c7d7` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between a60b30b989719d57c778c27a562bb4ca1c7e6fe1 and c8b6bd6ce40eee00fe81a13270405d6407e9eca5. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `docs/reference/environment-variables.md` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Summary
Documents
LITELLM_MODEL_COST_MAP_URLand Robusta's mirror of LiteLLM's model catalog (model_prices_and_context_window.json).Customers whose egress firewalls block
raw.githubusercontent.comcannot let LiteLLM refresh its model catalog (which determines per-model context windows, max output tokens, and pricing). The fix is purely operational — LiteLLM already honorsLITELLM_MODEL_COST_MAP_URL, and Robusta now serves a mirror of the file athttps://api.robusta.dev/litellm/model_prices_and_context_window.jsonwith TTL caching and a stale fallback. Setting the env var viaadditionalEnvVarsin Helm is all it takes.For fully self-hosted Robusta installs where the relay itself also cannot reach GitHub, the relay's
LITELLM_MODEL_COST_MAP_UPSTREAM_URLcan be pointed at Robusta's mirror to chain the lookup — documented inline.Relay-side endpoint: robusta-dev/relay#533 (ROB-3898).
Test plan
docs/reference/environment-variables.mdlocally and confirm the new section renders correctlyLITELLM_MODEL_COST_MAP_URL=https://api.robusta.dev/litellm/model_prices_and_context_window.jsonworks end-to-end from a HolmesGPT pod that cannot reachraw.githubusercontent.comGenerated by Claude Code
Summary by CodeRabbit