From c7c4e433227c4aa0d30481ae6ec91d3045d0193e Mon Sep 17 00:00:00 2001 From: Ara Date: Mon, 27 Oct 2025 12:26:09 -0700 Subject: [PATCH] Remove old models (#7118) * refactor: remove CodeSupernova model and related code Remove the deprecated cline/code-supernova-1-million model from the codebase: - Delete clineCodeSupernovaModelInfo export from shared API - Remove CodeSupernova model entry from CLINE_STEALTH_MODELS - Remove CodeSupernova announcement UI and related state management - Clean up unused imports (EmptyRequest, AccountServiceClient) - Update import formatting in refreshOpenRouterModels This model is no longer supported and has been replaced by other offerings. * hel * fix: bug fixes --- src/core/api/providers/cline.ts | 4 --- .../models/refreshOpenRouterModels.ts | 22 ++------------- src/shared/api.ts | 12 -------- .../src/components/chat/Announcement.tsx | 28 ------------------- .../settings/OpenRouterModelPicker.tsx | 5 ---- 5 files changed, 2 insertions(+), 69 deletions(-) diff --git a/src/core/api/providers/cline.ts b/src/core/api/providers/cline.ts index 0630b89b..edecaf34 100644 --- a/src/core/api/providers/cline.ts +++ b/src/core/api/providers/cline.ts @@ -184,10 +184,6 @@ export class ClineHandler implements ApiHandler { // @ts-ignore-next-line let totalCost = (chunk.usage.cost || 0) + (chunk.usage.cost_details?.upstream_inference_cost || 0) - if (this.getModel().id === "cline/code-supernova-1-million") { - totalCost = 0 - } - if (this.getModel().id === "x-ai/grok-code-fast-1") { totalCost = 0 } diff --git a/src/core/controller/models/refreshOpenRouterModels.ts b/src/core/controller/models/refreshOpenRouterModels.ts index fd91bcc1..ecb557b1 100644 --- a/src/core/controller/models/refreshOpenRouterModels.ts +++ b/src/core/controller/models/refreshOpenRouterModels.ts @@ -4,12 +4,7 @@ import axios from "axios" import cloneDeep from "clone-deep" import fs from "fs/promises" import path from "path" -import { - CLAUDE_SONNET_1M_TIERS, - clineCodeSupernovaModelInfo, - openRouterClaudeSonnet41mModelId, - openRouterClaudeSonnet451mModelId, -} from "@/shared/api" +import { CLAUDE_SONNET_1M_TIERS, openRouterClaudeSonnet41mModelId, openRouterClaudeSonnet451mModelId } from "@/shared/api" import { Controller } from ".." type OpenRouterSupportedParams = @@ -250,21 +245,8 @@ export async function refreshOpenRouterModels(controller: Controller): Promise = { - "cline/code-supernova-1-million": { - maxTokens: clineCodeSupernovaModelInfo.maxTokens ?? 0, - contextWindow: clineCodeSupernovaModelInfo.contextWindow ?? 0, - supportsImages: clineCodeSupernovaModelInfo.supportsImages ?? false, - supportsPromptCache: clineCodeSupernovaModelInfo.supportsPromptCache ?? false, - inputPrice: clineCodeSupernovaModelInfo.inputPrice ?? 0, - outputPrice: clineCodeSupernovaModelInfo.outputPrice ?? 0, - cacheWritesPrice: clineCodeSupernovaModelInfo.cacheWritesPrice ?? 0, - cacheReadsPrice: clineCodeSupernovaModelInfo.cacheReadsPrice ?? 0, - description: clineCodeSupernovaModelInfo.description ?? "", - thinkingConfig: clineCodeSupernovaModelInfo.thinkingConfig ?? undefined, - supportsGlobalEndpoint: clineCodeSupernovaModelInfo.supportsGlobalEndpoint ?? undefined, - tiers: clineCodeSupernovaModelInfo.tiers, - }, // Add more stealth models here as needed + // Right now this list is empty as the latest stealth model was removed } export function appendClineStealthModels(currentModels: Record): Record { diff --git a/src/shared/api.ts b/src/shared/api.ts index 1c496d6d..79c2240a 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -702,18 +702,6 @@ export const openRouterDefaultModelInfo: ModelInfo = { "Claude Sonnet 4.5 delivers superior intelligence across coding, agentic search, and AI agent capabilities. It's a powerful choice for agentic coding, and can complete tasks across the entire software development lifecycle—from initial planning to bug fixes, maintenance to large refactors. It offers strong performance in both planning and solving for complex coding tasks, making it an ideal choice to power end-to-end software development processes.\n\nRead more in the [blog post here](https://www.anthropic.com/claude/sonnet)", } -// Cline custom model - code-supernova -export const clineCodeSupernovaModelInfo: ModelInfo = { - contextWindow: 1000000, - supportsImages: true, - supportsPromptCache: true, - inputPrice: 0, - outputPrice: 0, - cacheReadsPrice: 0, - cacheWritesPrice: 0, - description: "A versatile agentic coding stealth model that supports image inputs.", -} - export const OPENROUTER_PROVIDER_PREFERENCES: Record = { // Exacto Providers "moonshotai/kimi-k2:exacto": { diff --git a/webview-ui/src/components/chat/Announcement.tsx b/webview-ui/src/components/chat/Announcement.tsx index 7dafd0c6..a73bb6b0 100644 --- a/webview-ui/src/components/chat/Announcement.tsx +++ b/webview-ui/src/components/chat/Announcement.tsx @@ -1,10 +1,8 @@ -import { EmptyRequest } from "@shared/proto/cline/common" import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { CSSProperties, memo, useState } from "react" import { useMount } from "react-use" import { useClineAuth } from "@/context/ClineAuthContext" import { useExtensionState } from "@/context/ExtensionStateContext" -import { AccountServiceClient } from "@/services/grpc-client" import { getAsVar, VSC_DESCRIPTION_FOREGROUND, VSC_INACTIVE_SELECTION_BACKGROUND } from "@/utils/vscStyles" import { useApiConfigurationHandlers } from "../settings/utils/useApiConfigurationHandlers" @@ -47,8 +45,6 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { const { handleFieldsChange } = useApiConfigurationHandlers() const [didClickGrokCodeButton, setDidClickGrokCodeButton] = useState(false) - const [didClickCodeSupernovaButton, setDidClickCodeSupernovaButton] = useState(false) - // Need to get latest model list in case user hits shortcut button to set model useMount(refreshOpenRouterModels) @@ -70,30 +66,6 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { }, 10) } - const setCodeSupernova = () => { - const modelId = "cline/code-supernova-1-million" - // set both plan and act modes to use code-supernova-1-million - handleFieldsChange({ - planModeOpenRouterModelId: modelId, - actModeOpenRouterModelId: modelId, - planModeOpenRouterModelInfo: openRouterModels[modelId], - actModeOpenRouterModelInfo: openRouterModels[modelId], - planModeApiProvider: "cline", - actModeApiProvider: "cline", - }) - - setTimeout(() => { - setDidClickCodeSupernovaButton(true) - setShowChatModelSelector(true) - }, 10) - } - - const handleShowAccount = () => { - AccountServiceClient.accountLoginClicked(EmptyRequest.create()).catch((err) => - console.error("Failed to get login URL:", err), - ) - } - return (
diff --git a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx index d236d3da..49c247bd 100644 --- a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx +++ b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx @@ -61,11 +61,6 @@ const featuredModels = [ description: "Advanced model with 262K context for complex coding", label: "Free", }, - { - id: "cline/code-supernova-1-million", - description: "Stealth coding model with image support", - label: "Free", - }, ] const OpenRouterModelPicker: React.FC = ({ isPopup, currentMode }) => {