2026-10-28 12:26:34 +01:00
{
"$schema" : "https://json-schema.org/draft/2020-12/schema" ,
"title" : "TransportReceipt" ,
"type" : "object" ,
"properties" : {
"caller_runtime_id" : {
"type" : "string"
} ,
2026-10-28 13:31:06 +01:00
"foreign_reasoning_dropped" : {
"description" : "How many foreign `ReasoningState` items the service removed from the\nrequest before the backend saw it." ,
"type" : "integer" ,
"format" : "uint32" ,
"minimum" : 0
} ,
2026-10-28 12:26:34 +01:00
"model" : {
"type" : "string"
} ,
"native_request_sha256" : {
"type" : "array" ,
"items" : {
"type" : "integer" ,
"format" : "uint8" ,
"maximum" : 255 ,
"minimum" : 0
} ,
"maxItems" : 32 ,
"minItems" : 32
} ,
"outcome" : {
"$ref" : "#/$defs/TransportOutcome"
} ,
"provider" : {
"type" : "string"
} ,
"provider_request_sha256" : {
"type" : "array" ,
"items" : {
"type" : "integer" ,
"format" : "uint8" ,
"maximum" : 255 ,
"minimum" : 0
} ,
"maxItems" : 32 ,
"minItems" : 32
} ,
"request_id" : {
"type" : "string"
} ,
"schema_id" : {
"type" : "string"
}
} ,
"additionalProperties" : false ,
"required" : [
"schema_id" ,
"request_id" ,
"caller_runtime_id" ,
"native_request_sha256" ,
"provider_request_sha256" ,
"model" ,
"provider" ,
2026-10-28 13:31:06 +01:00
"foreign_reasoning_dropped" ,
2026-10-28 12:26:34 +01:00
"outcome"
] ,
"$defs" : {
"FailureKind" : {
"description" : "What kind of failure a provider reported. `ResultSize` is the connector's own\nstand-in for a result whose sealed frame cannot be carried." ,
"type" : "string" ,
"enum" : [
"result_size" ,
"invalid_request" ,
"authentication" ,
"rate_limited" ,
"unavailable" ,
"timeout" ,
"provider"
]
} ,
"StopReason" : {
"description" : "Why a provider stopped producing output." ,
"type" : "string" ,
"enum" : [
"end_turn" ,
"tool_use" ,
"max_output_tokens" ,
"stop_sequence" ,
"refusal" ,
"context_window"
]
} ,
"TransportOutcome" : {
"oneOf" : [
{
"type" : "object" ,
"properties" : {
"Completed" : {
"type" : "object" ,
"properties" : {
"provider_response_id" : {
"type" : [
"string" ,
"null"
]
} ,
"stop_reason" : {
"$ref" : "#/$defs/StopReason"
} ,
"usage" : {
"$ref" : "#/$defs/Usage"
}
} ,
"additionalProperties" : false ,
"required" : [
"stop_reason" ,
"usage"
]
}
} ,
"additionalProperties" : false ,
"required" : [
"Completed"
]
} ,
{
"type" : "object" ,
"properties" : {
"Failed" : {
"type" : "object" ,
"properties" : {
"kind" : {
"$ref" : "#/$defs/FailureKind"
} ,
"message" : {
"type" : "string"
2026-10-28 18:47:06 +01:00
} ,
"usage" : {
"description" : "What the provider billed for the failed request: `Some` when it\nreported usage (`Some` of zeros when it billed nothing), `None`\nwhen unknown." ,
"anyOf" : [
{
"$ref" : "#/$defs/Usage"
} ,
{
"type" : "null"
}
]
2026-10-28 12:26:34 +01:00
}
} ,
"additionalProperties" : false ,
"required" : [
"kind" ,
"message"
]
}
} ,
"additionalProperties" : false ,
"required" : [
"Failed"
]
}
]
} ,
"Usage" : {
2026-10-31 04:51:05 +01:00
"description" : "Token accounting for one request, as the backend reports it. Cache reads\nand writes are counted apart from plain input.\n`output_tokens` includes reasoning tokens: `reasoning_tokens` is a detail\n(absent when the provider does not report it) and is never counted apart." ,
2026-10-28 12:26:34 +01:00
"type" : "object" ,
"properties" : {
"cache_read_tokens" : {
"type" : "integer" ,
"format" : "uint64" ,
"minimum" : 0
} ,
"cache_write_tokens" : {
"type" : "integer" ,
"format" : "uint64" ,
"minimum" : 0
} ,
"input_tokens" : {
"type" : "integer" ,
"format" : "uint64" ,
"minimum" : 0
} ,
"output_tokens" : {
"type" : "integer" ,
"format" : "uint64" ,
"minimum" : 0
} ,
"reasoning_tokens" : {
"type" : [
"integer" ,
"null"
] ,
"format" : "uint64" ,
"minimum" : 0
}
} ,
"additionalProperties" : false ,
"required" : [
"input_tokens" ,
"cache_read_tokens" ,
"cache_write_tokens" ,
"output_tokens"
]
}
}
}