Преглед изворни кода

Add OpenAI o3 & 4o-mini (#2691)

Reference:
- https://platform.openai.com/docs/models/o3
- https://platform.openai.com/docs/models/o4-mini
- https://openai.com/index/introducing-o3-and-o4-mini/
Peter Dave Hello пре 8 месеци
родитељ
комит
250ea6867a
2 измењених фајлова са 44 додато и 0 уклоњено
  1. 5 0
      .changeset/young-pots-bow.md
  2. 39 0
      src/shared/api.ts

+ 5 - 0
.changeset/young-pots-bow.md

@@ -0,0 +1,5 @@
+---
+"roo-cline": patch
+---
+
+Add OpenAI o3 & 4o-mini

+ 39 - 0
src/shared/api.ts

@@ -778,6 +778,45 @@ export const openAiNativeModels = {
 		outputPrice: 0.4,
 		outputPrice: 0.4,
 		cacheReadsPrice: 0.025,
 		cacheReadsPrice: 0.025,
 	},
 	},
+	o3: {
+		maxTokens: 100_000,
+		contextWindow: 200_000,
+		supportsImages: true,
+		supportsPromptCache: true,
+		inputPrice: 10.0,
+		outputPrice: 40.0,
+		cacheReadsPrice: 2.5,
+	},
+	"o4-mini": {
+		maxTokens: 100_000,
+		contextWindow: 200_000,
+		supportsImages: true,
+		supportsPromptCache: true,
+		inputPrice: 1.1,
+		outputPrice: 4.4,
+		cacheReadsPrice: 0.275,
+		reasoningEffort: "medium",
+	},
+	"o4-mini-high": {
+		maxTokens: 100_000,
+		contextWindow: 200_000,
+		supportsImages: true,
+		supportsPromptCache: true,
+		inputPrice: 1.1,
+		outputPrice: 4.4,
+		cacheReadsPrice: 0.275,
+		reasoningEffort: "high",
+	},
+	"o4-mini-low": {
+		maxTokens: 100_000,
+		contextWindow: 200_000,
+		supportsImages: true,
+		supportsPromptCache: true,
+		inputPrice: 1.1,
+		outputPrice: 4.4,
+		cacheReadsPrice: 0.275,
+		reasoningEffort: "low",
+	},
 	"o3-mini": {
 	"o3-mini": {
 		maxTokens: 100_000,
 		maxTokens: 100_000,
 		contextWindow: 200_000,
 		contextWindow: 200_000,