Skip to content

docs(proxy): document env vars missing from the reference table - #767

Merged
yassin-berriai merged 1 commit into
mainfrom
litellm_env_key_reference_rows
Aug 5, 2026
Merged

docs(proxy): document env vars missing from the reference table#767
yassin-berriai merged 1 commit into
mainfrom
litellm_env_key_reference_rows

Conversation

@yassin-berriai

@yassin-berriai yassin-berriai commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Adds reference rows for environment variables that LiteLLM reads at runtime but that have never appeared in the "environment variables - Reference" table on the proxy config settings page

Eight of them are read through a bare get_secret_bool("...") call. The CI gate in the main repo that requires every user-facing environment variable to be documented, tests/documentation_tests/test_env_keys.py, only recognises os.getenv(, litellm.get_secret( and litellm.get_secret_str(, so a get_secret_bool read matches none of its patterns and the key silently skips the requirement. BerriAI/litellm#35833 widens that gate; this PR has to land first, otherwise the gate starts failing code-quality and documentation for everyone the moment it merges

The eight are DISABLE_PRISMA_HEALTH_CHECK_ON_STARTUP, EXPERIMENTAL_OPENAI_BASE_LLM_HTTP_HANDLER, EXPERIMENTAL_UI_LOGIN, LITELLM_STORE_AUDIT_LOGS, STORE_PROMPTS_IN_SPEND_LOGS, USE_DDPROFILER, USE_DDTRACE and USE_LITELLM_PROXY. Each description is written from the call site rather than restated from the name, so for example the row for DISABLE_PRISMA_HEALTH_CHECK_ON_STARTUP says what actually gets skipped, which is the SELECT 1 the proxy issues once Prisma has connected and migrations have run, and what that means in practice, which is that an unreachable database is discovered on the first request instead of at startup. It is distinct from the PRISMA_HEALTH_WATCHDOG_* settings already in the table, which govern the ongoing runtime probe

Two further rows, LITELLM_PRISMA_BOOTSTRAP_TIMEOUT and LITELLM_PRISMA_COMMAND_TIMEOUT, belong to a separate change, BerriAI/litellm#35832, and are folded in here because they target the same table and a second PR against it would only conflict. They are unrelated to the gate: they live in litellm-proxy-extras, which test_env_keys.py does not scan, so nothing goes red if they land late

One row is a wording change rather than an addition, which is why an env-var docs PR touches prose. DEFAULT_NUM_WORKERS_LITELLM_PROXY told every reader to set NUM_WORKERS to the vCPU count, which is right on a single container, VM, or bare-metal host and wrong on Kubernetes, where the guidance is one worker per pod scaled with replicas. The row now scopes the recommendation to each case, notes that CPU, memory and the database connection pool are all per worker, and links the workers and scaling section of the production checklist

Rows are placed in alphabetical position within their existing block and follow the table's two-column layout. I confirmed each key is genuinely absent from the table before adding it, including under near-miss spellings; EXPERIMENTAL_UI_LOGIN is mentioned in the body text of the LITELLM_UI_SESSION_DURATION row today but has no row of its own, and the fixed 10 minute expiry that row refers to matches what the new row states

npm ci && npm run build succeeds. The build reports 95 pages with broken anchors, all pre-existing; the ./prod.md#workers-and-scaling target added here resolves and appears nowhere in that list, and the broken anchors reported against this page are the same ones present on main before this branch

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview Aug 4, 2026 10:25pm

Request Review

Eight are read through a bare get_secret_bool call, which the CI gate that
enforces this table does not recognise, so they have never been required to
have a row. Each description is written from the call site rather than from
the name.

Two more, LITELLM_PRISMA_BOOTSTRAP_TIMEOUT and LITELLM_PRISMA_COMMAND_TIMEOUT,
come from a separate change and are included here to avoid a second PR
conflicting on the same table.

Also scopes the NUM_WORKERS recommendation on DEFAULT_NUM_WORKERS_LITELLM_PROXY,
which told every reader to match vCPU count regardless of how they deploy. That
advice is right for a single host and wrong on Kubernetes, where the guidance is
one worker per pod scaled with replicas.
@yassin-berriai
yassin-berriai merged commit c913fae into main Aug 5, 2026
3 checks passed
@yassin-berriai
yassin-berriai deleted the litellm_env_key_reference_rows branch August 5, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants