Description
When an OpenAI credential lacks api.responses.write, OpenCode stores the failure as a generic APIError with the raw provider message instead of classifying it as an auth/configuration problem.
That makes the failure look like a model/runtime issue even though the actual problem is missing Responses API permission on the credential. The UI and session history then surface a noisy raw provider error instead of actionable auth guidance.
Plugins
Built-in Codex / OpenAI OAuth integration
OpenCode version
dev (d2d5d84d1 before this fix)
Steps to reproduce
- Authenticate the built-in OpenAI provider with an OAuth token or restricted key that does not have
api.responses.write.
- Start a session on an OpenAI GPT-5.x / Responses API model such as
gpt-5.4.
- Send a prompt that triggers a normal assistant run.
- Observe the stored/displayed error when the provider returns
401 Missing scopes: api.responses.write.
Screenshot and/or share link
Error excerpt:
You have insufficient permissions for this operation. Missing scopes: api.responses.write.
Operating System
Linux
Terminal
N/A
Description
When an OpenAI credential lacks
api.responses.write, OpenCode stores the failure as a genericAPIErrorwith the raw provider message instead of classifying it as an auth/configuration problem.That makes the failure look like a model/runtime issue even though the actual problem is missing Responses API permission on the credential. The UI and session history then surface a noisy raw provider error instead of actionable auth guidance.
Plugins
Built-in Codex / OpenAI OAuth integration
OpenCode version
dev (
d2d5d84d1before this fix)Steps to reproduce
api.responses.write.gpt-5.4.401 Missing scopes: api.responses.write.Screenshot and/or share link
Error excerpt:
Operating System
Linux
Terminal
N/A