Commit 45e1e50
fix(client): remove invalid min_items=1 on str __root__ fields (#813)
QueryItem and SearchQueryItem declare `__root__: Annotated[str, Field(..., min_items=1)]`.
`min_items` applies to list/sequence length; on a str field, pydantic v1 compat
raises ValueError at class-definition time:
ValueError: On field '__root__' the following field constraints are set but not enforced: min_items
This breaks any consumer that imports llmengine.data_types.gen.openai under
pydantic v2 with v1 compat (e.g. egp-api-backend).
Drop the meaningless constraint. Bump to 0.0.0.beta47.
Note: gen/openai.py is generated from the OpenAPI schema via
datamodel-code-generator. Follow-up needed to fix the source schema so this
doesn't regress on next regen.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 51bad10 commit 45e1e50
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6875 | 6875 | | |
6876 | 6876 | | |
6877 | 6877 | | |
6878 | | - | |
| 6878 | + | |
6879 | 6879 | | |
6880 | 6880 | | |
6881 | 6881 | | |
| |||
6937 | 6937 | | |
6938 | 6938 | | |
6939 | 6939 | | |
6940 | | - | |
| 6940 | + | |
6941 | 6941 | | |
6942 | 6942 | | |
6943 | 6943 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments