From a2b575d6cd1988afafd6ba50bf024caf3fed2d7c Mon Sep 17 00:00:00 2001 From: kerry Date: Sat, 10 Oct 2026 19:12:48 +0000 Subject: [PATCH] feat(ui): label the System One yes / no question type noul and explain it on hover Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../components/systemOneUI/SystemOneForm.tsx | 9 +++++++-- .../systemOneUI/SystemOneUI.integration.test.tsx | 2 +- .../components/systemOneUI/SystemOneUI.tsx | 16 +++++++++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneForm.tsx b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneForm.tsx index 5d53bc2d620..cfffb30bb5d 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneForm.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneForm.tsx @@ -27,7 +27,12 @@ import { import type { SystemOnePayloadValidation } from "./lib/validatePayload"; const QUESTION_TYPES: readonly QuestionType[] = ["choice", "noul", "score"]; -const TYPE_LABELS: Record = { choice: "Choice", noul: "Yes / no", score: "Score" }; +const TYPE_LABELS: Record = { choice: "Choice", noul: "noul", score: "Score" }; +const TYPE_HELP: Record = { + choice: undefined, + noul: "noul is a yes / no question", + score: undefined, +}; const isQuestionType = (value: unknown): value is QuestionType => QUESTION_TYPES.some((type) => type === value); @@ -219,7 +224,7 @@ function QuestionCard({ name, question, taken, onChange, onRename, onRemove }: Q {QUESTION_TYPES.map((type) => ( - + {TYPE_LABELS[type]} ))} diff --git a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneUI.integration.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneUI.integration.test.tsx index ab0a67dbbab..a20991ba460 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneUI.integration.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneUI.integration.test.tsx @@ -874,7 +874,7 @@ describe("SystemOneUI integration", () => { fill(question("team").getByRole("textbox", { name: "Description of infra" }), "Deploys"); await user.click(screen.getByRole("button", { name: "Add question" })); - await pickAnswerType(user, "question_1", "Yes / no"); + await pickAnswerType(user, "question_1", "noul"); rename(question("question_1").getByRole("textbox", { name: "Question name" }), "urgent"); fill(question("urgent").getByRole("textbox", { name: "Instructions" }), "Is this blocking users?"); fill(question("urgent").getByRole("textbox", { name: "Yes means" }), "Nobody can log in"); diff --git a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneUI.tsx b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneUI.tsx index 02d42851b8e..9b01b8955cf 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneUI.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/playground/components/systemOneUI/SystemOneUI.tsx @@ -5,6 +5,7 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { SimpleTooltip } from "@/components/ui/tooltip"; import { SearchSelect } from "@/components/shared/SearchSelect"; import { DECISIONS_DOCS_URL } from "@/lib/decisionModels"; import { uiHref } from "@/utils/uiHref"; @@ -35,6 +36,7 @@ interface SystemOneSendVariables { signal: AbortSignal; } +export const NOUL_HELP = "noul is a yes / no question. The model returns the probability that the answer is yes."; const DECISION_MODELS_DISCUSSION_URL = "https://github.com/BerriAI/litellm/discussions/44231"; function getCustomProxyBaseUrl(): string | undefined { @@ -229,9 +231,17 @@ export default function SystemOneUI({ accessToken, disabledPersonalKeyCreation = {endpoint} - {endpoint === "/v1/decisions" - ? "Uses input and a questions array with predicate, choice, and score questions. Edit the form or JSON and inspect the response JSON in the OpenAI Decisions format." - : "Uses state and a questions object with noul, choice, and score questions in the System One format."}{" "} + {endpoint === "/v1/decisions" ? ( + "Uses input and a questions array with predicate, choice, and score questions. Edit the form or JSON and inspect the response JSON in the OpenAI Decisions format." + ) : ( + <> + Uses state and a questions object with{" "} + + noul + + , choice, and score questions in the System One format. + + )}{" "} Pick a decision model under Model, or omit model to use the proxy's configured default.{" "} How to call /v1/decisions and /v1/systemone