diff --git a/.changeset/curvy-eggs-peel.md b/.changeset/curvy-eggs-peel.md new file mode 100644 index 00000000..2f937ca8 --- /dev/null +++ b/.changeset/curvy-eggs-peel.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Add code-supernova stealth model diff --git a/src/core/api/providers/cline.ts b/src/core/api/providers/cline.ts index 277c1c9b..3cf3e0df 100644 --- a/src/core/api/providers/cline.ts +++ b/src/core/api/providers/cline.ts @@ -162,7 +162,7 @@ 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/sonic") { + if (this.getModel().id === "cline/code-supernova") { totalCost = 0 } diff --git a/src/core/api/transform/openrouter-stream.ts b/src/core/api/transform/openrouter-stream.ts index b754ce3b..00d185cc 100644 --- a/src/core/api/transform/openrouter-stream.ts +++ b/src/core/api/transform/openrouter-stream.ts @@ -139,10 +139,6 @@ export async function createOpenRouterStream( reasoning = { max_tokens: budget_tokens } } break - case "cline/sonic": - temperature = 0.7 - topP = 0.95 - break default: if (thinkingBudgetTokens && model.info?.thinkingConfig && thinkingBudgetTokens > 0) { temperature = undefined // extended thinking does not support non-1 temperature diff --git a/src/core/controller/models/refreshOpenRouterModels.ts b/src/core/controller/models/refreshOpenRouterModels.ts index ac5619bf..eadcc366 100644 --- a/src/core/controller/models/refreshOpenRouterModels.ts +++ b/src/core/controller/models/refreshOpenRouterModels.ts @@ -6,7 +6,7 @@ import axios from "axios" import cloneDeep from "clone-deep" import fs from "fs/promises" import path from "path" -import { CLAUDE_SONNET_4_1M_TIERS, clineMicrowaveAlphaModelInfo, openRouterClaudeSonnet41mModelId } from "@/shared/api" +import { CLAUDE_SONNET_4_1M_TIERS, clineCodeSupernovaModelInfo, openRouterClaudeSonnet41mModelId } from "@/shared/api" import { Controller } from ".." type OpenRouterSupportedParams = @@ -222,20 +222,20 @@ export async function refreshOpenRouterModels( } } - // Add hardcoded cline/sonic model - models["cline/sonic"] = OpenRouterModelInfo.create({ - maxTokens: clineMicrowaveAlphaModelInfo.maxTokens ?? 0, - contextWindow: clineMicrowaveAlphaModelInfo.contextWindow ?? 0, - supportsImages: clineMicrowaveAlphaModelInfo.supportsImages ?? false, - supportsPromptCache: clineMicrowaveAlphaModelInfo.supportsPromptCache ?? false, - inputPrice: clineMicrowaveAlphaModelInfo.inputPrice ?? 0, - outputPrice: clineMicrowaveAlphaModelInfo.outputPrice ?? 0, - cacheWritesPrice: clineMicrowaveAlphaModelInfo.cacheWritesPrice ?? 0, - cacheReadsPrice: clineMicrowaveAlphaModelInfo.cacheReadsPrice ?? 0, - description: clineMicrowaveAlphaModelInfo.description ?? "", - thinkingConfig: clineMicrowaveAlphaModelInfo.thinkingConfig ?? undefined, - supportsGlobalEndpoint: clineMicrowaveAlphaModelInfo.supportsGlobalEndpoint ?? undefined, - tiers: clineMicrowaveAlphaModelInfo.tiers ?? [], + // Add hardcoded stealth model + models["cline/code-supernova"] = OpenRouterModelInfo.create({ + 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 ?? [], }) } else { console.error("Invalid response from OpenRouter API") diff --git a/src/shared/api.ts b/src/shared/api.ts index 9ada4b42..068c3708 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -594,16 +594,16 @@ export const openRouterDefaultModelInfo: ModelInfo = { "Claude Sonnet 4 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 - sonic (same config as grok-4) -export const clineMicrowaveAlphaModelInfo: ModelInfo = { - contextWindow: 262144, - supportsImages: false, +// Cline custom model - code-supernova +export const clineCodeSupernovaModelInfo: ModelInfo = { + contextWindow: 200000, + supportsImages: true, supportsPromptCache: true, inputPrice: 0, outputPrice: 0, cacheReadsPrice: 0, cacheWritesPrice: 0, // Not specified in grok-4, setting to 0 - description: "Cline Microwave Alpha - Advanced model for complex coding tasks with large context window", + description: "A versatile agentic coding stealth model that supports image inputs.", } // Vertex AI // https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude diff --git a/webview-ui/src/components/chat/Announcement.tsx b/webview-ui/src/components/chat/Announcement.tsx index 18e8f101..c6134cda 100644 --- a/webview-ui/src/components/chat/Announcement.tsx +++ b/webview-ui/src/components/chat/Announcement.tsx @@ -6,6 +6,7 @@ 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 VSCodeButtonLink from "../common/VSCodeButtonLink" import { useApiConfigurationHandlers } from "../settings/utils/useApiConfigurationHandlers" interface AnnouncementProps { @@ -47,6 +48,7 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { const { handleFieldsChange } = useApiConfigurationHandlers() const [didClickGrokCodeButton, setDidClickGrokCodeButton] = useState(false) + const [didClickCodeSupernovaButton, setDidClickCodeSupernovaButton] = useState(false) const setGrokCodeFast1 = () => { const modelId = "x-ai/grok-code-fast-1" @@ -66,6 +68,24 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { }, 10) } + const setCodeSupernova = () => { + const modelId = "cline/code-supernova" + // set both plan and act modes to use code-supernova + 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), @@ -80,38 +100,37 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {

🎉{" "}New in v{minorVersion}

-

JetBrains Support is Live!

- Our #1 most requested feature is here! Use Cline natively in IntelliJ IDEA, PyCharm, WebStorm, Android Studio, GoLand, - PhpStorm, and all JetBrains IDEs. Same powerful AI coding, now in your preferred development environment. + Free Stealth Model 🥷: Try code-supernova, an agentic coding model built for Cline with 200k context window and + multi-modal support! +
+ {user ? ( + !didClickCodeSupernovaButton ? ( + + Try code-supernova + + ) : null + ) : null}
- - Get Cline for JetBrains! - -
- Extended Grok Promotion: Free grok-code-fast-1 access extended! We've found this model to be improving - incredibly fast, and it's still available at no cost -
- Accesibility Improvements: Improved screen reader support throughout Cline -
+ Continued Grok Promotion: Free grok-code-fast-1 access extended! +
{user ? ( !didClickGrokCodeButton ? ( - Try grok-code-fast-1 (free) + Try grok-code-fast-1 ) : null ) : ( - + Sign Up with Cline )}
+ JetBrains Support is Live! +
+ Use Cline in IntelliJ IDEA, PyCharm, WebStorm, Android Studio, GoLand, PhpStorm, and all JetBrains IDEs. +
+ Get Cline for JetBrains! +
= ({ isPopup, currentMode }) => {