|
|
@@ -1,5 +1,5 @@
|
|
|
import { ApiFormat } from "./proto/cline/models"
|
|
|
-import { ApiHandlerSettings } from "./storage/state-keys"
|
|
|
+import type { ApiHandlerSettings } from "./storage/state-keys"
|
|
|
|
|
|
export type ApiProvider =
|
|
|
| "anthropic"
|
|
|
@@ -126,6 +126,22 @@ export const CLAUDE_SONNET_1M_TIERS = [
|
|
|
cacheReadsPrice: 0.6,
|
|
|
},
|
|
|
]
|
|
|
+export const CLAUDE_OPUS_1M_TIERS = [
|
|
|
+ {
|
|
|
+ contextWindow: 200000,
|
|
|
+ inputPrice: 5.0,
|
|
|
+ outputPrice: 25,
|
|
|
+ cacheWritesPrice: 6.25,
|
|
|
+ cacheReadsPrice: 0.5,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ contextWindow: Number.MAX_SAFE_INTEGER,
|
|
|
+ inputPrice: 10,
|
|
|
+ outputPrice: 37.5,
|
|
|
+ cacheWritesPrice: 12.5,
|
|
|
+ cacheReadsPrice: 1.0,
|
|
|
+ },
|
|
|
+]
|
|
|
|
|
|
export interface HicapCompatibleModelInfo extends ModelInfo {
|
|
|
temperature?: number
|
|
|
@@ -205,6 +221,29 @@ export const anthropicModels = {
|
|
|
cacheReadsPrice: 0.3,
|
|
|
tiers: CLAUDE_SONNET_1M_TIERS,
|
|
|
},
|
|
|
+ "claude-opus-4-6": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ supportsReasoning: true,
|
|
|
+ inputPrice: 5.0,
|
|
|
+ outputPrice: 25.0,
|
|
|
+ cacheWritesPrice: 6.25,
|
|
|
+ cacheReadsPrice: 0.5,
|
|
|
+ },
|
|
|
+ "claude-opus-4-6:1m": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 1_000_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ supportsReasoning: true,
|
|
|
+ inputPrice: 5.0,
|
|
|
+ outputPrice: 25.0,
|
|
|
+ cacheWritesPrice: 6.25,
|
|
|
+ cacheReadsPrice: 0.5,
|
|
|
+ tiers: CLAUDE_OPUS_1M_TIERS,
|
|
|
+ },
|
|
|
"claude-opus-4-5-20251101": {
|
|
|
maxTokens: 8192,
|
|
|
contextWindow: 200_000,
|
|
|
@@ -322,6 +361,11 @@ export const claudeCodeModels = {
|
|
|
supportsImages: false,
|
|
|
supportsPromptCache: false,
|
|
|
},
|
|
|
+ "claude-opus-4-6": {
|
|
|
+ ...anthropicModels["claude-opus-4-6"],
|
|
|
+ supportsImages: false,
|
|
|
+ supportsPromptCache: false,
|
|
|
+ },
|
|
|
"claude-opus-4-5-20251101": {
|
|
|
...anthropicModels["claude-opus-4-5-20251101"],
|
|
|
supportsImages: false,
|
|
|
@@ -416,6 +460,31 @@ export const bedrockModels = {
|
|
|
cacheReadsPrice: 0.3,
|
|
|
tiers: CLAUDE_SONNET_1M_TIERS,
|
|
|
},
|
|
|
+ "anthropic.claude-opus-4-6-v1:0": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ supportsReasoning: true,
|
|
|
+ supportsGlobalEndpoint: true,
|
|
|
+ inputPrice: 5.0,
|
|
|
+ outputPrice: 25.0,
|
|
|
+ cacheWritesPrice: 6.25,
|
|
|
+ cacheReadsPrice: 0.5,
|
|
|
+ },
|
|
|
+ "anthropic.claude-opus-4-6-v1:0:1m": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 1_000_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ supportsReasoning: true,
|
|
|
+ supportsGlobalEndpoint: true,
|
|
|
+ inputPrice: 5.0,
|
|
|
+ outputPrice: 25.0,
|
|
|
+ cacheWritesPrice: 6.25,
|
|
|
+ cacheReadsPrice: 0.5,
|
|
|
+ tiers: CLAUDE_OPUS_1M_TIERS,
|
|
|
+ },
|
|
|
"anthropic.claude-opus-4-5-20251101-v1:0": {
|
|
|
maxTokens: 8192,
|
|
|
contextWindow: 200_000,
|
|
|
@@ -624,6 +693,7 @@ export const bedrockModels = {
|
|
|
export const openRouterDefaultModelId = "anthropic/claude-sonnet-4.5" // will always exist in openRouterModels
|
|
|
export const openRouterClaudeSonnet41mModelId = `anthropic/claude-sonnet-4${CLAUDE_SONNET_1M_SUFFIX}`
|
|
|
export const openRouterClaudeSonnet451mModelId = `anthropic/claude-sonnet-4.5${CLAUDE_SONNET_1M_SUFFIX}`
|
|
|
+export const openRouterClaudeOpus461mModelId = `anthropic/claude-opus-4.6${CLAUDE_SONNET_1M_SUFFIX}`
|
|
|
export const openRouterDefaultModelInfo: ModelInfo = {
|
|
|
maxTokens: 8192,
|
|
|
contextWindow: 200_000,
|
|
|
@@ -805,6 +875,17 @@ export const vertexModels = {
|
|
|
cacheReadsPrice: 0.1,
|
|
|
supportsReasoning: true,
|
|
|
},
|
|
|
+ "claude-opus-4-6": {
|
|
|
+ maxTokens: 8192,
|
|
|
+ contextWindow: 200_000,
|
|
|
+ supportsImages: true,
|
|
|
+ supportsPromptCache: true,
|
|
|
+ inputPrice: 5.0,
|
|
|
+ outputPrice: 25.0,
|
|
|
+ cacheWritesPrice: 6.25,
|
|
|
+ cacheReadsPrice: 0.5,
|
|
|
+ supportsReasoning: true,
|
|
|
+ },
|
|
|
"claude-opus-4-5@20251101": {
|
|
|
maxTokens: 8192,
|
|
|
contextWindow: 200_000,
|
|
|
@@ -1010,7 +1091,7 @@ export const vertexModels = {
|
|
|
cacheReadsPrice: 0.31,
|
|
|
},
|
|
|
{
|
|
|
- contextWindow: Infinity,
|
|
|
+ contextWindow: Number.POSITIVE_INFINITY,
|
|
|
inputPrice: 2.5,
|
|
|
outputPrice: 15,
|
|
|
cacheReadsPrice: 0.625,
|
|
|
@@ -1079,7 +1160,7 @@ export const vertexModels = {
|
|
|
cacheReadsPrice: 0.01875,
|
|
|
},
|
|
|
{
|
|
|
- contextWindow: Infinity,
|
|
|
+ contextWindow: Number.POSITIVE_INFINITY,
|
|
|
inputPrice: 0.15,
|
|
|
outputPrice: 0.6,
|
|
|
cacheReadsPrice: 0.0375,
|
|
|
@@ -1162,7 +1243,7 @@ export const geminiModels = {
|
|
|
cacheReadsPrice: 0.2,
|
|
|
},
|
|
|
{
|
|
|
- contextWindow: Infinity,
|
|
|
+ contextWindow: Number.POSITIVE_INFINITY,
|
|
|
inputPrice: 4.0,
|
|
|
outputPrice: 18.0,
|
|
|
cacheReadsPrice: 0.4,
|
|
|
@@ -1191,7 +1272,7 @@ export const geminiModels = {
|
|
|
cacheReadsPrice: 0.03,
|
|
|
},
|
|
|
{
|
|
|
- contextWindow: Infinity,
|
|
|
+ contextWindow: Number.POSITIVE_INFINITY,
|
|
|
inputPrice: 0.3,
|
|
|
outputPrice: 2.5,
|
|
|
cacheReadsPrice: 0.03,
|
|
|
@@ -1217,7 +1298,7 @@ export const geminiModels = {
|
|
|
cacheReadsPrice: 0.31,
|
|
|
},
|
|
|
{
|
|
|
- contextWindow: Infinity,
|
|
|
+ contextWindow: Number.POSITIVE_INFINITY,
|
|
|
inputPrice: 2.5,
|
|
|
outputPrice: 15,
|
|
|
cacheReadsPrice: 0.625,
|
|
|
@@ -1318,7 +1399,7 @@ export const geminiModels = {
|
|
|
cacheReadsPrice: 0.01875,
|
|
|
},
|
|
|
{
|
|
|
- contextWindow: Infinity,
|
|
|
+ contextWindow: Number.POSITIVE_INFINITY,
|
|
|
inputPrice: 0.15,
|
|
|
outputPrice: 0.6,
|
|
|
cacheReadsPrice: 0.0375,
|
|
|
@@ -4087,7 +4168,7 @@ export const mainlandZAiModels = {
|
|
|
cacheReadsPrice: 0.057,
|
|
|
},
|
|
|
{
|
|
|
- contextWindow: Infinity,
|
|
|
+ contextWindow: Number.POSITIVE_INFINITY,
|
|
|
inputPrice: 0.29,
|
|
|
outputPrice: 1.14,
|
|
|
cacheReadsPrice: 0.057,
|
|
|
@@ -4119,7 +4200,7 @@ export const mainlandZAiModels = {
|
|
|
cacheReadsPrice: 0.017,
|
|
|
},
|
|
|
{
|
|
|
- contextWindow: Infinity,
|
|
|
+ contextWindow: Number.POSITIVE_INFINITY,
|
|
|
inputPrice: 0.086,
|
|
|
outputPrice: 0.57,
|
|
|
cacheReadsPrice: 0.017,
|