Repository navigation
fix(params): keep _litellm_* kwargs out of provider request bodies by construction - #43183
Closed
shreshth-berri wants to merge 1 commit into
Closed
shreshth-berri wants to merge 1 commit into
shreshth-berri wants to merge 1 commit into
Conversation
Contributor
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
… construction Kwargs LiteLLM code introduces for its own use were only kept out of provider bodies if someone also listed them in all_litellm_params. Undeclared ones went into extra_body or optional_params and reached the provider. get_non_default_completion_params now treats any _litellm_ prefixed name as LiteLLM-owned Refs LIT-8318
shrey-berri
force-pushed
the
litellm_internal_kwarg_prefix
branch
from
September 25, 2026 21:28
655e221 to
4707651
Compare
Contributor
|
This shipped on main in #43221, so internal litellm kwargs no longer reach provider request bodies. Reopen if something is missing |
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.
TLDR
Problem this solves:
_litellm_*key went upstream inextra_bodyor top level_litellm_keyHow it solves it:
_litellm_prefix now means LiteLLM-owned, no registry entry neededis_litellm_owned_kwargruleall_litellm_paramsstays the list for everything elseUser Flow
Before: a request carrying a LiteLLM internal key is rejected by the provider
"_litellm_sentinel": "x"in the body_litellm_sentinelto OpenAI inside the request bodyAfter: the same request succeeds and the internal key never leaves the proxy
"_litellm_sentinel": "x"_litellm_sentinelbefore building the provider requestLinear ticket
Resolves LIT-8318
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Shared setup:
litellm/proxy/dev_config.yamlwith anopenai/gpt-4.1-minideployment namedgpt-4.1-mini, proxy started withpython litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debugBefore (081f73f)
_litellm_sentinel>After (655e221)
Type
🐛 Bug Fix
Caveats (if any)
Low
_litellm_*body key is now dropped instead of forwardedFinal Attestation