pydantic_core._pydantic_core.ValidationError: 1 validation error for FlowResponse
flowData.steps.0.type
Input should be a valid string - got unexpected token at position 12
Problem
Client wrapper fails on flowData parsing inside architect flows. JSON response throws Pydantic error on steps array. OpenAPI spec defines it as loose object, but actual payload includes binary-serialized agent scripting prompts. Pydantic rejects base64 chunks inside properties. Console is empty until validation crash. Environment runs Python 3.11 with platform-api-sdk v1.2.4 on Toronto prod instance.
Code
from pydantic import BaseModel, Field
from typing import List, Dict, Any
class StepNode(BaseModel):
id: str
type: str
properties: Dict[str, Any] = Field(default_factory=dict)
class FlowResponse(BaseModel):
id: str
flowData: Dict[str, List[StepNode]]
response = client.architect.get_flow(flow_id="abc-123")
parsed = FlowResponse.model_validate(response.json())
Question
Switching to Any defeats typed client purpose. Logs show application/json but payload contains raw script blobs. What’s the standard approach to handle mixed-type arrays without dropping strict typing? The retry decorator won’t help with schema mismatches.