AI SDK 7 has no 'media' tool output part; images are { type: 'file', mediaType, data: { type: 'data', data } }. After diff_visual, export_image, or any other image result, the next step's prompt failed validation with AI_InvalidPromptError and the chat run stopped. toModelOutput is now typed against the SDK's ToolResultPart output, and a test validates the resulting tool message with the SDK's own schema.
|
||
|---|---|---|
| .. | ||
| canvas | ||
| clipboard/figma | ||
| design-jsx | ||
| editor | ||
| figma-api | ||
| helpers | ||
| io/formats/fig | ||
| layout/auto-layout/text | ||
| text/derived-text | ||
| tools | ||