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
[BUG] Image paste fails only on Azure GPT-5.2-Codex (File not found / [Image 1] not processed) #9375
When using Azure GPT-5.2-Codex (gpt-5.2-codex on Azure) in OpenCode, pasting an image from the clipboard fails.
After I paste an image (e.g., screenshot → Ctrl+V), the TUI inserts a placeholder like:
[Image 1]
But when I send the message, OpenCode attempts to read a local file named Image 1 and fails with an error similar to:
Error: File not found: ...\Image 1
As a result, the image is not processed/recognized.
This issue happens only with Azure GPT-5.2-Codex. If I switch to GPT-5.2 (non-codex), everything works normally and the pasted image is processed correctly.
Suspected cause: This looks like a model/API integration issue specific to Azure GPT-5.2-Codex, where the image/file part is not being sent/handled correctly and only the [Image 1] placeholder text remains, causing downstream logic to treat it as a local filename.
Steps to reproduce
Start OpenCode and select Azure GPT-5.2-Codex.
Copy an image to clipboard (e.g., take a screenshot).
Paste into OpenCode input (Ctrl+V) → [Image 1] appears.
Send the prompt.
Observe OpenCode tries to read Image 1 as a local file and fails with File not found.
Switch to GPT-5.2 (non-codex) and repeat → works as expected.
Expected behavior
Pasted clipboard images should be transmitted to the model and processed normally (image recognition works).
Actual behavior
Only the [Image 1] placeholder is present at send time; OpenCode tries to read a local file named Image 1 and errors with File not found.
Screenshot / Logs
(Attach screenshot here showing the “Read Image 1” + “File not found: ...\Image 1” error.)
Activity
github-actions commentedon Jan 19, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
chiangleoi commentedon Jan 20, 2026
@InCerryGit 请问,opencode 如何链接 azure gpt5.2-codex ? 我选择这个模型的时候只让我填写了 key,没有配置 endpoint 等信息的地方
InCerryGit commentedon Jan 20, 2026
文档中写了,配置环境变量即可 https://opencode.ai/docs/providers/#azure-openai
Ihab-Zhaika commentedon Jan 25, 2026
Having same issue
Ihab-Zhaika commentedon Jan 25, 2026
@InCerryGit try this [in provider]
the thing that solved it is
"supportsVision": true,
"useResponsesAPI": true
you can add PR to support it in the code
github-actions commentedon Mar 27, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.