diff --git a/src/core/api/providers/cline.ts b/src/core/api/providers/cline.ts index d0a0056d..20fb8e29 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/code-supernova") { + if (this.getModel().id === "cline/code-supernova-1-million") { totalCost = 0 } diff --git a/src/core/controller/models/refreshOpenRouterModels.ts b/src/core/controller/models/refreshOpenRouterModels.ts index 1d3d68e1..9bfc8a89 100644 --- a/src/core/controller/models/refreshOpenRouterModels.ts +++ b/src/core/controller/models/refreshOpenRouterModels.ts @@ -242,7 +242,7 @@ export async function refreshOpenRouterModels( * 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 = { - "cline/code-supernova": OpenRouterModelInfo.create({ + "cline/code-supernova-1-million": OpenRouterModelInfo.create({ maxTokens: clineCodeSupernovaModelInfo.maxTokens ?? 0, contextWindow: clineCodeSupernovaModelInfo.contextWindow ?? 0, supportsImages: clineCodeSupernovaModelInfo.supportsImages ?? false, diff --git a/src/core/task/utils.ts b/src/core/task/utils.ts index 14a85ab7..3cea4469 100644 --- a/src/core/task/utils.ts +++ b/src/core/task/utils.ts @@ -1,9 +1,9 @@ import { ApiHandler } from "@core/api" +import { execSync } from "child_process" import { showSystemNotification } from "@/integrations/notifications" import { ClineApiReqCancelReason, ClineApiReqInfo } from "@/shared/ExtensionMessage" import { calculateApiCostAnthropic } from "@/utils/cost" import { MessageStateHandler } from "./message-state" -import { execSync } from "child_process" export const showNotificationForApprovalIfAutoApprovalEnabled = ( message: string, diff --git a/src/shared/api.ts b/src/shared/api.ts index 17ab0693..2f494f55 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -596,7 +596,7 @@ export const openRouterDefaultModelInfo: ModelInfo = { // Cline custom model - code-supernova export const clineCodeSupernovaModelInfo: ModelInfo = { - contextWindow: 200000, + contextWindow: 1000000, supportsImages: true, supportsPromptCache: true, inputPrice: 0, @@ -2509,6 +2509,16 @@ export const nebiusDefaultModelId = "Qwen/Qwen2.5-32B-Instruct-fast" satisfies N export type XAIModelId = keyof typeof xaiModels export const xaiDefaultModelId: XAIModelId = "grok-4" export const xaiModels = { + "grok-4-fast-reasoning": { + maxTokens: 30000, + contextWindow: 2000000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 0.2, + cacheReadsPrice: 0.05, + outputPrice: 0.5, + description: "xAI's Grok 4 Fast (free) multimodal model with 2M context.", + }, "grok-4": { maxTokens: 8192, contextWindow: 262144, diff --git a/webview-ui/src/components/chat/Announcement.tsx b/webview-ui/src/components/chat/Announcement.tsx index 1d8a4de9..5d1dca3f 100644 --- a/webview-ui/src/components/chat/Announcement.tsx +++ b/webview-ui/src/components/chat/Announcement.tsx @@ -73,8 +73,8 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => { } const setCodeSupernova = () => { - const modelId = "cline/code-supernova" - // set both plan and act modes to use code-supernova + const modelId = "cline/code-supernova-1-million" + // set both plan and act modes to use code-supernova-1-million handleFieldsChange({ planModeOpenRouterModelId: modelId, actModeOpenRouterModelId: modelId, @@ -124,20 +124,20 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
  • - Continued Free Models: Try grok-code-fast-1 or code-supernova (stealth model 🥷)! + Free Models: Try the new code-supernova-1-million stealth model, or grok-code-fast-1 for free!
    {user ? (
    - {!didClickGrokCodeButton && ( - - Try grok-code-fast-1 - - )} {!didClickCodeSupernovaButton && ( Try code-supernova )} + {!didClickGrokCodeButton && ( + + Try grok-code-fast-1 + + )}
    ) : ( diff --git a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx index 0a27e898..33ea946b 100644 --- a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx +++ b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx @@ -61,7 +61,7 @@ const featuredModels = [ label: "Free", }, { - id: "cline/code-supernova", + id: "cline/code-supernova-1-million", description: "Stealth coding model with image support", label: "Free", },