Skip to content

AIDK API Reference / aidk-shared / ModelOutput

Interface: ModelOutput ​

Defined in: packages/shared/src/models.ts:111

Model output - simplified platform-independent structure.

Used for direct model execution from clients. Backend extends this with raw provider response, cacheId, etc.

Extended by ​

Properties ​

PropertyTypeDescriptionDefined in
createdAtstring-packages/shared/src/models.ts:116
message?MessageConvenience accessor for the primary assistant message. When messages is provided, this is the last assistant-role message. When messages is not provided, this is the single generated message. Use messages array for full conversation history or multi-message responses.packages/shared/src/models.ts:132
messages?Message[]All messages from this model call. May contain multiple messages for multi-step execution or provider-executed tools. For single-turn responses, this will typically contain one assistant message.packages/shared/src/models.ts:123
modelstringGeneration metadatapackages/shared/src/models.ts:115
stopReasonStopReasonWhy generation stoppedpackages/shared/src/models.ts:137
toolCalls?ToolCall[]Tool calls made by the modelpackages/shared/src/models.ts:147
usageTokenUsageToken usagepackages/shared/src/models.ts:142

Released under the MIT License.