Repository navigation
[Docs] Add LITELLM_MAX_BUDGET_PER_SESSION_TTL to env vars reference - #23186
Merged
Merged
Conversation
Add missing env var to config_settings.md to fix test_env_keys CI check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile SummaryThis is a minimal, docs-only PR that adds one missing row to the environment variables reference table in
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| docs/my-website/docs/proxy/config_settings.md | Adds a single documentation row for LITELLM_MAX_BUDGET_PER_SESSION_TTL in alphabetical order between LITELLM_MASTER_KEY and LITELLM_MAX_ITERATIONS_TTL; description and default value accurately reflect the implementation in max_budget_per_session_limiter.py. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Proxy Startup] -->|reads env var| B["os.getenv('LITELLM_MAX_BUDGET_PER_SESSION_TTL', 3600)"]
B --> C[_PROXY_MaxBudgetPerSessionHandler.__init__]
C --> D{Redis available?}
D -->|Yes| E[Register Lua atomic-increment script]
D -->|No| F[In-memory fallback]
E --> G[async_pre_call_hook: check session spend ≥ max_budget?]
F --> G
G -->|Yes| H[Raise HTTP 429]
G -->|No| I[Allow request]
I --> J[async_log_success_event: increment session spend by response_cost]
J -->|TTL applied on first write| K[Cache key expires after TTL seconds]
Last reviewed commit: b4e78ac
fzowl
pushed a commit
to fzowl/litellm
that referenced
this pull request
Jun 24, 2026
…per_session_ttl [Docs] Add LITELLM_MAX_BUDGET_PER_SESSION_TTL to env vars reference
This branch had an error being deployed
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.
Summary
Failure Path (Before Fix)
The
test_env_keysCI check scans all Python files foros.getenv()andlitellm.get_secret()calls, then verifies each key is documented inconfig_settings.md. The newmax_budget_per_session_limiter.pyusesLITELLM_MAX_BUDGET_PER_SESSION_TTLbut it was not added to the docs table.Fix
Add
LITELLM_MAX_BUDGET_PER_SESSION_TTLto the environment variables reference table inconfig_settings.md.Testing
test_env_keys.pyshould pass with this env var now documentedType
📖 Documentation