Skip to content

fix(ui): regenerate the dashboard API types for reject_unregistered_guardrails - #53289

Merged
mateo-berri merged 1 commit into
mainfrom
litellm_regenerate_dashboard_api_types
Nov 21, 2026
Merged

mateo-berri merged 1 commit into
mainfrom
litellm_regenerate_dashboard_api_types

Conversation

@mateo-berri

Copy link
Copy Markdown
Contributor

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:

How it solves it:

  • Regenerates schema.d.ts with npm run gen:api
  • Adds only the six lines for that setting

User Flow

Before: a contributor's pull request cannot merge, because a required check fails on a file they did not touch

  1. They open a pull request against main at https://github.com/BerriAI/litellm/pulls that changes a file under litellm/
  2. The ui-api-types job fails with Generated API types are out of sync with the proxy OpenAPI spec
  3. The required lint passed check turns red, so the merge button stays blocked

After: the same pull request passes that job once it has this change

  1. They open a pull request against main at https://github.com/BerriAI/litellm/pulls that changes a file under litellm/
  2. The ui-api-types job prints schema.d.ts is in sync with the proxy OpenAPI spec
  3. The required lint passed check no longer fails on that job

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • 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
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

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

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's ui-api-types job already is the test

Main fails the job at b0366b6 (run)

+            reject_unregistered_guardrails: boolean;
##[error]Generated API types are out of sync with the proxy OpenAPI spec.
##[error]Process completed with exit code 1.

At 4012eb6, the merge base, the generator writes exactly this diff

$ uv run --no-sync python litellm/scripts/prisma_generate_if_needed.py
$ uv run --no-sync python -m litellm.proxy._lazy_openapi_snapshot
$ (cd litellm/ui/litellm-dashboard && LITELLM_PYTHON="uv run --no-sync python" npm run gen:api)
$ git diff --stat
 litellm/ui/litellm-dashboard/src/lib/http/schema.d.ts | 6 ++++++
 1 file changed, 6 insertions(+)

At 618e8f9 make check runs the dashboard lint and the same sync check, and both pass

    ran:     dashboard lint (prettier + eslint + lint budgets)
    ran:     dashboard API-type sync (npm run gen:api)
check: PASS

Type

🐛 Bug Fix

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

…uardrails

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

Copy link
Copy Markdown
Contributor

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

@veria-ai

veria-ai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

@mateo-berri mateo-berri added the autoapprove This PR may be autoapproved by greptile. The author thinks that it does not need human review. label Nov 21, 2026
@mateo-berri

Copy link
Copy Markdown
Contributor Author

@greptileai

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This generated-type update appears safe to merge.

Summary

Adds reject_unregistered_guardrails to the dashboard’s generated API types. Its boolean type, false default, and description match the backend field. No actionable issues found. Review checks were static; generation and tests were not rerun.

  • Dashboard API types now include the guardrail rejection setting.

Reviews (1) · Last reviewed commit: "fix(ui): regenerate the dashboard API ty..." · Reviewed by Greptile

@mateo-berri
mateo-berri merged commit 1392828 into main Nov 21, 2026
48 checks passed
@mateo-berri
mateo-berri deleted the litellm_regenerate_dashboard_api_types branch November 21, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autoapprove This PR may be autoapproved by greptile. The author thinks that it does not need human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant