Repository navigation
fix(proxy): treat omitted auth on config pass-through routes as enforced at registration (stable/1.103.x backport of #44253) - #44256
Closed
yuneng-berri wants to merge 3 commits into
Closed
yuneng-berri wants to merge 3 commits into
yuneng-berri wants to merge 3 commits into
Conversation
Contributor
|
Contributor
Author
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:
authare missing from spend logsstable/1.103.xHow it solves it:
authregisters as enforced, matching request-time authDepends on #44253 landing on main first
User Flow
Before: an admin's config pass-through route with no
authkey hides upstream failures from spend logs/audit-pttogeneral_settings.pass_through_endpointswithinclude_subpath: trueand noauthAfter: the same failed request shows up in spend logs as a failure row
authkeyfailurerow for that request id with error code 403Relevant issues
Backport of #44253 to
stable/1.103.x. Regression from #43962Affected release
Regression in v1.103.2, which carries the #43962 backport (#43984)
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
Live proxy with a real Postgres and a local upstream that always answers 403
{"error": {"message": "max budget reached for this deployment"}}, same config on both sides.MKis the master key andKEYthe virtual key from step 1. The After tip74896fd5c6only adds a test formatting commit on top of653910825c, so the production code is identicalThe regression unit test
test_pass_through_registration_auth_enforcementfails its twoconfig-omittedcases onstable/1.103.xand passes with this PRBefore (3e32c0c)
After (6539108)
Type
🐛 Bug Fix
✅ Test
Caveats (if any)
Severe
authget the same key checks asauth: trueagainallowed_passthrough_routeson subpathsallowed_routes: ["llm_api_routes"]now get 403auth: falseon the entry to keep the old behaviorLow