anomalyco / anomalyco/opencode

deepseek-v4-flash on opencode-go drops connection before response (pro works on same endpoint)

Open
#40,465 6 comments 7 reactions 1 assignee View on GitHub

@MrMushrooooom is already working on this.

Since Aug 4, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

deepseek-v4-flash served through the OpenCode Go provider (https://opencode.ai/zen/go/v1) is unreachable: the upstream closes the TCP connection before returning any HTTP response, causing every request to hang until OpenCode's 30s timeout fires an AbortError. The request never reaches the model.

In contrast, deepseek-v4-pro on the same endpoint, same API key, same auth responds normally (HTTP 200 with content + reasoning). This strongly indicates a server-side routing/availability issue with the flash lane on the zen/go backend, not a client config or auth problem.

Direct API probe (outside OpenCode, via Invoke-WebRequest):

Model Endpoint Result
deepseek-v4-flash https://opencode.ai/zen/go/v1/chat/completions Connection closed by remote before any HTTP response (non-stream and stream both fail)
deepseek-v4-pro https://opencode.ai/zen/go/v1/chat/completions HTTP 200, valid chat.completion with reasoning_content

OpenCode log captured during the failure (identical pattern for every flash attempt):

timestamp=... level=INFO message="stream providerID=opencode-go modelID=deepseek-v4-flash ... agent=orchestrator"
timestamp=... level=INFO message="llm runtime selected" llm.runtime=ai-sdk llm.provider=opencode-go llm.model=deepseek-v4-flash
# ~30s later:
timestamp=... level=ERROR message=process ... error=Aborted stack="AbortError: Aborted\n    at new DOMException ..."

The same session then falls back to deepseek-v4-pro or glm-5.2 on the same provider and succeeds, confirming the failure is scoped to deepseek-v4-flash.

Plugins
  • oh-my-opencode-slim
  • oc-codex-multi-auth
  • @cortexkit/opencode-magic-context@latest
OpenCode version

1.18.4.0 (OpenCode Desktop)

Steps to reproduce
  1. Configure OpenCode with the opencode-go provider and auth (OPENCODE_API_KEY).
  2. Set any agent (e.g. orchestrator) to opencode-go/deepseek-v4-flash.
  3. Send any message.
  4. Observe: the request hangs ~30s with no streamed tokens, then aborts with AbortError: Aborted. No error is surfaced from the upstream; the connection is dropped before an HTTP status is returned.

Independent reproduction (bypassing OpenCode entirely):

curl -X POST https://opencode.ai/zen/go/v1/chat/completions \
  -H "Authorization: Bearer $OPENCODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"hi"}],"max_tokens":10,"stream":false}'
# -> connection closed by remote, no HTTP response
curl -X POST https://opencode.ai/zen/go/v1/chat/completions \
  -H "Authorization: Bearer $OPENCODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-pro","messages":[{"role":"user","content":"hi"}],"max_tokens":10,"stream":false}'
# -> HTTP 200, valid completion
Operating System

Windows 11

Terminal

Windows PowerShell 5.1

Additional context
  • Auth type: API key (OPENCODE_API_KEY), OpenCode Go plan.
  • The failure is not the same as #38765 ("deepseek giving up after a few seconds"): that issue describes the model starting then stopping mid-stream. Here the connection is dropped before any byte of response, every time, consistently. No partial output, no "thinking" state — just a silent hang until timeout.
  • Possibly related to #40460, but that issue lacks reproduction details and template compliance. This report provides server-side isolation evidence (flash vs pro on the same endpoint).
  • deepseek-v4-pro, glm-5.2, and gpt-5.6-luna on the same opencode-go provider all work, so this is not a blanket provider outage.
  • Suggested mitigation for affected users: switch agents off deepseek-v4-flash to deepseek-v4-pro or another available model on the same provider until the flash lane is restored.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.