Open
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Summary
openai==2.8.0What changed
clients/python/pyproject.tomlpython: ^3.8 -> >=3.9,<4.0openai: ^1.30.0 -> ==2.8.0clients/python/setup.pypython_requires: >=3.8 -> >=3.9clients/python/poetry.lockopenai 2.8.0clients/python/llmengine/data_types/gen/openai.pymin_itemsconstraints from__root__fields onPrompt1Item,Input2Item,QueryItem, andSearchQueryItemInputItem's root union fieldWhy
egp-api-backendneedslitellm==1.83.0, which in turn requiresopenai 2.x. The local blocker was this Python client package still constrainingopenaito1.x. After widening the client dependency, the generated schema layer also needed cleanup before the package would import successfully.Verification
PYENV_VERSION=3.11.14 poetry installPYENV_VERSION=3.11.14 poetry run python -c "import llmengine; from llmengine import Completion, Model, FineTune; from llmengine.api_engine import APIEngine; print("ok")"Completion,Model,FineTune, andAPIEngineimport cleanly with the upgraded dependency setNotes
Greptile Summary
This PR migrates the Python client from
openai ^1.30toopenai >=2.8,<3.0, bumps the Python floor to 3.9, and repairs four generated schema classes inopenai.pythat were causing import failures under the upgraded stack. The previous concern about the exact-version pin has been addressed — the dependency is now expressed as a compatible range.Confidence Score: 5/5
Safe to merge — all changes are minimal, correct, and verified by the import smoke test; no P0/P1 issues found.
The schema fixes are mechanically correct (validator replaces invalid Field constraint, min_items removed from non-list types, broken discriminator dropped with an explanatory comment). The dependency range is properly expressed. The prior concern about the exact-version pin has been resolved. All remaining findings are P2 or lower.
No files require special attention.
Important Files Changed
min_itemson__root__list fields with@validator, removesmin_itemsfrom twostrroot-fields where it was always a no-op, and removes an unworkable discriminator fromInputItem; all changes are correct under pydantic v1 / v1-compat.openai==2.8.0pin with the range>=2.8.0,<3.0.0, which is appropriate for a library dependency.python_requireswithpyproject.tomlby bumping to>=3.9; straightforward and consistent.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["Prompt1Item / Input2Item\n__root__: List[int]"] --> B["Field() — no min_items"] B --> C["@validator('__root__')\nvalidate_non_empty"] C -->|empty list| D["ValueError raised"] C -->|non-empty list| E["value returned"] F["QueryItem / SearchQueryItem\n__root__: str"] --> G["Field() — min_items removed\n(was always a no-op on str)"] H["InputItem\n__root__: Union[EasyInputMessage, Item, ItemReferenceParam]"] --> I["Plain union matching\n(discriminator removed — Item is itself\na __root__ union, so discriminator\nwas non-functional)"]Reviews (3): Last reviewed commit: "Merge branch 'main' into codex/openai2-c..." | Re-trigger Greptile