Skip to content

Commit 8a61fc9

Browse files
mrubenskevinvandijk
authored andcommitted
Add GPT 4.1 (#2605)
1 parent 7309a88 commit 8a61fc9

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.changeset/selfish-dancers-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Add gpt 4.1

src/shared/api.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,32 @@ export const geminiModels = {
746746
// OpenAI Native
747747
// https://openai.com/api/pricing/
748748
export type OpenAiNativeModelId = keyof typeof openAiNativeModels
749-
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-4o"
749+
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-4.1"
750750
export const openAiNativeModels = {
751-
// don't support tool use yet
751+
"gpt-4.1": {
752+
maxTokens: 32_768,
753+
contextWindow: 1_047_576,
754+
supportsImages: true,
755+
supportsPromptCache: true,
756+
inputPrice: 2,
757+
outputPrice: 8,
758+
},
759+
"gpt-4.1-mini": {
760+
maxTokens: 32_768,
761+
contextWindow: 1_047_576,
762+
supportsImages: true,
763+
supportsPromptCache: true,
764+
inputPrice: 0.4,
765+
outputPrice: 1.6,
766+
},
767+
"gpt-4.1-nano": {
768+
maxTokens: 32_768,
769+
contextWindow: 1_047_576,
770+
supportsImages: true,
771+
supportsPromptCache: true,
772+
inputPrice: 0.1,
773+
outputPrice: 0.4,
774+
},
752775
"o3-mini": {
753776
maxTokens: 100_000,
754777
contextWindow: 200_000,

0 commit comments

Comments
 (0)