litellm/ui
Tin Chi Lo 871bbe8319 fix(auto_router): close the gaps a blast-radius run found in the prompt preview
Five findings, all in surface this PR added, none of them a regression to an
existing path.

The dry-run gate had no test at either form. Deleting the whole block from both
left all 613 tests green, so the mechanism the validate endpoint exists to serve
could have been removed invisibly. One case per form now asserts the save is not
attempted on a rejecting verdict, and one asserts it still is on a passing one.

An Admin Viewer could read the built-in prompt through the GET but got 403 on the
preview, because default-allow only covers safe methods and a POST needs listing.
Both methods on this path are pure reads, so the path joins admin_viewer_routes.

The preview normalized nothing while the write gate strips and caps at 2000, so
an untrimmed preamble previewed with whitespace the router removes, and an
over-long one previewed fine and then failed on save. Both now call one
normalize_classification_prompt, the same shape the prompt builder already uses,
and the hand-rolled negative-window branch gives way to the field's own bound.

A failed preview fetch rendered as a permanent "Loading", so a denied role saw a
spinner rather than an error. The state is now loading, error or ready.

Also: the built-in branch of the edit modal's dropped list was dead, since the
key is managed and filtered earlier, and its comment described the wrong
mechanism; and the prompt editor is renamed CustomTierPromptEditor so it is not
one character from the built-in ClassifierPromptEditor beside it.
2026-08-27 16:16:05 -07:00
..
litellm-dashboard fix(auto_router): close the gaps a blast-radius run found in the prompt preview 2026-08-27 16:16:05 -07:00
Dockerfile chore(build): move the Admin UI toolchain to Node 24 (#35801) 2026-08-04 12:36:07 -07:00
nginx.conf fix(ui): boot the UI image as an arbitrary uid by anchoring nginx writes under /tmp (#37982) 2026-08-24 11:57:36 -07:00