[FEATURE] Let image blocks set OpenAI's image detail level (low/high/auto)
SDK Language
Python
Problem Statement
OpenAI image inputs take a detail setting (low, high, auto) that trades cost and latency against how closely the model looks. Strands gives no way to set it:
OpenAIResponsesModelsends{"type": "input_image", "image_url": ...}with nodetail(strands-py/src/strands/models/openai_responses.py).OpenAIModelhard-codes"detail": "auto"(strands-py/src/strands/models/openai.py).ImageContenthas onlyformatandsource.
Checked on main at fec0427664.
Proposed Solution
An optional detail on the image block, passed through by both OpenAI providers and ignored by providers that do not support it:
{"image": {"format": "jpeg", "source": {"bytes": data}, "detail": "low"}}
Default stays as today (auto), so nothing changes for existing users. Happy to send the PR if this shape works.
Use Case
We run a car-diagnostics agent on Strands with OpenAIResponsesModel. Users attach photos: a dashboard warning light needs only low, a repair quote or a VIN label needs high. Today every photo is billed at whatever auto picks.
Alternatives Solutions
A model-level config option (one detail for all images). Simpler, but it cannot mix a cheap photo and a text-heavy photo in one conversation.
Additional Context
OpenAI docs: https://platform.openai.com/docs/guides/images-vision (see "Specify image input detail level").
Hi @charles-dyfis-net @serenearyal , is this isssue still open? Can this be assigned to me if not claimed any anyone else? Thanks
Hi @serenearyal, are you still planning to send the PR for this? If not, I'd like to take it.
I checked on current main. The proposed shape (an optional detail on ImageContent) touches a few more places than the issue lists:
OpenAIModel hard-codes "detail": "auto" (models/openai.py)
LiteLLMModel hard-codes it too (models/litellm.py), which isn't in the issue, but it should follow the same field
OpenAIResponsesModel builds input_image in two places: normal user content and images inside tool results (models/openai_responses.py)
Plan: add detail: NotRequired[Literal["low", "high", "auto"]] to ImageContent, pass it through in all three providers (defaulting to auto, so nothing changes for existing users), and add a test that Bedrock and the other providers don't forward the new key. Converse would reject an unknown field. Should the TypeScript SDK get the same field for parity, or keep this Python-only?