DoneResult
Defined in: packages/sdk/src/result.ts:83
A run that finished: the model answered without calling a tool, or an output tool accepted its answer. output is
the accepted answer, and undefined when the run has no output tool, the model answered in text, or another tool
ended the run with terminate: true. A text
answer cut off at the output limit also ends done; its message’s stopReason is then "length".
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”S
Properties
Section titled “Properties”context
Section titled “context”
readonlycontext:Context
Defined in: packages/sdk/src/result.ts:65
The whole conversation, earlier history included, ready for continueRun().
Inherited from
Section titled “Inherited from”
readonlycost:Cost
Defined in: packages/sdk/src/result.ts:72
The cost of every model call, summed. It is unknown if any call’s cost is. A run that made no call costs an exact
0 with basis provider, so adding it to another cost keeps that cost’s basis.
Inherited from
Section titled “Inherited from”messages
Section titled “messages”
readonlymessages: readonlyMessage[]
Defined in: packages/sdk/src/result.ts:63
The messages this run added: the input, if any, then every response and tool result, in order.
Inherited from
Section titled “Inherited from”output
Section titled “output”
readonlyoutput:S|undefined
Defined in: packages/sdk/src/result.ts:85
readonlysteps:number
Defined in: packages/sdk/src/result.ts:74
How many model calls the run made.
Inherited from
Section titled “Inherited from”stopReason
Section titled “stopReason”
readonlystopReason:"done"
Defined in: packages/sdk/src/result.ts:84
readonlyusage:Usage
Defined in: packages/sdk/src/result.ts:67
The tokens of every model call, summed.
Inherited from
Section titled “Inherited from”These docs are licensedCC BY 4.0. Thelicence text is in the repository.