Repository navigation
fix(ui): regenerate the dashboard API types for reject_unregistered_guardrails - #53289
Merged
Merged
Conversation
…uardrails Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
PR overviewNo security issues were found in this pull request. Reviews
|
Contributor
Author
Contributor
[Low impact] This generated-type update appears safe to merge.
|
3 of 6 tasks
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.
Handwritten 1-3 sentence description
The required lint check has been failing on main and on every pull request that touches the proxy since the new guardrail setting landed without its generated dashboard types. This adds the missing generated lines so the check passes again
Details
Link to Devin session: https://app.devin.ai/sessions/3242d590986444e499b3a5b6958207b4
Open in Devin Desktop: https://app.devin.ai/desktop/session/3242d590986444e499b3a5b6958207b4?variant=devin
Requested by: @mateo-berri
TLDR
Problem this solves:
lint passedis red on main throughui-api-typesreject_unregistered_guardrailswithout regeneratingschema.d.tsHow it solves it:
schema.d.tswithnpm run gen:apiUser Flow
Before: a contributor's pull request cannot merge, because a required check fails on a file they did not touch
mainat https://github.com/BerriAI/litellm/pulls that changes a file underlitellm/ui-api-typesjob fails withGenerated API types are out of sync with the proxy OpenAPI speclint passedcheck turns red, so the merge button stays blockedAfter: the same pull request passes that job once it has this change
mainat https://github.com/BerriAI/litellm/pulls that changes a file underlitellm/ui-api-typesjob printsschema.d.ts is in sync with the proxy OpenAPI speclint passedcheck no longer fails on that jobPre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
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 moreDelays 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
E2E exception at 618e8f9. The whole diff is six generated lines in
litellm/ui/litellm-dashboard/src/lib/http/schema.d.ts, the output of the repo's own generator, so the sync check is the proof and no live proxy run was made. No test is added because CI'sui-api-typesjob already is the testMain fails the job at b0366b6 (run)
At 4012eb6, the merge base, the generator writes exactly this diff
At 618e8f9
make checkruns the dashboard lint and the same sync check, and both passType
🐛 Bug Fix
Final Attestation