Skip to content

[BUG] OpenCode Go deepseek-v4-flash returns HTTP 500 while mimo-v2.5 works #40480

Closed as not planned

Description

@nonearth

Description

Description

deepseek-v4-flash on OpenCode Go does not return a response in the
OpenCode client. A direct API request eventually returns HTTP 500.

The same API key, endpoint, machine, and network work correctly with
mimo-v2.5, which returns HTTP 200.

Steps to reproduce

curl -sS --max-time 90 \
  -D - \
  https://opencode.ai/zen/go/v1/chat/completions \
  -H "Authorization: Bearer REDACTED" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [
      {
        "role": "user",
        "content": "Reply exactly with: OK"
      }
    ],
    "stream": false
  }'

Actual Result

HTTP/1.1 500 Internal Server Error

{"type":"error","error":{"type":"error","message":"Internal server error"}}

Control test

Changing only the model to mimo-v2.5 returns HTTP 200 and:

{"message":{"role":"assistant","content":"OK"}}

Request information

Model: deepseek-v4-flash
Endpoint: /zen/go/v1/chat/completions
Time: 2026-08-04 14:23:31 GMT
CF-RAY: a25e368a4a736814-SEA
Stream: false
Tools: none
OpenCode Go China-hosted model opt-in: enabled

Environment

OS: Debian Linux
Client: OpenCode Desktop
Network: Clash/Mihomo proxy
IPv4 connection and TLS handshake succeed
/zen/go/v1/models returns HTTP 200
mimo-v2.5 completion returns HTTP 200

Plugins

none

OpenCode version

1.18.13

Steps to reproduce

curl -sS --max-time 90 \
  -D - \
  https://opencode.ai/zen/go/v1/chat/completions \
  -H "Authorization: Bearer REDACTED" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [
      {
        "role": "user",
        "content": "Reply exactly with: OK"
      }
    ],
    "stream": false
  }'

Screenshot and/or share link

No response

Operating System

Debian Linux 13.5

Terminal

QTerminal

Activity

  1. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. adminplocket commented on Aug 4, 2026

    @adminplocket

    I confirm the issue

  3. ryanmargono commented on Aug 4, 2026

    @ryanmargono

    seeign the same issue

  4. GitHubrre commented on Aug 4, 2026

    @GitHubrre

    Same issue deepseek fail to connect right now

  5. tobioyelekan commented on Aug 4, 2026

    @tobioyelekan

    Experiencing same issue

  6. leirbag4 commented on Aug 4, 2026

    @leirbag4

    confirmed issue

  7. GitHubrre commented on Aug 4, 2026

    @GitHubrre

    This is a server-side issue with the opencode provider, not a configuration problem on your end. The model is being correctly selected but the API calls are failing.

  8. lordrebel commented on Aug 4, 2026

    @lordrebel

    Additional evidence from a user in UTC+8 (Beijing) — confirming this is a server-side routing issue, not client/config. Our instance hit the exact same failure window.

    Timeline (Beijing time = UTC+8):

    • ~22:00–23:30 Aug 4: deepseek-v4-flash via opencode-go consistently failing
    • Worst calls: two hung 25–27 minutes before completing/emptying (latency 1523.9s / 1646.4s)
    • Now recovered: 5/5 consecutive test calls return HTTP 200 in ~1.5s

    Observed error signature (from our gateway logs, all provider=opencode-go model=deepseek-v4-flash):

    • 42× Request timed out
    • 16× EmptyStreamError — HTTP 200 SSE but 0 bytes, hung 200–330s then returned empty stream with no finish_reason
    • 2× RemoteProtocolError, 2× APIConnectionError
    • GET /zen/go/v1/models also intermittently timed out during the window (while POST to other models worked)

    Key discriminator (matches #40465/#40485): same key, same endpoint, same machine — deepseek-v4-flash fails while deepseek-v4-pro, mimo-v2.5, minimax-m3 all return 200. Only the flash route is broken.

    Other notes for the post-mortem:

    Config/test details: opencode-go subscription key, POST https://opencode.ai/zen/go/v1/chat/completions. Happy to run more probes or paste sanitized logs if it helps the fix.


    Note: This comment was drafted with AI assistance and published with the user's authorization. (本评论由 AI 辅助撰写,经用户授权发布。)

  9. Enough1122 commented on Aug 8, 2026

    @Enough1122

    Following up — same symptom as reported here (HTTP failure on /zen/go/v1/chat/completions for deepseek-v4-flash, other models on the same key/endpoint still 200). Adding two new data points that I don't see in this thread yet:

    1. The 400 / 500 / "Model is unavailable" responses are transport-dependent (Anthropic vs OpenAI wire), not just server-side fluctuation.

    I ran both endpoints against the same Go subscription key, same account, same machine, seconds apart:

    Wire Endpoint Result
    OpenAI Chat Completions POST https://opencode.ai/zen/go/v1/chat/completions HTTP 400 Error from provider (Console Go): Upstream request failed: Model is unavailable.
    Anthropic Messages POST https://opencode.ai/zen/go/v1/messages HTTP 200 full chat completion, model: deepseek-v4-flash, stop_reason: max_tokens

    So the zen/go host is currently serving deepseek-v4-flash on the Anthropic wire (/v1/messages) but rejecting the same request on the OpenAI-compatible wire (/v1/chat/completions). That's not a hang or rate-limit — it's a per-wire routing-level failure on the host that Anomaly routes Flash through.

    2. The official OpenCode CLI gets it right because it doesn't use Console Go for this model.

    opencode.exe run -m opencode-go/deepseek-v4-flash "hi" returns a valid response immediately after the same chat_completions call returns 400. Internal logger:

    message=stream providerID=opencode-go modelID=deepseek-v4-flash llm.runtime=ai-sdk
    

    So the CLI's opencode-go provider is reaching DeepSeek through a different upstream path than the /zen/go/v1/chat/completions endpoint. The CLI path is the one that's currently healthy; the public HTTP chat_completions route is the one that's broken.

    Implication for downstream clients

    Third-party OpenAI-compatible callers (Hermes, custom scripts, CI bots, anything that hits the Go subscription via the documented chat/completions endpoint) are all blocked on the same wire, even though the model itself is up and the same account is happily serving via the CLI. Commenting here since this thread has the most concentrated community signal — same model, same endpoint, same failure window.

    Mirrors my earlier report at #41211 (opened Aug 8, now closing as duplicate of this thread). Happy to share sanitized curl/response diffs if useful.

  10. github-actions commented on Oct 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions