anomalyco / anomalyco/opencode

gpt-5.6-luna returns empty response / 403 error with OpenCode Go API

Open
#43,565 1 comment 0 reactions 1 assignee View on GitHub

@fwang is already working on this.

Since Aug 20, 2026.

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

Description

Description

Environment

  • Subscription: OpenCode Go
  • Client: Claude Code CLI
  • Endpoint:

[https://opencode.ai/zen/go/v1](https://opencode.ai/zen/go/v1)

  • Model:

gpt-5.6-luna

  • Tool Version:
 claude --version
2.1.220 (Claude Code)

Problem

gpt-5.6-luna is visible from the OpenCode Go model list, but inference requests fail.

Other models (for example deepseek-v4-pro) work correctly with the same API key and endpoint.

Image

Model availability check

GET /models returns:

{
  "id": "gpt-5.6-luna",
  "object": "model",
  "owned_by": "opencode"
}

So the model appears to be enabled for my Go subscription.

Reproduction 1: OpenAI compatible API (stream=false)

Request:

curl https://opencode.ai/zen/go/v1/chat/completions \
-H "Authorization: Bearer $GO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "gpt-5.6-luna",
  "messages": [
    {
      "role": "user",
      "content": "hello"
    }
  ]
}'

Response:

HTTP 200

{
  "id": "chatcmpl_xxx",
  "object": "chat.completion",
  "model": "gpt-5.6-luna",
  "choices": [
    {
      "message": {
        "role": "assistant"
      },
      "finish_reason": null
    }
  ]
}

The response is successful, but the assistant content is empty.

Expected:

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

Reproduction 2: OpenAI compatible API (stream=true)

Request:

curl -i https://opencode.ai/zen/go/v1/chat/completions \
-H "Authorization: Bearer $GO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "model": "gpt-5.6-luna",
  "messages": [
    {
      "role": "user",
      "content": "hello"
    }
  ],
  "stream": true
}'

Response:

HTTP/2 403
content-type: application/json

Reproduction 3: Anthropic Messages API

Since Claude Code CLI uses the Anthropic Messages API, I also tested:

curl -i https://opencode.ai/zen/go/v1/messages \
-H "x-api-key: $GO_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
  "model": "gpt-5.6-luna",
  "max_tokens": 100,
  "messages": [
    {
      "role": "user",
      "content": "hello"
    }
  ]
}'

Response:

HTTP/2 403

Body:

{
  "id": "chatcmpl_xxx",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": ""
    }
  ],
  "model": "gpt-5.6-luna",
  "stop_reason": null
}

The HTTP status is 403, but the response body looks like a valid message response with empty content.


Control test

The same endpoint and API key works with:

deepseek-v4-pro

Example:

stream=true
HTTP/2 200
content-type: text/event-stream

Streaming chunks are returned normally.


Impact

Claude Code CLI requires streaming responses, therefore gpt-5.6-luna cannot currently be used through OpenCode Go.

Could you please check whether:

  1. gpt-5.6-luna streaming route is correctly configured;
  2. the upstream adapter supports streaming responses;
  3. the response conversion layer is handling Luna responses correctly.

Thanks.

Plugins

None

OpenCode version

Node

Steps to reproduce
  1. config Opencode go API.
  2. use claude code cli ask.
Screenshot and/or share link
Image
Operating System

Windows 10

Terminal

2.1.220 (Claude Code)

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.