mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
fix(ui): make Claude Desktop model-mapping placeholders role-consistent
The menu display name and request model columns used mismatched example brands (DeepSeek vs Kimi), implying a display name maps to an unrelated request model. Derive both placeholders from the row role so each row stays brand-consistent, and route the lightweight Haiku tier to a flash example (deepseek-v4-flash) while other tiers use deepseek-v4-pro.
This commit is contained in:
@@ -942,6 +942,15 @@ export function ClaudeDesktopProviderForm({
|
|||||||
: t("claudeDesktop.routeRoleSonnet", {
|
: t("claudeDesktop.routeRoleSonnet", {
|
||||||
defaultValue: "Sonnet",
|
defaultValue: "Sonnet",
|
||||||
});
|
});
|
||||||
|
// Haiku 档示范映射到轻量模型(flash),其余档映射到 pro;
|
||||||
|
// 两列占位联动,保持每行「菜单显示名 ↔ 实际请求模型」品牌一致。
|
||||||
|
const isHaikuRole = role === "haiku";
|
||||||
|
const labelPlaceholder = isHaikuRole
|
||||||
|
? "DeepSeek V4 Flash"
|
||||||
|
: "DeepSeek V4 Pro";
|
||||||
|
const modelPlaceholder = isHaikuRole
|
||||||
|
? "deepseek-v4-flash"
|
||||||
|
: "deepseek-v4-pro";
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={route.rowId}
|
key={route.rowId}
|
||||||
@@ -957,7 +966,7 @@ export function ClaudeDesktopProviderForm({
|
|||||||
labelOverride: event.target.value,
|
labelOverride: event.target.value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
placeholder="DeepSeek V4 Pro"
|
placeholder={labelPlaceholder}
|
||||||
/>
|
/>
|
||||||
<div className="flex gap-1">
|
<div className="flex gap-1">
|
||||||
<Input
|
<Input
|
||||||
@@ -965,7 +974,7 @@ export function ClaudeDesktopProviderForm({
|
|||||||
onChange={(event) =>
|
onChange={(event) =>
|
||||||
updateRoute(index, { model: event.target.value })
|
updateRoute(index, { model: event.target.value })
|
||||||
}
|
}
|
||||||
placeholder="kimi-k2 / deepseek-chat"
|
placeholder={modelPlaceholder}
|
||||||
className="flex-1"
|
className="flex-1"
|
||||||
/>
|
/>
|
||||||
{fetchedModels.length > 0 && (
|
{fetchedModels.length > 0 && (
|
||||||
|
|||||||
Reference in New Issue
Block a user