Add 1m context window model variant for claude sonnet 4 (#5526)

* Add 1m context window model variant for claude sonnet 4

* Fix cost calculation for 1m tier

* Add new 1m context window announcement

* Create beige-bobcats-watch.md

* Add bedrock support for 1m context
This commit is contained in:
Saoud Rizwan authored and GitHub committed 2025-08-13 12:53:23 -07:00
1 parent 94acfec39f
commit 79bda976cb
11 files changed
+114 -54

No files matched your search

@@ -6,6 +6,7 @@ import path from "path"
import fs from "fs/promises"
import { fileExistsAtPath } from "@utils/fs"
import { GlobalFileNames } from "@core/storage/disk"
import { CLAUDE_SONNET_4_1M_TIERS } from "@/shared/api"
/**
* Refreshes the OpenRouter models and returns the updated model list
@@ -49,6 +50,12 @@ export async function refreshOpenRouterModels(
switch (rawModel.id) {
case "anthropic/claude-sonnet-4":
modelInfo.supportsPromptCache = true
modelInfo.cacheWritesPrice = 3.75
modelInfo.cacheReadsPrice = 0.3
modelInfo.contextWindow = 1_000_000 // limiting providers to those that support 1m context window
modelInfo.tiers = CLAUDE_SONNET_4_1M_TIERS
break
case "anthropic/claude-3-7-sonnet":
case "anthropic/claude-3-7-sonnet:beta":
case "anthropic/claude-3.7-sonnet":