Skip to content

Commit 45e1e50

Browse files
scale-ballenclaude
andauthored
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

File tree

clients/python/llmengine/data_types/gen/openai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6875,7 +6875,7 @@ class VectorStoreObject(BaseModel):
68756875

68766876

68776877
class QueryItem(BaseModel):
6878-
__root__: Annotated[str, Field(description="A list of queries to search for.", min_items=1)]
6878+
__root__: Annotated[str, Field(description="A list of queries to search for.")]
68796879

68806880

68816881
class RankingOptions(BaseModel):
@@ -6937,7 +6937,7 @@ class Config:
69376937

69386938

69396939
class SearchQueryItem(BaseModel):
6940-
__root__: Annotated[str, Field(description="The query used for this search.", min_items=1)]
6940+
__root__: Annotated[str, Field(description="The query used for this search.")]
69416941

69426942

69436943
class VectorStoreSearchResultsPage(BaseModel):

clients/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "scale-llm-engine"
3-
version = "0.0.0.beta46"
3+
version = "0.0.0.beta47"
44
description = "Scale LLM Engine Python client"
55
license = "Apache-2.0"
66
authors = ["Phil Chen <phil.chen@scale.com>"]

0 commit comments

Comments
 (0)