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
This commit is contained in:
5 files changed
+2
-69
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
@@ -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<R
|
||||
* Stealth models are models that are compatible with the OpenRouter API but not listed on the OpenRouter website or API.
|
||||
*/
|
||||
const CLINE_STEALTH_MODELS: Record<string, ModelInfo> = {
|
||||
"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<string, ModelInfo>): Record<string, ModelInfo> {
|
||||
|
||||
@@ -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<string, { order: string[]; allow_fallbacks: boolean }> = {
|
||||
// Exacto Providers
|
||||
"moonshotai/kimi-k2:exacto": {
|
||||
|
||||
@@ -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 (
|
||||
<div style={containerStyle}>
|
||||
<VSCodeButton appearance="icon" data-testid="close-button" onClick={hideAnnouncement} style={closeIconStyle}>
|
||||
|
||||
@@ -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<OpenRouterModelPickerProps> = ({ isPopup, currentMode }) => {
|
||||
|
||||
Reference in new issue
Block a user