Open
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
lilyz-ai
approved these changes
Apr 17, 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.
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 upgrades the Python client to require Python 3.9+ and widens the
openaidependency to>=2.8.0,<3.0.0(from^1.30.0), then fixes the generated Pydantic schema layer so imports succeed under the new dependency set.The
openaiconstraint is now a proper range (addressing the prior exact-pin concern), version files are consistent, and the schema fixes are well-reasoned. Themin_itemsremoval onstr-typed__root__fields (QueryItem,SearchQueryItem) is correct sincemin_itemsnever applied to non-list types; if non-empty string validation is desired,min_length=1would be the right replacement.Confidence Score: 5/5
Safe to merge; all P0/P1 concerns from prior review are resolved and the single remaining finding is a minor semantic gap on string validation.
The exact-version pin concern was addressed with a proper range constraint. The discriminator removal includes an explanatory comment. The min_items→validator migration is correct for list fields. The only remaining observation (missing min_length on str root fields) is a P2 improvement, not a blocking defect.
clients/python/llmengine/data_types/gen/openai.py — QueryItem and SearchQueryItem str fields had invalid min_items removed without a min_length replacement.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[openai.py import] --> B{PYDANTIC_V2?} B -- Yes --> C[from pydantic.v1 import BaseModel, Field, validator] B -- No --> D[from pydantic import BaseModel, Field, validator] C --> E[Schema models loaded] D --> E E --> F[Prompt1Item / Input2Item] F --> G["@validator('__root__')\ncheck len >= 1"] E --> H[QueryItem / SearchQueryItem] H --> I["__root__: str\n(min_items removed)"] E --> J[InputItem] J --> K["Union[EasyInputMessage, Item, ItemReferenceParam]\n(plain union, no discriminator)"]Prompt To Fix All With AI
Reviews (4): Last reviewed commit: "Merge branch 'main' into codex/openai2-c..." | Re-trigger Greptile