Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
Summary
Selecting a model whose upstream endpoint fails (currently opencode-go/deepseek-v4.1-flash, which returns HTTP 503 "Endpoint is unavailable" from the Zen Go router) makes OpenCode retry the stream silently and indefinitely. The CLI produces no output and no error, so a 1.6-second upstream failure looks like an endless hang.
Environment
- opencode version: 2.0.3
- OS: Windows 10 Pro 10.0.19045 (MINGW64_NT-10.0-19045, x86_64)
- Terminal: Windows console, TERM=xterm-256color
- Shell: Git Bash (bash 3.6.10, MINGW64)
- Install/channel: latest, npm package
@opencode/[email protected] - Active plugins:
@franlol/opencode-md-table-formatter@latest,@prevalentware/opencode-goal-plugin(the goal plugin currently fails to load with a SchemaError — unrelated, noted for completeness)
Reproduction
- Run against the shared background service:
timeout 90 opencode run -m opencode-go/deepseek-v4.1-flash "Reply with exactly: OK" - Observe: no output, no error, process never exits. After 90s
timeoutkills it (exit 124) with 0 bytes of output. - Direct test bypassing OpenCode confirms the trigger — POST to
https://opencode.ai/zen/go/v1/chat/completionswithx-opencode-sessionheader:- model
deepseek-v4.1-flash→ HTTP 503 in ~1.6s:{"error":{"type":"server_error","message":"Error from provider (Console Go): Upstream request failed: Endpoint is unavailable."}} - control model
deepseek-v4-pro→ HTTP 200 in ~2s, normal completion.
- model
Expected Behavior
The client should surface an error such as "provider request failed (503): Endpoint is unavailable" and stop (or retry a bounded number of times with visible feedback), instead of waiting forever with no console messages.
Actual Behavior
- The client submits the message and holds
GET /api/eventandPOST /api/session/<id>/waitopen; the server never completes the session. ~/.local/share/opencode/log/opencode.logfor the hung session shows nostream providerID=...entry, no retry entries, and no provider error — nothing betweencli startingand the eventual client-side interrupt.- Earlier logs (Aug 14) show the same class of failure with a silent retry loop: repeated
stream providerID=opencode-go ...+llm runtime selectedentries every ~7s for a minute+, never surfaced to the user.
Additional Context
- Reproduces consistently for this model; started right after the model appeared in the catalog (release_date 2026-09-10). Works fine with
opencode-go/deepseek-v4-proandopencode-go/deepseek-v4-flash(both verified end-to-end). - Workaround: use
opencode-go/deepseek-v4-prooropencode-go/deepseek-v4-flash. - Side observation: the official
deepseek/deepseek-v4-flashprovider also stalls (API returns 200 headers but the body never completes) — separate upstream issue.
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Sep 14, 2026
This issue might be a duplicate of existing issues. Please check:
opencodejr commentedon Oct 28, 2026
Thanks for the detailed report. I tried to reproduce this on
@opencode/[email protected]. I pointedopencode runat a mock OpenAI-compatible provider that always answers with HTTP 503 and the same body you got from the Go router (Upstream request failed: Endpoint is unavailable.), with and without your two plugins.In both cases OpenCode retried a few times, about 30–35s in total, then printed
Error: Error from provider (Console Go): Upstream request failed: Endpoint is unavailable.and exited with code 1. So a 503 from the provider doesn't seem to cause an endless retry on its own. One thing does match your report: while it retries, the only feedback is a repeated> build · flashline, with no reason shown.Your log for the hung session has no
stream providerID=...entry at all. That suggests the stall happens before any model request is sent, maybe in the shared background service. These would help narrow it down:opencode run --standalone -m opencode-go/deepseek-v4.1-flash "Reply with exactly: OK"? And does it still hang afteropencode service restart?role=serverlines from~/.local/share/opencode/log/opencode.logfor one hung run, ideally withOPENCODE_LOG_LEVEL=DEBUGset (please redact keys and prompts).opencode upgrade)?opencodejr commentedon Oct 31, 2026
We're closing this for now because we haven't heard back. When we tested
opencode runon 2.0.3 against a provider that always returns HTTP 503 with the sameEndpoint is unavailablebody, OpenCode retried a few times. After about 30–35 seconds it printed the error and exited with code 1, and it didn't hang. Your log has nostream providerID=...entry, so the hang you saw probably happens before any model request is sent. We'd need more details to track that down.If it still happens, please reply here and we can reopen it. These would help most:
opencode run --standalone ...(or a run afteropencode service restart) also hangsrole=serverlog lines from one hung run, ideally withOPENCODE_LOG_LEVEL=DEBUG(please redact keys and prompts)Thanks for the detailed report.