Skip to content

Zen: gpt-5.6-luna / gpt-5.6-terra fail with "Error from provider (Console): Upstream request failed" #39831

Closed

Description

Zen: gpt-5.6-luna / gpt-5.6-terra fail with "Error from provider (Console): Upstream request failed"

Description

Using Zen (opencode provider), gpt-5.6-luna and gpt-5.6-terra consistently fail with HTTP 403 Error from provider (Console): Upstream request failed, while gpt-5.4-nano, gemini-3.6-flash and claude-sonnet-5 work fine with the same API key. Both models are listed in GET https://opencode.ai/zen/v1/models, so access appears enabled. The error string matches #39293 (gemini-3.6-flash), suggesting the "Console" upstream is failing for these models.

Plugins

None

OpenCode version

1.18.9

Steps to reproduce

  1. curl -X POST "https://opencode.ai/zen/v1/responses" -H "Authorization: Bearer <ZEN_KEY>" -H "Content-Type: application/json" -d '{"model":"gpt-5.6-luna","input":"hi"}'
    → HTTP 403: {"model":"gpt-5.6-luna","error":{"param":null,"message":"Error from provider (Console): Upstream request failed"}}
  2. Same request with gpt-5.6-terra → same HTTP 403 error
  3. Same request with gpt-5.4-nano → HTTP 200, normal response

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. github-actions commented on Jul 31, 2026

    @github-actions
    Contributor

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

  2. ltceu6o5fu commented on Jul 31, 2026

    @ltceu6o5fu

    I am also experiencing the same issue. When making an API request using the curl command, the server returns an invalid_prompt error indicating an upstream request failure.

    To Reproduce
    Send a request to the API using curl.
    Target the gpt-5.6-luna model.
    Expected behavior
    The request should be processed successfully and return a valid response.

    Actual behavior
    The request(https://opencode.ai/zen/go/v1/responses) fails and returns the following JSON error message:

    {"model":"gpt-5.6-luna","error":{"code":"invalid_prompt","message":"Error from provider (Console Go): Upstream request failed"}}

  3. xxxxchaos commented on Aug 2, 2026

    @xxxxchaos

    Reproduced from a Hong Kong production server via the documented Zen API endpoint. Additional comparison details from #40162:

    • gpt-5.6-luna: HTTP 403
    • gpt-5.6-terra: HTTP 403
    • gpt-5.4-mini: HTTP 200 with the same Zen API key and host
    • claude-haiku-4-5: HTTP 200 with the same Zen API key and host
    • Both IPv4 and IPv6 reproduce the GPT-5.6 failure

    The more specific upstream error is:

    Error from provider (Console): Upstream request failed: [unsupported_country_region_territory] Country, region, or territory not supported
    

    This model-level comparison suggests the Zen credential and general connectivity are valid, and the failure is specific to the current GPT-5.6 upstream route rather than all Zen traffic from the host.

  4. 1138069580qq-create commented on Aug 7, 2026

    @1138069580qq-create

    Independent reproduction from a Windows 11 Go subscriber:

    • OpenCode Desktop 1.18.15: opencode-go/gpt-5.6-luna fails on a normal prompt with Upstream request failed: [403] This model is not available in your region.
    • OpenCode CLI 1.18.15: the same model and prompt reproduce the same 403, which rules out the Desktop UI layer.
    • Direct connectivity and an explicit local HTTP proxy both reproduce the error; changing the client egress does not change the result.
    • Grok works from the same Go subscription/workspace, so authentication and general Go connectivity are valid.
    • A separate Desktop local-backend CORS issue was fixed locally; the Luna 403 persisted and also reproduces in the CLI.

    This is consistent with a server-side upstream routing or forwarded geographic-header issue, rather than a local installation or proxy configuration problem. It also appears relevant to the still-open PR #40180.

    Could a maintainer confirm:

    1. whether this is an expected Go model availability restriction for affected accounts/regions;
    2. whether fix(zen): strip client IP/geo headers to prevent geoblock #40180 or an equivalent server-side change will be deployed; and
    3. whether the Go model catalog can hide models that will be rejected at invocation time?
  5. FractalMind commented on Aug 11, 2026

    @FractalMind

    user@myVPShost~$ opencode --version
    1.18.16
    user@myVPShost~:~$ opencode auth list

    ┌ Credentials ~/.local/share/opencode/auth.json
    │
    ● OpenCode Zen api
    │
    └ 1 credentials

    user@myVPShost~:~$ opencode run --model opencode/gpt-5.6-luna "Reply exactly: OK"

    build · gpt-5.6-luna

    Error: No provider available
    user@myVPShost~:~$ opencode run --model opencode/gpt-5.5 "Reply exactly: OK"

    build · gpt-5.5

    OK

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