From 524f174d4584572d813ca5be97d9a53e19a07bbe Mon Sep 17 00:00:00 2001 From: weiqingy Date: Tue, 14 Jul 2026 17:11:39 -0700 Subject: [PATCH] [integration][openai] Update stale default model gpt-3.5-turbo to gpt-4o-mini gpt-3.5-turbo is a legacy OpenAI model. Update the OpenAI Chat Completions default to gpt-4o-mini, its current low-cost successor and the value the Java Javadoc example already uses, keeping a sensible zero-config default and Java/Python parity. Updates the Java and Python defaults and the OpenAICompletionsSetup parameter tables in the docs. --- docs/content/docs/development/chat_models.md | 4 ++-- .../chatmodels/openai/OpenAICompletionsSetup.java | 2 +- .../integrations/chat_models/openai/openai_chat_model.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/docs/development/chat_models.md b/docs/content/docs/development/chat_models.md index c7b40ae05..51213b73b 100644 --- a/docs/content/docs/development/chat_models.md +++ b/docs/content/docs/development/chat_models.md @@ -845,7 +845,7 @@ OpenAI provides cloud-based chat models with state-of-the-art performance for a | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `connection` | str | Required | Reference to connection method name | -| `model` | str | `"gpt-3.5-turbo"` | Name of the chat model to use | +| `model` | str | `"gpt-4o-mini"` | Name of the chat model to use | | `prompt` | Prompt \| str | None | Prompt template or reference to prompt resource | | `tools` | List[str] | None | List of tool names available to the model | | `temperature` | float | `0.1` | Sampling temperature (0.0 to 2.0) | @@ -863,7 +863,7 @@ OpenAI provides cloud-based chat models with state-of-the-art performance for a | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `connection` | String | Required | Reference to connection method name | -| `model` | String | `"gpt-3.5-turbo"` | Name of the chat model to use | +| `model` | String | `"gpt-4o-mini"` | Name of the chat model to use | | `prompt` | Prompt \| String | None | Prompt template or reference to prompt resource | | `tools` | List | None | List of tool names available to the model | | `temperature` | double | `0.1` | Sampling temperature (0.0 to 2.0) | diff --git a/integrations/chat-models/openai/src/main/java/org/apache/flink/agents/integrations/chatmodels/openai/OpenAICompletionsSetup.java b/integrations/chat-models/openai/src/main/java/org/apache/flink/agents/integrations/chatmodels/openai/OpenAICompletionsSetup.java index 29ee3753b..204959014 100644 --- a/integrations/chat-models/openai/src/main/java/org/apache/flink/agents/integrations/chatmodels/openai/OpenAICompletionsSetup.java +++ b/integrations/chat-models/openai/src/main/java/org/apache/flink/agents/integrations/chatmodels/openai/OpenAICompletionsSetup.java @@ -58,7 +58,7 @@ */ public class OpenAICompletionsSetup extends BaseChatModelSetup { - private static final String DEFAULT_MODEL = "gpt-3.5-turbo"; + private static final String DEFAULT_MODEL = "gpt-4o-mini"; private static final double DEFAULT_TEMPERATURE = 0.1d; private static final int DEFAULT_TOP_LOGPROBS = 0; private static final boolean DEFAULT_STRICT = false; diff --git a/python/flink_agents/integrations/chat_models/openai/openai_chat_model.py b/python/flink_agents/integrations/chat_models/openai/openai_chat_model.py index 2e5fe720a..0d487772b 100644 --- a/python/flink_agents/integrations/chat_models/openai/openai_chat_model.py +++ b/python/flink_agents/integrations/chat_models/openai/openai_chat_model.py @@ -35,7 +35,7 @@ resolve_openai_credentials, ) -DEFAULT_OPENAI_MODEL = "gpt-3.5-turbo" +DEFAULT_OPENAI_MODEL = "gpt-4o-mini" class OpenAIChatModelConnection(BaseChatModelConnection):