ModelDecision class

One decision returned by ModelProvider.decide.

Constructors

ModelDecision({required ({Map<String, dynamic> args, String tool}) action, String? thinking, String? rationale, String? waitStrategy, String? providerRequestId, Map<String, dynamic> modelMetadata = const <String, dynamic>{}})
const

Properties

action → ({Map<String, dynamic> args, String tool})
The action chosen this turn — tool is a tool name, args is the validated argument map for that tool.
final
hashCode int
The hash code for this object.
no setterinherited
modelMetadata Map<String, dynamic>
Provider response metadata persisted with the trajectory turn. Dartantic-backed providers include served_model_id and an explicit provider_request_id entry; custom providers may leave this empty.
final
providerRequestId String?
Provider-side request id (e.g. Anthropic/swift-infer message.id from the SSE message_start event). Null when the provider did not emit one, or when the decision was synthesized in tests. Surfaced into the dogfood trace as decision.provider_request_id so an operator can cross-reference swift-infer's /v1/trace/:id endpoint without manual time-correlation.
final
rationale String?
Optional rationale string (free-form; not used for control flow).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thinking String?
Captured thinking/reasoning text for carry-forward to the next turn's AssistantTurn. Providers populate this from native thinking blocks (Anthropic), <think> tags (SwiftInfer), or leave it null (OpenAI).
final
waitStrategy String?
Optional wait strategy hint (e.g. 'frame', 'idle').
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited