Skip to content
Prompty

TurnModelResponse

Response returned by the injected model callback to the reference turn runner.

---
title: TurnModelResponse
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class TurnModelResponse {
        +unknown output
        +InvocationUsage usage
        +HostToolRequest[] toolRequests
        +dictionary checkpointState
    }
    class InvocationUsage {
        +int64 inputTokens
        +int64 outputTokens
        +int64 totalTokens
    }
    TurnModelResponse *-- InvocationUsage
    class HostToolRequest {
        +string requestId
        +string toolCallId
        +string toolName
        +dictionary arguments
        +string workingDirectory
    }
    TurnModelResponse *-- HostToolRequest
Name Type Description
output unknown Provider-neutral final model output for the turn when no more tools are requested
usage InvocationUsage Complete cumulative token usage reported for this model invocation, when available
toolRequests HostToolRequest[] Host tool execution requests emitted by the model callback
checkpointState dictionary Additional deterministic state to merge into the iteration checkpoint. Values may be explicit null.

The following types are composed within TurnModelResponse: