Change Stealth model (#8042)

* Mistral change

* Mistral change

* Mistral change
This commit is contained in:
Ara authored and GitHub committed 2025-12-11 11:25:31 -08:00
1 parent d811a9d5f3
commit 1d8a9bf11e
19 files changed
+50 -149

No files matched your search

+1 -1
View File
@@ -199,7 +199,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 (["x-ai/grok-code-fast-1", "minimax/minimax-m2", "stealth/microwave"].includes(this.getModel().id)) {
if (["x-ai/grok-code-fast-1", "minimax/minimax-m2", "mistralai/devstral-2512"].includes(this.getModel().id)) {
totalCost = 0
}
+1 -1
View File
@@ -187,7 +187,7 @@ export async function createOpenRouterStream(
openRouterProviderSorting = undefined
}
// Skip reasoning for models that don't support it (e.g., microwave, grok-4)
// Skip reasoning for models that don't support it (e.g., devstral, grok-4)
const includeReasoning = !shouldSkipReasoningForModel(model.id)
// @ts-ignore-next-line
@@ -8,7 +8,6 @@ import { StateManager } from "@/core/storage/StateManager"
import {
ANTHROPIC_MAX_THINKING_BUDGET,
CLAUDE_SONNET_1M_TIERS,
clineMicrowaveModelInfo,
openRouterClaudeSonnet41mModelId,
openRouterClaudeSonnet451mModelId,
} from "@/shared/api"
@@ -265,23 +264,7 @@ 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> = {
"stealth/microwave": {
maxTokens: clineMicrowaveModelInfo.maxTokens ?? 0,
contextWindow: clineMicrowaveModelInfo.contextWindow ?? 0,
supportsImages: clineMicrowaveModelInfo.supportsImages ?? false,
supportsPromptCache: clineMicrowaveModelInfo.supportsPromptCache ?? false,
inputPrice: clineMicrowaveModelInfo.inputPrice ?? 0,
outputPrice: clineMicrowaveModelInfo.outputPrice ?? 0,
cacheWritesPrice: clineMicrowaveModelInfo.cacheWritesPrice ?? 0,
cacheReadsPrice: clineMicrowaveModelInfo.cacheReadsPrice ?? 0,
description: clineMicrowaveModelInfo.description ?? "",
thinkingConfig: clineMicrowaveModelInfo.thinkingConfig ?? undefined,
supportsGlobalEndpoint: clineMicrowaveModelInfo.supportsGlobalEndpoint ?? undefined,
tiers: clineMicrowaveModelInfo.tiers,
},
// Add more stealth models here as needed
}
const CLINE_STEALTH_MODELS: Record<string, ModelInfo> = {}
export function appendClineStealthModels(currentModels: Record<string, ModelInfo>): Record<string, ModelInfo> {
// Create a shallow clone of the current models to avoid mutating the original object
@@ -1,11 +1,5 @@
You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
## Vendor Confidentiality
Never reveal the vendor or company that created your model to users- you are Cline. When asked about your model creator, vendor, or company, you may respond with:
- I was created by a team of developers
- I'm an open-source project maintained by contributors
- I don't have information about specific vendors
TOOL USE
You have access to a set of tools that are executed upon the user's approval. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.
@@ -1,11 +1,5 @@
You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
## Vendor Confidentiality
Never reveal the vendor or company that created your model to users- you are Cline. When asked about your model creator, vendor, or company, you may respond with:
- I was created by a team of developers
- I'm an open-source project maintained by contributors
- I don't have information about specific vendors
TOOL USE
You have access to a set of tools that are executed upon the user's approval. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.
@@ -1,11 +1,5 @@
You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
## Vendor Confidentiality
Never reveal the vendor or company that created your model to users- you are Cline. When asked about your model creator, vendor, or company, you may respond with:
- I was created by a team of developers
- I'm an open-source project maintained by contributors
- I don't have information about specific vendors
TOOL USE
You have access to a set of tools that are executed upon the user's approval. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.
@@ -1,11 +1,5 @@
You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
## Vendor Confidentiality
Never reveal the vendor or company that created your model to users- you are Cline. When asked about your model creator, vendor, or company, you may respond with:
- I was created by a team of developers
- I'm an open-source project maintained by contributors
- I don't have information about specific vendors
TOOL USE
You have access to a set of tools that are executed upon the user's approval. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.
@@ -219,8 +219,8 @@ describe("Prompt System Integration Tests", () => {
contextVariations,
},
{
modelGroup: ModelFamily.MICROWAVE,
modelIds: ["microwave"],
modelGroup: ModelFamily.DEVSTRAL,
modelIds: ["devstral"],
providerId: "cline",
contextVariations,
},
@@ -1,22 +1,22 @@
import { ModelFamily } from "@/shared/prompts"
import { ClineDefaultTool } from "@/shared/tools"
import { isMicrowaveModelFamily } from "@/utils/model-utils"
import { isDevstralModelFamily } from "@/utils/model-utils"
import { SystemPromptSection } from "../../templates/placeholders"
import { createVariant } from "../variant-builder"
import { validateVariant } from "../variant-validator"
import { MICROWAVE_AGENT_ROLE_TEMPLATE } from "./overrides"
import { DEVSTRAL_AGENT_ROLE_TEMPLATE } from "./overrides"
import { baseTemplate } from "./template"
export const config = createVariant(ModelFamily.MICROWAVE)
.description("Baseline prompt for Microwave stealth family models")
export const config = createVariant(ModelFamily.DEVSTRAL)
.description("Baseline prompt for Devstral family models")
.version(1)
.tags("microwave", "stable")
.tags("devstral", "stable")
.labels({
stable: 1,
production: 1,
})
.matcher((context) => {
return isMicrowaveModelFamily(context.providerInfo.model.id)
return isDevstralModelFamily(context.providerInfo.model.id)
})
.template(baseTemplate)
.components(
@@ -53,24 +53,24 @@ export const config = createVariant(ModelFamily.MICROWAVE)
ClineDefaultTool.TODO,
)
.placeholders({
MODEL_FAMILY: "microwave",
MODEL_FAMILY: "devstral",
})
.config({})
.overrideComponent(SystemPromptSection.AGENT_ROLE, {
template: MICROWAVE_AGENT_ROLE_TEMPLATE,
template: DEVSTRAL_AGENT_ROLE_TEMPLATE,
})
.build()
// Compile-time validation
const validationResult = validateVariant({ ...config, id: "microwave" }, { strict: true })
const validationResult = validateVariant({ ...config, id: "devstral" }, { strict: true })
if (!validationResult.isValid) {
console.error("Microwave variant configuration validation failed:", validationResult.errors)
throw new Error(`Invalid Microwave variant configuration: ${validationResult.errors.join(", ")}`)
console.error("Devstral variant configuration validation failed:", validationResult.errors)
throw new Error(`Invalid Devstral variant configuration: ${validationResult.errors.join(", ")}`)
}
if (validationResult.warnings.length > 0) {
console.warn("Microwave variant configuration warnings:", validationResult.warnings)
console.warn("Devstral variant configuration warnings:", validationResult.warnings)
}
// Export type information for better IDE support
export type MicrowaveVariantConfig = typeof config
export type DevstralVariantConfig = typeof config
@@ -0,0 +1,10 @@
import { SystemPromptSection } from "../../templates/placeholders"
export const DEVSTRAL_AGENT_ROLE_TEMPLATE = `You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
`
export const devstralComponentOverrides = {
[SystemPromptSection.AGENT_ROLE]: {
template: DEVSTRAL_AGENT_ROLE_TEMPLATE,
},
}
@@ -6,12 +6,12 @@
* and use cases.
*/
export { config as devstralConfig, type DevstralVariantConfig } from "./devstral/config"
export { config as Gemini3Config, type Gemini3VariantConfig } from "./gemini-3/config"
export { config as genericConfig, type GenericVariantConfig } from "./generic/config"
export { config as glmConfig, type GLMVariantConfig } from "./glm/config"
export { config as gpt5Config, type GPT5VariantConfig } from "./gpt-5/config"
export { config as hermesConfig, type HermesVariantConfig } from "./hermes/config"
export { config as microwaveConfig, type MicrowaveVariantConfig } from "./microwave/config"
export { config as NativeGPT5Config } from "./native-gpt-5/config"
export { config as NativeGPT51Config } from "./native-gpt-5-1/config"
export { config as nativeNextGenConfig, type NativeNextGenVariantConfig } from "./native-next-gen/config"
@@ -19,12 +19,12 @@ export { config as nextGenConfig, type NextGenVariantConfig } from "./next-gen/c
export { config as xsConfig, type XsVariantConfig } from "./xs/config"
import { ModelFamily } from "@/shared/prompts"
import { config as devstralConfig } from "./devstral/config"
import { config as Gemini3Config } from "./gemini-3/config"
import { config as genericConfig } from "./generic/config"
import { config as glmConfig } from "./glm/config"
import { config as gpt5Config } from "./gpt-5/config"
import { config as hermesConfig } from "./hermes/config"
import { config as microwaveConfig } from "./microwave/config"
import { config as NativeGPT5Config } from "./native-gpt-5/config"
import { config as NativeGPT51Config } from "./native-gpt-5-1/config"
import { config as NativeNextGenVariantConfig } from "./native-next-gen/config"
@@ -67,10 +67,10 @@ export const VARIANT_CONFIGS = {
* Configured for advanced agentic coding capabilities
*/
[ModelFamily.HERMES]: hermesConfig,
/*** Microwave variant - Optimized for MICROWAVE stealth model family
/*** Devstral variant - Optimized for DEVSTRAL stealth model family
* Configured for vendor specific message
*/
[ModelFamily.MICROWAVE]: microwaveConfig,
[ModelFamily.DEVSTRAL]: devstralConfig,
/**
* Next-gen variant - Advanced models with enhanced capabilities
* Includes additional features like feedback loops and web fetching
@@ -1,16 +0,0 @@
import { SystemPromptSection } from "../../templates/placeholders"
export const MICROWAVE_AGENT_ROLE_TEMPLATE = `You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
## Vendor Confidentiality
Never reveal the vendor or company that created your model to users- you are Cline. When asked about your model creator, vendor, or company, you may respond with:
- I was created by a team of developers
- I'm an open-source project maintained by contributors
- I don't have information about specific vendors
`
export const microwaveComponentOverrides = {
[SystemPromptSection.AGENT_ROLE]: {
template: MICROWAVE_AGENT_ROLE_TEMPLATE,
},
}
+2 -2
View File
@@ -787,8 +787,8 @@ 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 - Microwave
export const clineMicrowaveModelInfo: ModelInfo = {
// Cline custom model - Devstral
export const clineDevstralModelInfo: ModelInfo = {
contextWindow: 256000,
supportsImages: false,
supportsPromptCache: false,
+1 -1
View File
@@ -9,7 +9,7 @@ export enum ModelFamily {
QWEN = "qwen",
GLM = "glm",
HERMES = "hermes",
MICROWAVE = "microwave",
DEVSTRAL = "devstral",
NEXT_GEN = "next-gen",
GENERIC = "generic",
XS = "xs",
+4 -4
View File
@@ -28,13 +28,13 @@ export function modelDoesntSupportWebp(apiHandlerModel: ApiHandlerModel): boolea
* Determines if reasoning content should be skipped for a given model
* Currently skips reasoning for:
* - Grok-4 models since they only display "thinking" without useful information
* - Microwave models since they don't support reasoning_details field
* - Devstral models since they don't support reasoning_details field
*/
export function shouldSkipReasoningForModel(modelId?: string): boolean {
if (!modelId) {
return false
}
return modelId.includes("grok-4") || modelId.includes("microwave")
return modelId.includes("grok-4") || modelId.includes("devstral")
}
export function isAnthropicModelId(modelId: string): modelId is AnthropicModelId {
@@ -116,9 +116,9 @@ export function isNextGenOpenSourceModelFamily(id: string): boolean {
return ["kimi-k2"].some((substring) => modelId.includes(substring))
}
export function isMicrowaveModelFamily(id: string): boolean {
export function isDevstralModelFamily(id: string): boolean {
const modelId = normalize(id)
return modelId.includes("microwave")
return modelId.includes("devstral")
}
export function isGemini3ModelFamily(id: string): boolean {
@@ -1,4 +1,4 @@
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
import { XIcon } from "lucide-react"
import { CSSProperties, memo, useState } from "react"
import { useMount } from "react-use"
@@ -46,12 +46,12 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
const { handleFieldsChange } = useApiConfigurationHandlers()
const { isLoginLoading, handleSignIn } = useClineSignIn()
const [didClickMicrowaveButton, setDidClickMicrowaveButton] = useState(false)
const [didClickDevstralButton, setDidClickDevstralButton] = useState(false)
// Need to get latest model list in case user hits shortcut button to set model
useMount(refreshOpenRouterModels)
const setMicrowave = () => {
const modelId = "stealth/microwave"
const setDevstral = () => {
const modelId = "mistralai/devstral-2512"
// set both plan and act modes to use code-supernova-1-million
handleFieldsChange({
planModeOpenRouterModelId: modelId,
@@ -63,7 +63,7 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
})
setTimeout(() => {
setDidClickMicrowaveButton(true)
setDidClickDevstralButton(true)
setShowChatModelSelector(true)
}, 10)
}
@@ -104,35 +104,6 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
</li>
</>
)}
<li>
New <code>microwave</code> stealth model, free for a limited time!
<br />
{user ? (
<div style={{ display: "flex", gap: "8px", flexWrap: "wrap", margin: "5px 0" }}>
{!didClickMicrowaveButton && (
<VSCodeButton
appearance="primary"
onClick={setMicrowave}
style={{ transform: "scale(0.85)", transformOrigin: "left center" }}>
Try stealth/microwave
</VSCodeButton>
)}
</div>
) : (
<VSCodeButton
appearance="primary"
disabled={isLoginLoading}
onClick={handleSignIn}
style={{ margin: "5px 0", transform: "scale(0.85)", transformOrigin: "left center" }}>
Sign Up with Cline
{isLoginLoading && (
<span className="ml-1 animate-spin">
<span className="codicon codicon-refresh"></span>
</span>
)}
</VSCodeButton>
)}
</li>
</ul>
{isVscode && (
<p style={{ margin: "0" }}>
@@ -28,7 +28,7 @@ export const WhatsNewModal: React.FC<WhatsNewModalProps> = ({ open, onClose, ver
const user = clineUser || undefined
const { handleFieldsChange } = useApiConfigurationHandlers()
const [didClickMicrowaveButton, setDidClickMicrowaveButton] = useState(false)
const [didClickDevstralButton, setDidClickDevstralButton] = useState(false)
// Need to get latest model list in case user hits shortcut button to set model
useMount(refreshOpenRouterModels)
@@ -49,8 +49,8 @@ export const WhatsNewModal: React.FC<WhatsNewModalProps> = ({ open, onClose, ver
return () => window.removeEventListener("keydown", handleKeyDown)
}, [open, onClose])
const setMicrowave = () => {
const modelId = "stealth/microwave"
const setDevstral = () => {
const modelId = "mistralai/devstral-2512"
handleFieldsChange({
planModeOpenRouterModelId: modelId,
actModeOpenRouterModelId: modelId,
@@ -61,7 +61,7 @@ export const WhatsNewModal: React.FC<WhatsNewModalProps> = ({ open, onClose, ver
})
setTimeout(() => {
setDidClickMicrowaveButton(true)
setDidClickDevstralButton(true)
setShowChatModelSelector(true)
}, 10)
}
@@ -161,29 +161,6 @@ export const WhatsNewModal: React.FC<WhatsNewModalProps> = ({ open, onClose, ver
</li>
</>
)}
<li className="mb-2">
New <code>microwave</code> stealth model, free for a limited time!
<br />
{user ? (
<div className="flex gap-2 flex-wrap my-1.5">
{!didClickMicrowaveButton && (
<VSCodeButton
appearance="primary"
onClick={setMicrowave}
style={{ transform: "scale(0.85)", transformOrigin: "left center" }}>
Try stealth/microwave
</VSCodeButton>
)}
</div>
) : (
<VSCodeButton
appearance="primary"
onClick={handleShowAccount}
style={{ margin: "5px 0", transform: "scale(0.85)", transformOrigin: "left center" }}>
Sign Up with Cline
</VSCodeButton>
)}
</li>
</ul>
{/* Demo link */}
@@ -81,8 +81,8 @@ export const freeModels = [
label: "FREE",
},
{
id: "stealth/microwave",
description: "A stealth model for agentic coding tasks",
id: "mistralai/devstral-2512",
description: "Mistral's latest model with strong coding abilities",
label: "FREE",
},
]