You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: model-generated files (inline images) in chat/responses turns #548
Image generation and the Files API are mocked as separate endpoints, but there is no way to make a chat/responses model turn return a generated file (e.g. an inline image). Clients that surface model-generated files (AI SDK file stream parts) can't be tested through aimock.
Proposal
An optional files field on text / content+tool-call responses:
llm.on({endpoint: 'responses'},{content: 'Here is your chart.',files: [{mediaType: 'image/png',data: '<base64>'}],});
Emitted per wire format:
OpenAI Responses: an image_generation_call output item with result (base64)
Gemini: inlineData parts in the candidate content
Chat Completions / Anthropic: reject with a clear unsupported error (same pattern as customToolCalls)
Use case
Same as the citations request: Mastra's loop regression tests need to assert that model-generated files flow through to the stream and stored messages.
#550 handles Gemini inline files on model turns. It's waiting on the same two review changes I mentioned on #547. After it merges I'll keep this open for the rest, which is image output on Responses and clear unsupported errors on the other providers.
Activity
jpr5 commentedon Oct 21, 2026
#550 handles Gemini inline files on model turns. It's waiting on the same two review changes I mentioned on #547. After it merges I'll keep this open for the rest, which is image output on Responses and clear unsupported errors on the other providers.
jpr5 commentedon Oct 23, 2026
Reopening — #550 shipped generated files for Gemini only. The OpenAI side is next.
feat(gemini): scriptable model-generated files via fixture files
feat: scriptable citations (Responses) and model-generated files (Gem…
feat: citations and generated files on the remaining providers (Copil…