Description
When the upstream API returns an HTTP 404 error (e.g., model not found, wrong endpoint path, or deleted model), OpenCode silently hangs in the "thinking..." state indefinitely. No error message is shown to the user, no timeout or retry mechanism kicks in, and the session becomes completely unresponsive. The only recovery is to kill the process or restart the app.
This is distinct from stream errors during active streaming (#32366) — the 404 happens at the initial API request before any stream starts, yet produces the same stuck-in-thinking symptom.
OpenCode version
1.17.13 (also observed on earlier versions)
Steps to reproduce
- Configure an OpenAI-compatible provider with an incorrect API endpoint (e.g.,
https://api.example.com/v1/chat/completions that returns 404)
- Or use a model name that does not exist on the provider
- Send any message to start a session
- Observe: UI shows "thinking..." immediately but never transitions to either a response or an error state
- The session stays stuck indefinitely — no cancel button, no error toast, no timeout recovery
Expected behavior
- Show an error message when the API returns 404 (e.g., "Model not found" or "API endpoint unavailable")
- Transition out of "thinking" state — either auto-retry with fallback or surface the error and return to idle
- Client-side timeout to prevent indefinite stuck states when the API fails to respond properly
Additional context
The same class of issue has been reported for different error triggers:
This issue specifically covers the HTTP 404 trigger case, which may need a slightly different fix (the error occurs before stream initiation, so stream-level error handling does not apply).
Operating System
macOS (darwin arm64)
Terminal
N/A (primarily affects Desktop GUI and TUI modes)
Description
When the upstream API returns an HTTP 404 error (e.g., model not found, wrong endpoint path, or deleted model), OpenCode silently hangs in the "thinking..." state indefinitely. No error message is shown to the user, no timeout or retry mechanism kicks in, and the session becomes completely unresponsive. The only recovery is to kill the process or restart the app.
This is distinct from stream errors during active streaming (#32366) — the 404 happens at the initial API request before any stream starts, yet produces the same stuck-in-thinking symptom.
OpenCode version
1.17.13 (also observed on earlier versions)
Steps to reproduce
https://api.example.com/v1/chat/completionsthat returns 404)Expected behavior
Additional context
The same class of issue has been reported for different error triggers:
This issue specifically covers the HTTP 404 trigger case, which may need a slightly different fix (the error occurs before stream initiation, so stream-level error handling does not apply).
Operating System
macOS (darwin arm64)
Terminal
N/A (primarily affects Desktop GUI and TUI modes)