Repository navigation
feat(ui): replace Reset example with an Example preset dropdown and a Clear button on the Decisions tab - #45848
Conversation
… Clear button on the Decisions tab Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
kerry seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
bugbot run |
|
… out of Clear and preset picks Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
|
bugbot run |
There was a problem hiding this comment.
✅ 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 f0f852c. Configure here.
TLDR
Problem this solves:
How it solves it:
Intentional product change: the Reset example button is gone. Its job is done by picking the preset again from the dropdown
User Flow
Before: one example, edit it by hand to try another question type
After: pick a preset, see it is Custom once edited, Clear to start from nothing
modelignored (matchPreset), so picking a model or reordering keys keeps the preset label, and a request that omitsmodelkeeps omitting it through Clear and preset picks (bot findings on 290bc6a, fixed in e8b5f32)Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
npx vitest run "src/app/(dashboard)/playground/components/systemOneUI/lib/example.test.ts" "src/app/(dashboard)/playground/components/systemOneUI/SystemOneUI.integration.test.tsx". Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)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
Admin UI dev server (
npm run devinui/litellm-dashboard) on http://localhost:3000 in front of a live proxy on http://localhost:4000 with a realazure/microsoft-decision-1deployment, Playground > Decisions, /v1/systemoneBefore (7831d8a)
After (e8b5f32)
Each new preset sent to the live model exactly as the dropdown builds it, as the end user would by clicking Send:
Mutation check: changing the Moderate a forum comment preset's question type to
"predicate"makeslib/example.test.tsfail on the /v1/systemone validation, and removing thequestions: {}fromemptyPayloadmakes the "clears the whole request" integration test fail because the form no longer renders Add questionType
🆕 New Feature
Caveats (if any)
Low
{"model": "...", "state": "", "questions": {}}rather than{}CI note
The non-required
code-qualityjob is red on this PR becausetests/code_coverage_tests/test_proxy_types_import.pyfails withmodule litellm has no attribute proxy. That is already the case on main at the merge base (this branch has no non-UI diff against main, and the script fails the same way locally on main), the last change tolitellm/__init__.pybefore it is #44927, and main has not run the test-linting workflow since 2026-10-07. Not fixed hereFinal Attestation
Link to Devin session: https://app.devin.ai/sessions/f08f36d6b15149878bc762ca06e03409
Open in Devin Desktop: https://app.devin.ai/desktop/session/f08f36d6b15149878bc762ca06e03409?variant=devin
Requested by: @kerry-berri
Note
Devin errored when opening this Pull Request as kerry-berri.
As a fallback, Devin opened this PR as itself.
Note
Low Risk
Playground UI and local example helpers only; no proxy or auth changes.
Overview
The Decisions playground replaces “Reset example” with an Example dropdown (four presets: bug triage, support routing, moderation, lead scoring) and a Clear button that blanks input/questions while keeping the selected model.
Presets load the full request on both
/v1/systemoneand/v1/decisions(OpenAI-shaped viatoOpenAIDecisionsRequest). The dropdown shows Custom when the payload no longer matches a preset (matchPresetignoresmodel). Picking a preset again restores that example; Clear disables Send until the request is valid again.lib/example.tscentralizesDECISION_PRESETS,presetPayload,emptyPayload, and matching logic; integration and unit tests cover preset switching, clear-from-empty, model-agnostic matching, and/v1/decisionsbehavior.Reviewed by Cursor Bugbot for commit f0f852c. Bugbot is set up for automated code reviews on this repo. Configure here.