From 5359500b171725042216e83c8892aac07e8be3eb Mon Sep 17 00:00:00 2001 From: Alec Flett Date: Thu, 1 May 2025 13:07:43 -0700 Subject: [PATCH 1/2] add gpt-4.1 mini and nano models --- docs/providers/openai.md | 4 ++++ src/models.ts | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/docs/providers/openai.md b/docs/providers/openai.md index 817353d..e912cc1 100644 --- a/docs/providers/openai.md +++ b/docs/providers/openai.md @@ -44,6 +44,10 @@ main() | gpt-4.5-preview-2025-02-27 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | gpt-4.1 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | gpt-4.1-2025-04-14 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| gpt-4.1-mini | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| gpt-4.1-mini-2025-04-14 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| gpt-4.1-nano | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| gpt-4.1-nano-2025-04-14 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | gpt-4o | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | gpt-4o-mini | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | gpt-4o-2024-05-13 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | diff --git a/src/models.ts b/src/models.ts index f506c6a..ea46227 100644 --- a/src/models.ts +++ b/src/models.ts @@ -15,6 +15,10 @@ export const models = { 'gpt-4.5-preview-2025-02-27', 'gpt-4.1', 'gpt-4.1-2025-04-14', + 'gpt-4.1-mini', + 'gpt-4.1-mini-2025-04-14', + 'gpt-4.1-nano', + 'gpt-4.1-nano-2025-04-14', 'gpt-4o', 'gpt-4o-mini', 'gpt-4o-2024-05-13', @@ -48,6 +52,10 @@ export const models = { supportsStreaming: [ 'gpt-4.1', 'gpt-4.1-2025-04-14', + 'gpt-4.1-mini', + 'gpt-4.1-mini-2025-04-14', + 'gpt-4.1-nano', + 'gpt-4.1-nano-2025-04-14', 'gpt-4.5-preview', 'gpt-4.5-preview-2025-02-27', 'gpt-4o', @@ -78,6 +86,10 @@ export const models = { supportsJSON: [ 'gpt-4.1', 'gpt-4.1-2025-04-14', + 'gpt-4.1-mini', + 'gpt-4.1-mini-2025-04-14', + 'gpt-4.1-nano', + 'gpt-4.1-nano-2025-04-14', 'gpt-4.5-preview', 'gpt-4.5-preview-2025-02-27', 'gpt-4o', @@ -98,6 +110,10 @@ export const models = { supportsImages: [ 'gpt-4.1', 'gpt-4.1-2025-04-14', + 'gpt-4.1-mini', + 'gpt-4.1-mini-2025-04-14', + 'gpt-4.1-nano', + 'gpt-4.1-nano-2025-04-14', 'gpt-4.5-preview', 'gpt-4.5-preview-2025-02-27', 'gpt-4o', @@ -114,6 +130,10 @@ export const models = { supportsToolCalls: [ 'gpt-4.1', 'gpt-4.1-2025-04-14', + 'gpt-4.1-mini', + 'gpt-4.1-mini-2025-04-14', + 'gpt-4.1-nano', + 'gpt-4.1-nano-2025-04-14', 'gpt-4.5-preview', 'gpt-4.5-preview-2025-02-27', 'gpt-4o', From 0a82651b8fcd34e5e2fa9fe20804427c406b4d85 Mon Sep 17 00:00:00 2001 From: Alec Flett Date: Thu, 1 May 2025 13:14:17 -0700 Subject: [PATCH 2/2] add changeset --- .changeset/dull-flowers-shine.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/dull-flowers-shine.md diff --git a/.changeset/dull-flowers-shine.md b/.changeset/dull-flowers-shine.md new file mode 100644 index 0000000..8fa661e --- /dev/null +++ b/.changeset/dull-flowers-shine.md @@ -0,0 +1,5 @@ +--- +'token.js': patch +--- + +Add gpt-4.1-mini and gpt-4.1-nano models