Skip to content

[integration][openai] Update stale default model gpt-3.5-turbo to gpt-4o-mini#906

Merged
wenjin272 merged 1 commit into
apache:mainfrom
weiqingy:905-openai-default-gpt4o-mini
Jul 15, 2026
Merged

[integration][openai] Update stale default model gpt-3.5-turbo to gpt-4o-mini#906
wenjin272 merged 1 commit into
apache:mainfrom
weiqingy:905-openai-default-gpt4o-mini

Conversation

@weiqingy

Copy link
Copy Markdown
Collaborator

Linked issue: #905

Purpose of change

The OpenAI Chat Completions chat model defaults to gpt-3.5-turbo when the caller omits model. This is a legacy OpenAI model, superseded by cheaper and more capable small models. A user who takes the default silently gets an outdated model — and the Java Javadoc example already uses gpt-4o-mini, so the code base is inconsistent with its own default.

This change updates the default to gpt-4o-mini — the current low-cost successor to gpt-3.5-turbo — in both language runtimes and the docs, keeping a sensible zero-config default while dropping the legacy model and keeping Java and Python in parity.

  • Java — OpenAICompletionsSetup.DEFAULT_MODEL
  • Python — DEFAULT_OPENAI_MODEL
  • Docs — the OpenAICompletionsSetup parameter tables for both languages

Tests

No new tests. The existing Python test asserts against the imported DEFAULT_OPENAI_MODEL constant rather than a hard-coded string, so it continues to pin the default without change (test_openai_chat_model.py). There is no equivalent Java assertion on the default. Verified the Python OpenAI chat-model tests pass and the OpenAI Java module compiles.

API

No API signature change. Only the value of the default model changes; callers that pass model explicitly are unaffected.

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

…-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.
@github-actions github-actions Bot added doc-included Your PR already contains the necessary documentation updates. fixVersion/0.4.0 priority/major Default priority of the PR or issue. labels Jul 15, 2026

@wenjin272 wenjin272 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenjin272 wenjin272 merged commit beaee3f into apache:main Jul 15, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-included Your PR already contains the necessary documentation updates. fixVersion/0.4.0 priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants