modelgen: recurse through nested generics in list resolvers
_get_list_inner (Pydantic) and _resolve_ts_list (TypeScript) collapsed nested generics to "str" / "string[]" — so List[List[int]] became List[str] and List[Dict[str,Any]] became List[str]. Fix recurses on list-of-list and falls back to Dict[str,Any] / Record<string,unknown> for list-of-dict. Regenerated outputs: - core/gpu/models/models.py: SegmentFieldResponse.boundary now List[List[int]], unblocking /segment_field which was 500ing on every request with pydantic ValidationError - core/db/models.py + ui/common/types/generated.ts: Brand.airings now matches its source schema (List[Dict[str,Any]] / Record<string,unknown>[])
This commit is contained in:
@@ -115,13 +115,13 @@ class SegmentFieldRequest(BaseModel):
|
||||
|
||||
class SegmentFieldResponse(BaseModel):
|
||||
"""Response from field segmentation."""
|
||||
boundary: List[str] = Field(default_factory=list)
|
||||
boundary: List[List[int]] = Field(default_factory=list)
|
||||
coverage: float = 0.0
|
||||
mask_b64: str = ""
|
||||
|
||||
class SegmentFieldDebugResponse(BaseModel):
|
||||
"""Response from field segmentation with debug overlay."""
|
||||
boundary: List[str] = Field(default_factory=list)
|
||||
boundary: List[List[int]] = Field(default_factory=list)
|
||||
coverage: float = 0.0
|
||||
mask_overlay_b64: str = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user