-
Notifications
You must be signed in to change notification settings - Fork 873
Unify the BaseModel classes #2465
Copy link
Copy link
Open
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Metadata
Metadata
Assignees
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Is your feature request related to a problem? Please describe.
Compare the two base models:
python-genai/google/genai/_common.py
Line 549 in 610059b
python-genai/google/genai/_interactions/_models.py
Line 113 in 610059b
and those couldn't be any more different.
As a start, the former has
model_configthat sets reasonable defaults, like alias generation, serialization etc; however the latter does not, which makes it that much harder to use.Describe the solution you'd like
Have either a single BaseModel, or multiple, but with the reasonable defaults (alias generation, serialization etc).
Describe alternatives you've considered
The only alternative is to sub the hell out of everything and add a model config for each class, which is hardly the best solution.