add code-supernova-1m (#6458)

* add code-supernova-1m

* Update src/core/api/providers/cline.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fixing cache price

* wording

* Update webview-ui/src/components/chat/Announcement.tsx

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* Fix announcement content

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-09-26 08:19:39 -07:00
1 parent 8213b0b910
commit 65eee1ac6a
6 files changed
+23 -13

No files matched your search

+1 -1
View File
@@ -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
}
@@ -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<string, OpenRouterModelInfo> = {
"cline/code-supernova": OpenRouterModelInfo.create({
"cline/code-supernova-1-million": OpenRouterModelInfo.create({
maxTokens: clineCodeSupernovaModelInfo.maxTokens ?? 0,
contextWindow: clineCodeSupernovaModelInfo.contextWindow ?? 0,
supportsImages: clineCodeSupernovaModelInfo.supportsImages ?? false,
+1 -1
View File
@@ -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,
+11 -1
View File
@@ -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,
@@ -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) => {
</VSCodeButtonLink>
</li>
<li>
<b>Continued Free Models:</b> Try grok-code-fast-1 or code-supernova (stealth model 🥷)!
<b>Free Models:</b> Try the new code-supernova-1-million stealth model, or grok-code-fast-1 for free!
<br />
{user ? (
<div style={{ display: "flex", gap: "8px", flexWrap: "wrap", margin: "5px 0" }}>
{!didClickGrokCodeButton && (
<VSCodeButton appearance="primary" onClick={setGrokCodeFast1}>
Try grok-code-fast-1
</VSCodeButton>
)}
{!didClickCodeSupernovaButton && (
<VSCodeButton appearance="primary" onClick={setCodeSupernova}>
Try code-supernova
</VSCodeButton>
)}
{!didClickGrokCodeButton && (
<VSCodeButton appearance="primary" onClick={setGrokCodeFast1}>
Try grok-code-fast-1
</VSCodeButton>
)}
</div>
) : (
<VSCodeButton appearance="primary" onClick={handleShowAccount} style={{ margin: "5px 0" }}>
@@ -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",
},