agentic.ModelResponse¶
Page status: scaffold Source state: generated Applies to: Shepherd v1.0-dev Owner: @docs-system-owner (TBD) Validation: scripts/gen_shepherd_api_inventory.py --check
This is reference — exact, generated facts. The mental model lives in concepts; recipes live in guides.
Pre-rename surface
Generated from the internal agentic facade; names and paths change at the Shepherd rename.
class
ModelResponse
dataclass
¶
Provider response payload (embedded in EffectCapture).
Mutual exclusion enforced at construction: exactly one of
text, structured_output, or non-empty tool_calls.
Adapters normalize text="" to text=None per DECISIONS D15
before constructing.
finish_reason
class-attribute
instance-attribute
¶
structured_output
class-attribute
instance-attribute
¶
__init__ ¶
__init__(
text: str | None = None,
structured_output: dict[str, Any] | None = None,
tool_calls: tuple[ToolCallRecord, ...] = (),
usage: Usage = Usage(),
session_id: str | None = None,
finish_reason: Literal[
"end_turn",
"max_tokens",
"stop_sequence",
"tool_use",
] = "end_turn",
) -> None