Type Alias: ToolModelOutput
ToolModelOutput = {
type:"text";value:string; } | {type:"content";value:MessageContentBlock[]; } | {type:"omit"; }
Defined in: packages/core/src/utils/tools.ts:97
Output transformation result for model context (AI SDK v6 pattern)
Controls how tool output is represented to the model.
Examples
toModelOutput: ({ output }) => ({
type: 'text',
value: `Search found ${output.results.length} results`
})
toModelOutput: ({ output }) => ({
type: 'omit' // Tool ran but output won't be sent to model
})
toModelOutput: ({ output }) => ({
type: 'content',
value: [{ type: 'text', text: output.summary }]
})