Developer Feedback: Image Inputs to llm.complete May Not Be Reaching the Model, and the Documentation Is Less Explicit Than for Agent Session

Hi @HappyLight :waving_hand:

Thank you for this outstanding report — the RPC-level validation, the token-count observation, and the side-by-side comparison with Agent Session made this a joy to investigate. You were spot on. :bullseye:

What we found :magnifying_glass_tilted_left:

You uncovered a real bug. The llm.complete message assembler was text-only: MCP {type:'image', ...} blocks were silently dropped before the request ever reached the model. That’s exactly why you saw a “successful” response, inputTokens: 9, and a model that couldn’t see your (perfectly valid) PNG. The same issue affected llm.stream and the plugin-side agent/complete. The documentation was ahead of the implementation here — sorry about the confusion that caused. :person_bowing:

What’s fixed — host 1.1.0-beta.169 :hammer_and_wrench:

Rolling out this Friday:

  • :framed_picture: Image blocks now work end-to-end on llm.complete, llm.stream, and agent/complete. Supported shapes:
    • { type: "image", data: "<raw base64>", mimeType: "image/png" } (exactly what you sent — no app-side changes needed!)
    • data as a full data: URI (mimeType optional)
    • { type: "image", url: "https://…" } (public HTTPS)
  • :speech_balloon: Yes, your usage pattern is supported: text and images may share one content array or sit in separate consecutive user messages — both work.
  • :vertical_traffic_light: No more silent failures: if the resolved model isn’t vision-capable, the call now fails fast with APP_MODEL_NOT_VISION_CAPABLE (use modelPreferences.hints to pick a vision model). Malformed or unsupported blocks return APP_INVALID_REQUEST. Images are never quietly dropped again.
  • :straight_ruler: Limits match Agent Session attachments: image/jpeg|png|gif|webp|bmp|svg+xml, ≤ 20 MB per image.
  • :books: Docs updated: the LLM Host API reference now documents the exact image block fields, limits, and errors, and the App-Side LLM & Agent guide has a new runnable image example — same level of detail as the Agent Session attachments section you referenced.
  • :test_tube: The official anna-app-llm-demo example has been updated with an image input so you can compare against a known-good request.

One note: the plugin-side sampling/createMessage remains text-only for now and rejects image blocks with a clear error — use agent/complete or session attachments on that surface.

Your original request body should work as-is once the update lands — we’d love to hear how it goes. Thanks again for the meticulous report; reports like this make the platform better for every developer. :yellow_heart: