Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(chat): correct model quality pill to show "high" for high quality

Steven Enamakel36f93b7d61a4
diff --git a/app/src/components/chat/ModelQualityPill.tsx b/app/src/components/chat/ModelQualityPill.tsx
index fb67c5f65e..fbf0986e7a 100644
--- a/app/src/components/chat/ModelQualityPill.tsx
+++ b/app/src/components/chat/ModelQualityPill.tsx
@@ -12,7 +12,13 @@ import { Button } from '../ui';
interface ModelQualityPillProps {
className?: string;
value?: string | null;
- onValueChange?: (value: string, contextWindow?: number | null) => void;
+ /**
+ * `null` means "managed" — the host clears its override and routing falls
+ * back to whatever the product picks. It is deliberately not the empty
+ * string: the host resolves its override with `??`, which passes `''`
+ * straight through as a real (and empty) model id.
+ */
+ onValueChange?: (value: string | null, contextWindow?: number | null) => void;
}
function selectionFromValue(value: string | null | undefined): ProviderModelSelection | null {
@@ -25,9 +31,12 @@ function selectionFromValue(value: string | null | undefined): ProviderModelSele
};
}
-function selectionValue(selection: ProviderModelSelection): string {
+function selectionValue(selection: ProviderModelSelection): string | null {
const { source, model } = selection;
switch (source.kind) {
+ // Managed has no model id to encode — clearing the override IS the choice.
+ case 'managed':
+ return null;
case 'cloud':
return `${source.providerSlug}:${model}`;
case 'local':