Skip to content

Commit c024d3d

Browse files
authored
Merge pull request #169 from cal-ai/main
Add GPT 4.1 models
2 parents 4722b81 + cd5ea52 commit c024d3d

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.changeset/cold-cherries-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'token.js': minor
3+
---
4+
5+
Add gpt 4.1 models

docs/providers/openai.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ main()
4242
| -------------------------- | --------------- | --------- | ----------- | ----------- | ---------------- | ----- |
4343
| gpt-4.5-preview |||||||
4444
| gpt-4.5-preview-2025-02-27 |||||||
45+
| gpt-4.1 |||||||
46+
| gpt-4.1-2025-04-14 |||||||
4547
| gpt-4o |||||||
4648
| gpt-4o-mini |||||||
4749
| gpt-4o-2024-05-13 |||||||

src/models.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export const models = {
1313
models: [
1414
'gpt-4.5-preview',
1515
'gpt-4.5-preview-2025-02-27',
16+
'gpt-4.1',
17+
'gpt-4.1-2025-04-14',
1618
'gpt-4o',
1719
'gpt-4o-mini',
1820
'gpt-4o-2024-05-13',
@@ -44,6 +46,8 @@ export const models = {
4446
] as const,
4547
supportsCompletion: true,
4648
supportsStreaming: [
49+
'gpt-4.1',
50+
'gpt-4.1-2025-04-14',
4751
'gpt-4.5-preview',
4852
'gpt-4.5-preview-2025-02-27',
4953
'gpt-4o',
@@ -72,6 +76,8 @@ export const models = {
7276
'o3-mini',
7377
] as const,
7478
supportsJSON: [
79+
'gpt-4.1',
80+
'gpt-4.1-2025-04-14',
7581
'gpt-4.5-preview',
7682
'gpt-4.5-preview-2025-02-27',
7783
'gpt-4o',
@@ -90,6 +96,8 @@ export const models = {
9096
'o3-mini',
9197
] as const,
9298
supportsImages: [
99+
'gpt-4.1',
100+
'gpt-4.1-2025-04-14',
93101
'gpt-4.5-preview',
94102
'gpt-4.5-preview-2025-02-27',
95103
'gpt-4o',
@@ -104,6 +112,8 @@ export const models = {
104112
'gpt-4-vision-preview',
105113
] as const,
106114
supportsToolCalls: [
115+
'gpt-4.1',
116+
'gpt-4.1-2025-04-14',
107117
'gpt-4.5-preview',
108118
'gpt-4.5-preview-2025-02-27',
109119
'gpt-4o',

0 commit comments

Comments
 (0)