anomalyco / anomalyco/opencode
gpt-5.6-luna returns empty response / 403 error with OpenCode Go API
@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.
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:
gpt-5.6-lunastreaming route is correctly configured;- the upstream adapter supports streaming responses;
- the response conversion layer is handling Luna responses correctly.
Thanks.
Plugins
None
OpenCode version
Node
Steps to reproduce
- config Opencode go API.
- use claude code cli ask.
Screenshot and/or share link
Operating System
Windows 10
Terminal
2.1.220 (Claude Code)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.