Skip to content

Commit 9a15162

Browse files
committed
Add GPT-4.1 models to OpenAI ChatModel enum
Signed-off-by: David Frizelle <[email protected]>
1 parent 53a7af5 commit 9a15162

File tree

1 file changed

+28
-0
lines changed
  • models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api

1 file changed

+28
-0
lines changed

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/api/OpenAiApi.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,34 @@ public enum ChatModel implements ChatModelDescription {
347347
*/
348348
O3_MINI("o3-mini"),
349349

350+
/**
351+
* <b>GPT-4.1</b> is our flagship model for complex tasks. It is well suited for
352+
* problem solving across domains.
353+
* <p>
354+
* Context window: 1,047,576 tokens. Max output tokens: 32,768 tokens. The
355+
* knowledge cutoff for GPT-4.1 models is June, 2024.
356+
* <p>
357+
*/
358+
GPT_4_1("gpt-4.1"),
359+
360+
/**
361+
* <b>GPT-4.1-mini</b> is balanced for intelligence, speed, and cost.
362+
* <p>
363+
* Context window: 1,047,576 tokens. Max output tokens: 32,768 tokens. The
364+
* knowledge cutoff for GPT-4.1 models is June, 2024.
365+
* <p>
366+
*/
367+
GPT_4_1_MINI("gpt-4.1-mini"),
368+
369+
/**
370+
* <b>GPT-4.1-nano</b> is our fastest, most cost-effective GPT-4.1 model.
371+
* <p>
372+
* Context window: 1,047,576 tokens. Max output tokens: 32,768 tokens. The
373+
* knowledge cutoff for GPT-4.1 models is June, 2024.
374+
* <p>
375+
*/
376+
GPT_4_1_NANO("gpt-4.1-nano"),
377+
350378
/**
351379
* <b>GPT-4o ("omni")</b> is our versatile, high-intelligence flagship model. It
352380
* accepts both text and image inputs and produces text outputs (including

0 commit comments

Comments
 (0)