Просмотр исходного кода

refactor: always enable 128k for simplification

Tom X Nguyen 10 месяцев назад
Родитель
Сommit
ef93f5d422
2 измененных файлов с 3 добавлено и 15 удалено
  1. 2 2
      src/api/providers/anthropic.ts
  2. 1 13
      src/shared/api.ts

+ 2 - 2
src/api/providers/anthropic.ts

@@ -86,7 +86,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
 						const betas = []
 						const betas = []
 
 
 						// Check for the thinking-128k variant first
 						// Check for the thinking-128k variant first
-						if (virtualId === "claude-3-7-sonnet-20250219:thinking-128k") {
+						if (virtualId === "claude-3-7-sonnet-20250219:thinking") {
 							betas.push("output-128k-2025-02-19")
 							betas.push("output-128k-2025-02-19")
 						}
 						}
 
 
@@ -201,7 +201,7 @@ export class AnthropicHandler extends BaseProvider implements SingleCompletionHa
 		// The `:thinking` variant is a virtual identifier for the
 		// The `:thinking` variant is a virtual identifier for the
 		// `claude-3-7-sonnet-20250219` model with a thinking budget.
 		// `claude-3-7-sonnet-20250219` model with a thinking budget.
 		// We can handle this more elegantly in the future.
 		// We can handle this more elegantly in the future.
-		if (id === "claude-3-7-sonnet-20250219:thinking" || id === "claude-3-7-sonnet-20250219:thinking-128k") {
+		if (id === "claude-3-7-sonnet-20250219:thinking") {
 			id = "claude-3-7-sonnet-20250219"
 			id = "claude-3-7-sonnet-20250219"
 		}
 		}
 
 

+ 1 - 13
src/shared/api.ts

@@ -98,20 +98,8 @@ export interface ModelInfo {
 export type AnthropicModelId = keyof typeof anthropicModels
 export type AnthropicModelId = keyof typeof anthropicModels
 export const anthropicDefaultModelId: AnthropicModelId = "claude-3-7-sonnet-20250219"
 export const anthropicDefaultModelId: AnthropicModelId = "claude-3-7-sonnet-20250219"
 export const anthropicModels = {
 export const anthropicModels = {
-	"claude-3-7-sonnet-20250219:thinking-128k": {
-		maxTokens: 128_000,
-		contextWindow: 200_000,
-		supportsImages: true,
-		supportsComputerUse: true,
-		supportsPromptCache: true,
-		inputPrice: 3.0, // $3 per million input tokens
-		outputPrice: 15.0, // $15 per million output tokens
-		cacheWritesPrice: 3.75, // $3.75 per million tokens
-		cacheReadsPrice: 0.3, // $0.30 per million tokens
-		thinking: true,
-	},
 	"claude-3-7-sonnet-20250219:thinking": {
 	"claude-3-7-sonnet-20250219:thinking": {
-		maxTokens: 64_000,
+		maxTokens: 128_000,
 		contextWindow: 200_000,
 		contextWindow: 200_000,
 		supportsImages: true,
 		supportsImages: true,
 		supportsComputerUse: true,
 		supportsComputerUse: true,