Skip to content

fix(ci): register the OSS auth pass-through on a real FastAPI app in its test - #44402

Closed
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
litellm_ci_heal_passthrough_auth_real_app
Closed

devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
litellm_ci_heal_passthrough_auth_real_app

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

How it solves it:

  • feat(decisions): add unified /v1/decisions endpoint for Jev-compatible providers #44236 made the pass-through route adder read app.state to skip lazy feature routes, on purpose
  • The test built its app as MagicMock(spec=FastAPI), which has no state attribute
  • The test now registers on a real FastAPI() app, so it runs the same code production runs
  • It now also asserts the /forwarder route exists once with route-level user_api_key_auth
  • No product code changes

The earlier red on b024950 (run 37140923245, prisma span table test) is already fixed on main by #44384

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<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
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Screenshots / Proof of Fix

Test-only change, so the proof is the previously red proxy-infra / Run tests job passing on this PR's tip. Link pending CI

Type

✅ Test

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

Link to Devin session: https://app.devin.ai/sessions/5fc584cba6624610bf8cc2d2abdd7e95
Open in Devin Desktop: https://app.devin.ai/desktop/session/5fc584cba6624610bf8cc2d2abdd7e95?variant=devin


Note

Low Risk
Test-only change with no production code paths modified.

Overview
Fixes a failing OSS pass-through registration test by using a real FastAPI app instead of a MagicMock, so registration exercises the same app.state access that broke CI after #44236.

The test now also verifies that /forwarder is registered once with user_api_key_auth on the route, is listed in LiteLLMRoutes.openai_routes, and is recorded in the pass-through registry with auth=True, with teardown that restores the shared routes list.

Reviewed by Cursor Bugbot for commit 3be0140. Bugbot is set up for automated code reviews on this repo. Configure here.

…its test

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from a team October 3, 2026 17:57
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Test file refactored to use real FastAPI app instead of mock.

The PR appears safe to merge; no outstanding finding or new actionable issue was identified

Summary

The PR updates an OSS pass-through registration test to use a real FastAPI app and verify the authenticated route. The latest changes isolate the route registry and restore the shared route list after the test

Reviews (2) · Last reviewed commit: "test(proxy): restore pass-through route ..."

@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…egistration test

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 3be0140. Configure here.

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

Superseded by #44403, which landed the same real FastAPI app fix first; proxy-infra is green on main at a57cdfd

@mateo-berri mateo-berri closed this Oct 3, 2026
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