anomalyco / anomalyco/opencode

Zen: claude-opus-5 intermittently returns 503 "Endpoint is unavailable" while sonnet-5 succeeds

Open
#44,701 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

OpenCode Zen Anthropic messages endpoint intermittently returns HTTP 503 for claude-opus-5. During the same test window, claude-sonnet-5 succeeds using the same API key, endpoint, network, and request shape.

The failure reproduces with raw curl directly against Zen, without Claude Code or a local proxy, so it appears to be on the Zen to upstream route.

Observed response:

HTTP/2 503
{"type":"error","error":{"type":"api_error","message":"Error from provider (Console): Upstream request failed: Endpoint is unavailable."}}

Observed at: 2026-08-24 12:11:20 UTC
Cloudflare ray: a302424c48a30c1e-BOS

The behavior is intermittent: some Opus requests previously returned 200 among repeated 503 responses, but subsequent native OpenCode and Claude Code Opus requests remained in retry backoff for at least two minutes.

This is related to, but distinct from, #35124: the 503 here also occurs without a thinking parameter.

Plugins

None. Reproduced with opencode run --pure and raw curl.

OpenCode version

1.4.6

Steps to reproduce

export KEY="REDACTED_ZEN_API_KEY"

curl -i -X POST https://opencode.ai/zen/v1/messages \
  -H "x-api-key: $KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d "{\"model\":\"claude-opus-5\",\"max_tokens\":16,\"messages\":[{\"role\":\"user\",\"content\":\"Reply with exactly OK\"}]}"

Result: HTTP 503 with Endpoint is unavailable.

Repeat with only the model changed to claude-sonnet-5; Sonnet returns HTTP 200.

Additional isolation performed:

  • Opus fails with and without adaptive thinking.
  • Opus fails with and without the context-1m-2025-08-07 beta.
  • Direct Zen and local-proxy requests exhibit the same failure.
  • Claude Code and native OpenCode both succeed with Sonnet 5.
  • Native OpenCode and Claude Code both remain in retry backoff with Opus 5.

Screenshot and/or share link

Not applicable; raw HTTP reproduction is included above.

Operating System

macOS 14.1.2 (23B92)

Terminal

VS Code integrated terminal

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.

Research direction

Start by repeating the raw curl request in the issue against the Zen messages endpoint, comparing claude-opus-5 with claude-sonnet-5 and the listed request variations. No repository file or test is identified; done would require determining the cause of the intermittent Opus 503 and confirming that the affected requests no longer return Endpoint is unavailable.

Written by the indexing model from the issue text.

Assessment

Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.