Skip to content

docs(proxy): document the provider and operational env vars missing from the reference table - #785

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

docs(proxy): document the provider and operational env vars missing from the reference table#785
yassin-berriai merged 1 commit into
mainfrom
litellm_env_key_full_reference_rows

Conversation

@yassin-berriai

Copy link
Copy Markdown
Contributor

142 environment variables read under litellm/ have no row in the environment variables reference table. Every one of them is reached through a bare get_secret or get_secret_str call, and the CI gate that enforces this table only recognises those calls when they carry a litellm. prefix, so none of these keys has ever been required to have a row. BerriAI/litellm#TBD widens that gate; this lands the rows it will require, so it has to merge first.

The rows split into two groups, and they deserve different amounts of reviewer attention.

32 are operational settings that nobody could have discovered without reading the source, and those are written individually from their call sites: WORKER_CONFIG, DISABLE_KEY_NAME, PROMETHEUS_SELECTED_INSTANCE, AWS_BEDROCK_RUNTIME_ENDPOINT, FIREWORKS_ACCOUNT_ID, the xAI OAuth token directory and file, and the watsonx alias family among them. REDIS_AZURE_AD_TOKEN is the clearest argument for sourcing descriptions from code rather than from names: it is a boolean flag that switches on Azure AD authentication for Redis, so a description guessed from the name would have told readers to put a token in it.

The remaining 110 are provider API keys and base URLs. Those are uniform, which is right for them, with the default base URL given wherever the call site names one. What is not uniform is the alias handling: every alias row says which name wins. A reader looking at TOGETHER_API_KEY, TOGETHER_AI_API_KEY, TOGETHERAI_API_KEY and TOGETHER_AI_TOKEN cannot tell from the names that they are read in exactly that order, and that ordering means TOGETHERAI_API_KEY, the only one previously documented, is third rather than canonical. Fireworks AI has the same four-name shape.

Rows are inserted alphabetically rather than appended, matching #767.

AI211_API_KEY is deliberately absent. It is a misspelling of AI21_API_KEY read at a single call site in a function that has no callers, and giving it a row would make the typo public API. It is being corrected in the source instead.

Verification

Coverage is asserted rather than eyeballed. The row set is generated against the widened gate's own output, failing if any key it reports lacks a row or if a row is added for a key that is already documented. Table row count goes 793 to 935, exactly +142.

Running the widened gate against this branch leaves only the deliberately excluded key:

$ python tests/documentation_tests/test_env_keys.py
Exception: Environment variables read under ./litellm but mentioned nowhere in the docs: ['AI211_API_KEY']

The gate as it exists on litellm main today also passes against this branch, so this PR is safe to merge on its own and cannot turn code-quality or documentation red for any open litellm PR.

…rom the reference table

142 environment variables read under litellm/ have no row here. All of them are
reached through a bare get_secret or get_secret_str call, which the CI gate that
enforces this table does not recognise, so none has ever been required to have one.

32 are operational settings nobody could have found without reading the source, and
those are written individually from their call sites: WORKER_CONFIG, DISABLE_KEY_NAME,
PROMETHEUS_SELECTED_INSTANCE, AWS_BEDROCK_RUNTIME_ENDPOINT, the xAI OAuth file and
directory, and the watsonx alias family among them. REDIS_AZURE_AD_TOKEN is the clearest
case for reading the code rather than the name: it is a boolean flag that turns on Azure
AD authentication, not a token.

The remaining 110 are provider API keys and base URLs in a uniform shape, with the
default base URL given wherever the call site names one. Every alias says which name
takes precedence, since a reader looking at TOGETHER_API_KEY, TOGETHER_AI_API_KEY,
TOGETHERAI_API_KEY and TOGETHER_AI_TOKEN has no way to tell from the names alone that
they are read in exactly that order.

AI211_API_KEY is deliberately absent. It is a misspelling of AI21_API_KEY read by a
function that has no callers, and documenting it would make the typo public API
@vercel

vercel Bot commented Aug 5, 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 5, 2026 7:34pm

Request Review

@yassin-berriai
yassin-berriai merged commit 0e7f323 into main Aug 5, 2026
2 checks passed
@yassin-berriai
yassin-berriai deleted the litellm_env_key_full_reference_rows branch August 5, 2026 19:53
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