Repository navigation
feat(openai): deprecate Chat Completions default ahead of 1.4.0 - #3517
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
vvlrff
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
OpenAIConfigcurrently selects Chat Completions, while Responses is the intended OpenAI default. Rebinding the name immediately would change existing applications' endpoints and accepted parameters without a migration period.Expose the current implementation as
OpenAICompletionsConfigand keepOpenAIConfigas a deprecated compatibility subclass until 1.4.0. It preserves the constructor, copied config type, Chat Completions parameters, Files API support, and media acceptance. The class is marked deprecated for type checkers;create()emits aDeprecationWarningdirecting users toOpenAICompletionsConfigorOpenAIResponsesConfig. Construction and copying do not warn, consistent with ADR 0025.In 1.4.0, the deprecated Chat Completions binding will be removed and
OpenAIConfigwill become an alias forOpenAIResponsesConfig. This PR records that release change in ADR 0026 and the model configuration guide; it does not switch existing callers to Responses yet. The guide recommends explicit configs during the transition and explains that API-specific options need translation when migrating.Validation on Python 3.14.3:
just test --ignore=test/providers -k openai: 410 passed, 28 skipped, 6282 deselected. Includes mocked HTTP requests throughAgent.ask()for both public import paths, warning timing and caller location, copy behavior, media acceptance, and existing OpenAI provider tests. Live provider tests were excluded.ag2/config/openai/{config,files,__init__}.pyandag2/config/input_acceptance.py.OpenAICompletionsConfigmissing-dependency fallback recommendsag2[openai].git diff --checkpassed.Related issue number
No linked issue.
Checks
AI assistance
Codex assisted with implementation, tests, documentation, and this description. The diff and description were reviewed against the requested behavior, and the validation above was run before submission.