From 8f31821442b39f092e6bbf4dd53b04c3b1ba3f3c Mon Sep 17 00:00:00 2001 From: Will Chen Date: Tue, 30 Sep 2025 12:58:17 -0700 Subject: [PATCH] super value (#1408) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > [!NOTE] > Introduces a new `auto` model `value` (Super Value Pro), adds configurable tag colors across model types, and updates Model Picker filtering and badges. > > - **Models and Types**: > - Add new auto model `value` ("Super Value (Pro)") with `tag: Budget` and `tagColor`. > - Enhance `turbo` auto model with `tag: Fast` and `tagColor`. > - Extend `LanguageModel` and `ModelOption` with optional `tagColor`. > - **Model Picker UI**: > - Render model tags with configurable colors via `tagColor` and `cn` utility. > - Update "Pro only" badge logic (hide when display name already includes "(Pro)"); adjust badge text size. > - Refine auto model visibility: non‑Pro hides `turbo` and `value`; Pro hides `free`. > - Minor styling/labeling tweaks in tag and badge rendering. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 4485fddad502237d4bceb43732043d3eaa60eaa0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- src/components/ModelPicker.tsx | 21 ++++++++++++++------- src/ipc/ipc_types.ts | 2 ++ src/ipc/shared/language_model_constants.ts | 13 +++++++++++++ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/components/ModelPicker.tsx b/src/components/ModelPicker.tsx index 552fb26..51e63c4 100644 --- a/src/components/ModelPicker.tsx +++ b/src/components/ModelPicker.tsx @@ -26,6 +26,7 @@ import { useLanguageModelProviders } from "@/hooks/useLanguageModelProviders"; import { useSettings } from "@/hooks/useSettings"; import { PriceBadge } from "@/components/PriceBadge"; import { TURBO_MODELS } from "@/ipc/shared/language_model_constants"; +import { cn } from "@/lib/utils"; export function ModelPicker() { const { settings, updateSettings } = useSettings(); @@ -112,7 +113,7 @@ export function ModelPicker() { if ( settings && !isDyadProEnabled(settings) && - model.apiName === "turbo" + ["turbo", "value"].includes(model.apiName) ) { return false; } @@ -237,13 +238,19 @@ export function ModelPicker() {
- {isSmartAutoEnabled && ( - - Pro only - - )} + {isSmartAutoEnabled && + !model.displayName.includes("(Pro)") && ( + + Pro only + + )} {model.tag && ( - + {model.tag} )} diff --git a/src/ipc/ipc_types.ts b/src/ipc/ipc_types.ts index 2005eea..d603618 100644 --- a/src/ipc/ipc_types.ts +++ b/src/ipc/ipc_types.ts @@ -186,6 +186,7 @@ export type LanguageModel = displayName: string; description: string; tag?: string; + tagColor?: string; maxOutputTokens?: number; contextWindow?: number; temperature?: number; @@ -197,6 +198,7 @@ export type LanguageModel = displayName: string; description: string; tag?: string; + tagColor?: string; maxOutputTokens?: number; contextWindow?: number; temperature?: number; diff --git a/src/ipc/shared/language_model_constants.ts b/src/ipc/shared/language_model_constants.ts index be3945a..6ba80d5 100644 --- a/src/ipc/shared/language_model_constants.ts +++ b/src/ipc/shared/language_model_constants.ts @@ -13,6 +13,7 @@ export interface ModelOption { dollarSigns?: number; temperature?: number; tag?: string; + tagColor?: string; maxOutputTokens?: number; contextWindow?: number; } @@ -249,6 +250,18 @@ export const MODEL_OPTIONS: Record = { maxOutputTokens: 32_000, contextWindow: 256_000, temperature: 0, + tag: "Fast", + tagColor: "bg-rose-800 text-white", + }, + { + name: "value", + displayName: "Super Value (Pro)", + description: "Uses the most cost-effective models available", + maxOutputTokens: 32_000, + contextWindow: 256_000, + temperature: 0, + tag: "Budget", + tagColor: "bg-emerald-700 text-white", }, ], azure: [