Skip to content

docs(routing): document num_retries precedence and why body max_retries is inert - #734

Open
yassin-berriai wants to merge 1 commit into
mainfrom
litellm_lit4772_num_retries_precedence_docs
Open

docs(routing): document num_retries precedence and why body max_retries is inert#734
yassin-berriai wants to merge 1 commit into
mainfrom
litellm_lit4772_num_retries_precedence_docs

Conversation

@yassin-berriai

Copy link
Copy Markdown
Contributor

Companion to BerriAI/litellm#35483 (LIT-4772)

A customer tested all 32 combinations of num_retries across litellm_settings, model_list, the x-litellm-num-retries header and the request body, and had to reverse engineer the ranking from the observed request counts because it is written down nowhere. They also found that a request body max_retries had stopped doing anything and could not tell whether that was a bug or a deliberate change.

This adds a short subsection under Routing -> Retries listing the four places num_retries can be set and how they rank, and explaining that max_retries is the provider SDK knob rather than a second spelling of num_retries: for a routed call LiteLLM owns retries and pins the provider client to max_retries: 0, which is what stops a deployment num_retries: N from being applied twice and turning one request into (1 + N) ** 2 upstream calls. The x-litellm-num-retries entry in the request headers reference now says it outranks the other three and links to that subsection.

Validated with npm ci && npm run build; the new anchor resolves and the only reported broken links on the touched pages are pre-existing ones this PR does not introduce.

…es is inert

Spell out the four places num_retries can come from and how they rank
(header > request body > model_list litellm_params > litellm_settings), and explain that
max_retries is the provider SDK knob rather than a second spelling of num_retries, so it
has no effect on a routed proxy request.

Companion to BerriAI/litellm#35483 (LIT-4772)
@vercel

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

Request Review

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.

1 participant