1"""Build image-bearing request payloads for Converse and the Responses API.23Two mistakes are easy to make by hand and both produce a confusing failure mode4where the vision smoke test passes (it hardcodes a known-good jpeg) while every5golden case fails:671. **Extension is not the wire format.** A `.jpg` file is `jpeg` for Converse and8 `image/jpeg` for Responses. Passing `jpg` / `image/jpg` is rejected.92. **Responses content must be wrapped in a message item.** A bare10 `[{"type": "input_text", ...}]` list is not a valid `input`; it has to be11 `[{"role": "user", "content": [...]}]`.123. **`detail` is required on a Responses image block.** The pinned OpenAI SDK13 declares `ResponseInputImageParam.detail` as `Required`, so omitting it is a14 contract violation even though a TypedDict will not catch it at runtime.