diff --git a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx index 62babed1..02879bf4 100644 --- a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx +++ b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx @@ -1,4 +1,4 @@ -import { openRouterDefaultModelId } from "@shared/api" +import { CLAUDE_SONNET_1M_SUFFIX, openRouterDefaultModelId } from "@shared/api" import { StringRequest } from "@shared/proto/cline/common" import { Mode } from "@shared/storage/types" import { VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react" @@ -11,6 +11,7 @@ import { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock" import { useExtensionState } from "@/context/ExtensionStateContext" import { StateServiceClient } from "@/services/grpc-client" import { highlight } from "../history/HistoryView" +import { ContextWindowSwitcher } from "./common/ContextWindowSwitcher" import { ModelInfoView } from "./common/ModelInfoView" import FeaturedModelCard from "./FeaturedModelCard" import ThinkingBudgetSlider from "./ThinkingBudgetSlider" @@ -227,24 +228,6 @@ const OpenRouterModelPicker: React.FC = ({ isPopup, ) }, [selectedModelId]) - // Check if the current model is Claude Sonnet 4.5 and determine the alternate variant - const claudeSonnet45Variant = useMemo(() => { - if (selectedModelId === "anthropic/claude-sonnet-4.5") { - return { - current: "anthropic/claude-sonnet-4.5", - alternate: "anthropic/claude-sonnet-4.5:1m", - linkText: "Switch to 1M context window model", - } - } else if (selectedModelId === "anthropic/claude-sonnet-4.5:1m") { - return { - current: "anthropic/claude-sonnet-4.5:1m", - alternate: "anthropic/claude-sonnet-4.5", - linkText: "Switch to 200K context window model", - } - } - return null - }, [selectedModelId]) - return (