repairToolCall property

  1. @JsonKey.new(includeFromJson: false, includeToJson: false)
RepairToolCall? repairToolCall
final

Repair a tool call the model got wrong (RFC-0035), mirroring the AI SDK's repairToolCall.

Runs host-side, after generation: every call in the result with invalid == true is offered to the hook once, in order, and the reply is re-validated by the core. A call made without tools is never offered — the hook is not invoked for it.

Honoured by TypedModel's generateText / generateObject / consumeStreamText / streamText, and by generateTextAsOpenAI, which repairs the native result before converting it. streamTextAsOpenAI does not reflect repair: the chunk stream forwards the provider's argument deltas verbatim, as in the AI SDK.

Never serialized — it is a host closure, not part of the wire options.

Implementation

@JsonKey(includeFromJson: false, includeToJson: false)
final RepairToolCall? repairToolCall;