Repository navigation
Conversation
- Emit `detail: "auto"` when no per-model detail is set, matching the OpenAI API default and the field strict upstreams require. - Update the affected expectations and recorded request bodies, and cover the default on compaction replay.
There was a problem hiding this comment.
The fix looks good. I reproduced #59404 from source on the base branch using the issue's local Responses server, which requires detail on every input_image the way vLLM does. On base, the tool-result image is sent without detail and the run fails with detail: Field required. With this change it is sent with detail: "auto" and the run completes. The changed tests, the full packages/ai/test/provider suite and typecheck:tsc all pass.
The default only applies to input_image: explicit low/high/auto values still pass through, and input_file is left alone, which matches the OpenAI schema. The four recordings only gain "detail":"auto" in their request bodies. They were edited by hand rather than re-recorded, so I couldn't confirm against the live Alibaba and Moonshot endpoints, but it is a standard OpenAI field.
Public API: unchanged.
Related: #48740
Issue for this PR
Closes #59404
Type of change
What does this PR do?
detail: "auto"when no per-model detail is set, matching the OpenAI API default and the field strict upstreams require.How did you verify your code works?
The existing tests
Checklist
If you do not follow this template your PR will be automatically rejected.
Added by the opencode bot (AI-generated).
Related: #48740