Skip to content

Commit 929503a

Browse files
authored
Add GPT 4.1 (#2605)
1 parent 8cf3c53 commit 929503a

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
@@ -745,9 +745,32 @@ export const geminiModels = {
745745
// OpenAI Native
746746
// https://openai.com/api/pricing/
747747
export type OpenAiNativeModelId = keyof typeof openAiNativeModels
748-
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-4o"
748+
export const openAiNativeDefaultModelId: OpenAiNativeModelId = "gpt-4.1"
749749
export const openAiNativeModels = {
750-
// don't support tool use yet
750+
"gpt-4.1": {
751+
maxTokens: 32_768,
752+
contextWindow: 1_047_576,
753+
supportsImages: true,
754+
supportsPromptCache: true,
755+
inputPrice: 2,
756+
outputPrice: 8,
757+
},
758+
"gpt-4.1-mini": {
759+
maxTokens: 32_768,
760+
contextWindow: 1_047_576,
761+
supportsImages: true,
762+
supportsPromptCache: true,
763+
inputPrice: 0.4,
764+
outputPrice: 1.6,
765+
},
766+
"gpt-4.1-nano": {
767+
maxTokens: 32_768,
768+
contextWindow: 1_047_576,
769+
supportsImages: true,
770+
supportsPromptCache: true,
771+
inputPrice: 0.1,
772+
outputPrice: 0.4,
773+
},
751774
"o3-mini": {
752775
maxTokens: 100_000,
753776
contextWindow: 200_000,

0 commit comments

Comments
 (0)