Skip to content

pydantic_ai.models.wrapper

CompletedStreamedResponse

Bases: StreamedResponse

A StreamedResponse that wraps an already-completed ModelResponse.

Used by durable execution integrations (Temporal, Prefect, DBOS) where the actual stream is consumed within a task/activity and only the final response is returned.

WrapperModel

Bases: Model

Model which wraps another model.

Does nothing on its own, used as a base class.

Attributes

wrapped

The underlying model being wrapped.

Type: Model Default: infer_model(wrapped)

settings

Get the settings from the wrapped model.

Type: ModelSettings | None