mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
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. |
||
|---|---|---|
| .. | ||
| litellm-dashboard | ||
| Dockerfile | ||
| nginx.conf | ||