Skip to content

Commit a736219

Browse files
safe1ineclaude
andcommitted
Update model pricing and recommendations
Add missing supported model pricing entries and highlight recommended built-in models while improving the quota label contrast. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent d57fa3e commit a736219

4 files changed

Lines changed: 57 additions & 2 deletions

File tree

frontend/src/components/console/nav/free-model-usage-indicator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export function FreeModelQuotaIndicator() {
149149
indicatorClassName={getQuotaCircularProgressClassName(usedProgress)}
150150
aria-hidden="true"
151151
/>
152-
<span className="hidden text-muted-foreground lg:inline">今日免费额度剩余</span>
152+
<span className="hidden lg:inline">今日免费额度剩余</span>
153153
<span className="font-medium">{formatTokenNumber(remainingTokens)}</span>
154154
</button>
155155
</HoverCardTrigger>

frontend/src/components/console/task/model-select.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,31 @@ export default function ModelSelect({
185185
return selectedModel ? getModelOptionDisplayName(selectedModel) : ""
186186
}
187187

188+
const getRecommendedModelBadge = (modelName?: string | null) => {
189+
const normalizedModelName = modelName?.trim().toLowerCase()
190+
if (!normalizedModelName) {
191+
return null
192+
}
193+
194+
const builtinModelName = getBuiltinModelName(normalizedModelName)
195+
const nestedModelName = builtinModelName
196+
? normalizedModelName.slice(builtinModelName.length).replace(/^\/+/, "")
197+
: normalizedModelName
198+
199+
if (
200+
(builtinModelName === "monkeycode-basic" && nestedModelName === "qwen3.5-plus")
201+
|| (builtinModelName === "monkeycode-pro" && nestedModelName === "qwen3.6-plus")
202+
|| (builtinModelName === "monkeycode-ultra" && nestedModelName === "gpt-5.5")
203+
) {
204+
return "推荐"
205+
}
206+
207+
return null
208+
}
209+
188210
const renderModelOption = (model: DomainModel, nested = false, indented = false) => {
189211
const displayName = getModelOptionDisplayName(model, nested)
212+
const recommendedBadge = getRecommendedModelBadge(model.model)
190213

191214
return (
192215
<DropdownMenuRadioItem
@@ -203,6 +226,9 @@ export default function ModelSelect({
203226
<span className="truncate">{displayName}</span>
204227
</div>
205228
<div className="ml-auto flex shrink-0 items-center justify-end gap-1.5">
229+
{recommendedBadge ? (
230+
<Badge variant="secondary" className="shrink-0">{recommendedBadge}</Badge>
231+
) : null}
206232
{model.owner?.type !== ConstsOwnerType.OwnerTypePublic && getOwnerTypeBadge(model.owner)}
207233
</div>
208234
</DropdownMenuRadioItem>

frontend/src/pages/console/user/task/task-detail.tsx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,11 +753,34 @@ export default function TaskDetailPage() {
753753
return currentModel ? getModelOptionDisplayName(currentModel) : getModelDisplayName(currentModelName)
754754
}, [currentModel, currentModelName, getModelOptionDisplayName, isMobile])
755755

756+
const getRecommendedModelBadge = React.useCallback((modelName?: string | null) => {
757+
const normalizedModelName = modelName?.trim().toLowerCase()
758+
if (!normalizedModelName) {
759+
return null
760+
}
761+
762+
const builtinModelName = getBuiltinModelName(normalizedModelName)
763+
const nestedModelName = builtinModelName
764+
? normalizedModelName.slice(builtinModelName.length).replace(/^\/+/, "")
765+
: normalizedModelName
766+
767+
if (
768+
(builtinModelName === "monkeycode-basic" && nestedModelName === "qwen3.5-plus")
769+
|| (builtinModelName === "monkeycode-pro" && nestedModelName === "qwen3.6-plus")
770+
|| (builtinModelName === "monkeycode-ultra" && nestedModelName === "gpt-5.5")
771+
) {
772+
return "推荐"
773+
}
774+
775+
return null
776+
}, [])
777+
756778
const renderModelSwitchOption = React.useCallback((model: DomainModel, nested = false, indented = false) => {
757779
const modelName = model.model || "未知模型"
758780
const isSelected = model.id === currentModelId || (!currentModelId && model.model === currentModelName)
759781
const canUseModel = canUseModelBySubscription(model, subscription)
760782
const displayName = getModelOptionDisplayName(model, nested)
783+
const recommendedBadge = getRecommendedModelBadge(model.model)
761784

762785
return (
763786
<DropdownMenuRadioItem
@@ -784,11 +807,14 @@ export default function TaskDetailPage() {
784807
<span className="truncate">{displayName}</span>
785808
</div>
786809
<div className="ml-auto flex shrink-0 items-center justify-end gap-1.5">
810+
{recommendedBadge ? (
811+
<Badge variant="secondary" className="shrink-0">{recommendedBadge}</Badge>
812+
) : null}
787813
{model.owner?.type !== ConstsOwnerType.OwnerTypePublic && getOwnerTypeBadge(model.owner)}
788814
</div>
789815
</DropdownMenuRadioItem>
790816
)
791-
}, [currentModelId, currentModelName, getModelOptionDisplayName, handleOpenSubscriptionPlan, handleRequestModelSwitch, subscription])
817+
}, [currentModelId, currentModelName, getModelOptionDisplayName, getRecommendedModelBadge, handleOpenSubscriptionPlan, handleRequestModelSwitch, subscription])
792818

793819
const renderModelSwitchGroupHeader = React.useCallback((group: { key: string; label: string; badge?: string; badgeVariant?: "default" | "secondary"; iconName?: string; models: DomainModel[] }) => (
794820
<div key={group.key} className="flex min-w-0 items-center gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground">

frontend/src/utils/common.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export type ModelPricingItem = {
173173

174174
export const modelPricingList: readonly ModelPricingItem[] = [
175175
{ model: "minimax-m2.7", credits: 250, score: 637, tags: [] },
176+
{ model: "minimax-m2.5", credits: 150, score: 513, tags: [] },
176177
{ model: "deepseek-v4-pro", credits: 600, score: 852, tags: [] },
177178
{ model: "qwen3.5-plus", credits: 150, score: 538, tags: ["长上下文"] },
178179
{ model: "gpt-5.5", credits: 1000, score: 967, tags: ["最新", "很强"] },
@@ -182,6 +183,8 @@ export const modelPricingList: readonly ModelPricingItem[] = [
182183
{ model: "glm-5", credits: 600, score: 847, tags: [] },
183184
{ model: "glm-4.7", credits: 400, score: 709, tags: [] },
184185
{ model: "kimi-k2.6", credits: 700, score: 912, tags: [] },
186+
{ model: "kimi-k2.5", credits: 150, score: 579, tags: [] },
187+
{ model: "qwen3.6-max", credits: 600, score: 892, tags: ["长上下文"] },
185188
{ model: "qwen3.6-plus", credits: 300, score: 751, tags: ["长上下文"] },
186189
]
187190

0 commit comments

Comments
 (0)