Skip to content

Migrate openai from 1.x to 2.2.0 - #1874

Merged
rm-openai merged 5 commits into
mainfrom
openai-package-v2
Oct 11, 2025
Merged

Migrate openai from 1.x to 2.2.0#1874
rm-openai merged 5 commits into
mainfrom
openai-package-v2

Conversation

@seratch

@seratch seratch commented Oct 8, 2025

Copy link
Copy Markdown
Member

This pull request resolves #1867 This is a blocker for developers trying ChatKit Python server SDK, so we should release a new version including this bump as early as possible.

I've confirmed migrating to 2.x major version does not bring any incompatibility issues with examples in this repo.

@seratch

seratch commented Oct 8, 2025

Copy link
Copy Markdown
Member Author

need to resolve mypy errors

@seratch
seratch force-pushed the openai-package-v2 branch from 4abe5fa to e4fe1e0 Compare October 9, 2025 15:35
Comment thread .gitignore
.python-version
.env*
.venv
.venv*

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

just to do python 3.9 more easily

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we can actually remove 3.9 support soon, it is EOL this month

) from _e

from openai import NOT_GIVEN, AsyncStream, NotGiven
from openai import AsyncStream, NotGiven, omit

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

not_given still exists for backward-compatibility but migrating to omit lets this code base fully align with any patterns

@seratch

seratch commented Oct 10, 2025

Copy link
Copy Markdown
Member Author

@rm-openai now this PR is ready. all the things are internal changes; no public interface level breaking changes. that said, given the code changes and incompatibility with openai 1.x series, releasing a new minor version should be necessary

Comment thread .gitignore
.python-version
.env*
.venv
.venv*

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we can actually remove 3.9 support soon, it is EOL this month

@rm-openai
rm-openai merged commit 9407743 into main Oct 11, 2025
5 checks passed
@rm-openai
rm-openai deleted the openai-package-v2 branch October 11, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependency constraint blocks upgrade to openai>=2.0

2 participants