Repository navigation
fix(proxy): treat omitted auth on config pass-through routes as enforced at registration (rc/1.105.0 backport of #44253) - #44258
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 logsrc/1.105.0How 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
rc/1.105.0. Regression from #43962Affected release
Regression in v1.105.0-dev.2
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 tip84b70d58f5only adds a test formatting commit on top ofeeb88475c3, so the production code is identicalThe regression unit test
test_pass_through_registration_auth_enforcementfails its twoconfig-omittedcases onrc/1.105.0and passes with this PRBefore (bb266ad)
After (eeb8847)
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
test_config_pass_through_route_logs_body_and_strips_querywas not run on this line, the live run above covers the same path