From f28e918e24314388ef4fd70601c7fc381a2e6b9e Mon Sep 17 00:00:00 2001 From: decolua Date: Tue, 22 Sep 2026 14:21:15 +0700 Subject: [PATCH] feat(dashboard): add question input for System One and hide inline test Allow customizing evaluation instructions in the System One example card, and disable the inline model probe button for System One models since decision models do not accept chat completion probes. Co-Authored-By: Claude Code --- .../[id]/components/GenericExampleCard.js | 33 +++++++++++++++++++ .../providers/components/ModelsCard.js | 5 +-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/GenericExampleCard.js b/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/GenericExampleCard.js index fea6eced..a1e456f0 100644 --- a/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/GenericExampleCard.js +++ b/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/components/GenericExampleCard.js @@ -54,6 +54,7 @@ export function GenericExampleCard({ providerId, kind }) { const supportsMask = !!selectedModelObj?.capabilities?.includes("mask"); const [input, setInput] = useState(safeExConfig.defaultInput || ""); + const [question, setQuestion] = useState("Does this request require urgent attention?"); const [refImage, setRefImage] = useState(""); const [maskImage, setMaskImage] = useState(""); const [extraValues, setExtraValues] = useState(() => @@ -117,11 +118,20 @@ export function GenericExampleCard({ providerId, kind }) { acc[k] = v; return acc; }, {}); + const systemoneQuestions = kind === "systemone" ? { + questions: { + is_urgent: { + type: "noul", + instructions: question.trim() || "Does this request require urgent attention?", + }, + }, + } : {}; const requestBody = { model: modelFull, [exConfig.bodyKey]: input, ...exConfig.extraBody, ...extraBodyFromFields, + ...systemoneQuestions, ...(supportsEdit && effectiveRefImage ? { image: effectiveRefImage } : {}), ...(supportsMask && effectiveMaskImage ? { mask_image: effectiveMaskImage } : {}), }; @@ -328,6 +338,29 @@ export function GenericExampleCard({ providerId, kind }) { + {/* Question for System One */} + {kind === "systemone" && ( + +
+ setQuestion(e.target.value)} + placeholder="Enter evaluation question or criteria" + className="w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary" + /> + {question && ( + + )} +
+
+ )} + {/* Reference image (only for edit-capable image models) */} {supportsEdit && ( diff --git a/src/app/(dashboard)/dashboard/providers/components/ModelsCard.js b/src/app/(dashboard)/dashboard/providers/components/ModelsCard.js index 9bdf4b41..78bb5df8 100644 --- a/src/app/(dashboard)/dashboard/providers/components/ModelsCard.js +++ b/src/app/(dashboard)/dashboard/providers/components/ModelsCard.js @@ -119,6 +119,7 @@ export default function ModelsCard({ providerId, kindFilter, providerAliasOverri const providerAlias = providerAliasOverride || getProviderAlias(providerId); const effectiveType = kindFilter || "llm"; + const supportsTest = kindFilter !== "systemone"; const fetchData = useCallback(async () => { try { @@ -238,7 +239,7 @@ export default function ModelsCard({ providerId, kindFilter, providerAliasOverri onSetAlias={(alias) => handleSetAlias(model.id, alias)} onDeleteAlias={() => handleDeleteAlias(existingAlias)} testStatus={modelTestResults[model.id]} - onTest={() => handleTestModel(model.id)} + onTest={supportsTest ? () => handleTestModel(model.id) : undefined} isTesting={testingModelId === model.id} isFree={model.isFree} /> @@ -255,7 +256,7 @@ export default function ModelsCard({ providerId, kindFilter, providerAliasOverri onSetAlias={() => {}} onDeleteAlias={() => handleDeleteCustomModel(model.id)} testStatus={modelTestResults[model.id]} - onTest={() => handleTestModel(model.id)} + onTest={supportsTest ? () => handleTestModel(model.id) : undefined} isTesting={testingModelId === model.id} isCustom />