Add code-supernova stealth model (#6327)
* Update announcement banner * Fix banner buttons --------- Co-authored-by: pashpashpash <nik@cline.bot>
This commit is contained in:
1 parent
07b49baa2a
commit
d07648746a
7 files changed
+71
-46
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Add code-supernova stealth model
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
+5
-5
@@ -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
|
||||
|
||||
@@ -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) => {
|
||||
<h3 style={h3TitleStyle}>
|
||||
🎉{" "}New in v{minorVersion}
|
||||
</h3>
|
||||
<h3 style={h3TitleStyle}>JetBrains Support is Live!</h3>
|
||||
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.
|
||||
<b>Free Stealth Model 🥷:</b> Try code-supernova, an agentic coding model built for Cline with 200k context window and
|
||||
multi-modal support!
|
||||
<div style={{ margin: "8px 0" }} />
|
||||
{user ? (
|
||||
!didClickCodeSupernovaButton ? (
|
||||
<VSCodeButton appearance="primary" onClick={setCodeSupernova}>
|
||||
Try code-supernova
|
||||
</VSCodeButton>
|
||||
) : null
|
||||
) : null}
|
||||
<div style={{ margin: "12px 0" }} />
|
||||
<VSCodeLink
|
||||
href="https://cline.bot/jetbrains"
|
||||
style={{
|
||||
padding: "4px 8px",
|
||||
backgroundColor: "var(--vscode-button-background)",
|
||||
color: "var(--vscode-button-foreground)",
|
||||
borderRadius: "2px",
|
||||
}}>
|
||||
Get Cline for JetBrains!
|
||||
</VSCodeLink>
|
||||
<div style={{ margin: "12px 0" }} />
|
||||
<b>Extended Grok Promotion:</b> 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
|
||||
<div style={{ margin: "12px 0" }} />
|
||||
<b>Accesibility Improvements:</b> Improved screen reader support throughout Cline
|
||||
<div style={{ margin: "18px 0" }} />
|
||||
<b>Continued Grok Promotion:</b> Free grok-code-fast-1 access extended!
|
||||
<div style={{ margin: "10px 0" }} />
|
||||
{user ? (
|
||||
!didClickGrokCodeButton ? (
|
||||
<VSCodeButton appearance="primary" onClick={setGrokCodeFast1}>
|
||||
Try grok-code-fast-1 (free)
|
||||
Try grok-code-fast-1
|
||||
</VSCodeButton>
|
||||
) : null
|
||||
) : (
|
||||
<VSCodeButton appearance="secondary" onClick={handleShowAccount}>
|
||||
<VSCodeButton appearance="primary" onClick={handleShowAccount}>
|
||||
Sign Up with Cline
|
||||
</VSCodeButton>
|
||||
)}
|
||||
<div style={{ margin: "12px 0" }} />
|
||||
<b>JetBrains Support is Live!</b>
|
||||
<br />
|
||||
Use Cline in IntelliJ IDEA, PyCharm, WebStorm, Android Studio, GoLand, PhpStorm, and all JetBrains IDEs.
|
||||
<div style={{ margin: "10px 0" }} />
|
||||
<VSCodeButtonLink href="https://cline.bot/jetbrains">Get Cline for JetBrains!</VSCodeButtonLink>
|
||||
<div style={{ margin: "12px 0" }} />
|
||||
<div style={{ margin: "-8px 0 -3px 0" }}>
|
||||
<Accordion className="pl-0" isCompact>
|
||||
<AccordionItem
|
||||
|
||||
@@ -60,6 +60,11 @@ const featuredModels = [
|
||||
description: "Advanced model with 262K context for complex coding",
|
||||
label: "Free",
|
||||
},
|
||||
{
|
||||
id: "cline/code-supernova",
|
||||
description: "Stealth coding model with image support",
|
||||
label: "Free",
|
||||
},
|
||||
]
|
||||
|
||||
const OpenRouterModelPicker: React.FC<OpenRouterModelPickerProps> = ({ isPopup, currentMode }) => {
|
||||
|
||||
Reference in new issue
Block a user