parse_structured_output()
Parse raw CLI stdout into text or a validated model.
Usage
parse_structured_output(raw: str, response_model: None) -> str
parse_structured_output(raw: str, response_model: type[M]) -> MParameters
raw: str-
Raw stdout from the backend CLI.
response_model: type[M] | None-
The Pydantic model to validate against, or
Nonefor text.
Returns
str | M-
rawfor text calls; otherwisestructured_outputfrom the stream-json events, elserawvalidated as JSON.