GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — zen/go: Gemini 4 Argon returns upstream 403 "Request rejected in accordance with our terms of use and policies" · Issue #64557 · anomalyco/opencode

zen/go: Gemini 4 Argon returns upstream 403 "Request rejected in accordance with our terms of use and policies" #64557

New issue
Copy link
New issue
Copy link
Closed
#64910
Closed
zen/go: Gemini 4 Argon returns upstream 403 "Request rejected in accordance with our terms of use and policies"#64557
#64910
Copy link
Labels
area/providersProviders and model listsinference/goOpenCode Goplatform/macosmacOSstatus/repro-simulatedReproduced with a simulated model or mocktype/bugSomething is brokenversion/v2OpenCode 2.x

Description

@tomrannosaurus
tomrannosaurus
opened on Nov 18, 2026
Issue body actions

Summary

Requests to Gemini 4 Argon via the OpenCode Go subscription (opencode.ai/zen/go/...
route) fail with an upstream 403 policy rejection, even for trivial prompts ("test").
Other models on the same subscription (e.g. GLM-5.3) work minutes later, so client auth
and billing are fine. The rejection comes from the Google upstream behind the relay.
The error is also mislabeled in the UI as an "Authentication error".

Environment

  • opencode version: v2.3.0
  • OS: macOS 15 (Darwin 24.6.0, arm64)
  • Terminal: iTerm.app (xterm-256color, truecolor)
  • Shell: /bin/bash
  • Install/channel: latest stable desktop app (v2.3.0, /Applications/OpenCode.app)
  • Active plugins: none

Reproduction

  1. In the desktop app, select opencode-go/gemini-4-argon (OpenCode Go subscription).
  2. Send a trivial prompt, e.g. test.
  3. Request fails immediately; two consecutive attempts failed at
    2026-11-17 ~19:11 ET (2026-11-18 00:11 UTC).

Expected Behavior

The prompt completes. If the upstream provider rejects it on policy grounds, the error
is surfaced as a provider policy rejection, not as an "Authentication error".

Actual Behavior

Verbatim error shown in the chat UI (twice):

Authentication error: Authentication failed for https://opencode.ai/zen/go/v1/chat/completions.
Status: 403 Forbidden. Response: Upstream request failed: [403] Request rejected in
accordance with our terms of use and policies.

Additional Context

  • The upstream message is Google Gemini's verbatim policy-block message. It is currently
    reported widely as false positives against coding-agent traffic, including trivial
    prompts, paid accounts, and third-party apps/relays:
    • https://discuss.ai.google.dev/t/antigravity-403-permission-denied-tos-false-positive-request-for-manual-review/196053
    • https://discuss.ai.google.dev/t/gemini-4-carbon-and-argon-403-policy-rejection-on-vertex-ai/199768
    • https://discuss.ai.google.dev/t/197895 (Gemini 4 Argon 403, same key works in AI Studio)
  • opencode service status reports a healthy server (http://127.0.0.1:49374). The
    server log shows no stream error entries at the failure timestamp, so the failure
    surfaced client-side only.
  • Workaround: switching to another model on the same subscription (e.g. GLM-5.3) works.
  • Possible asks: (1) check whether the Zen relay's Google upstream project is being
    ToS-flagged, (2) consider routing/fallback, (3) consider distinguishing upstream
    policy 403s from auth errors in the UI.

Activity

  1. opencodejr
    added
    area/providersProviders and model lists
    inference/goOpenCode Go
    platform/macosmacOS
    type/bugSomething is broken
    version/v2OpenCode 2.x
    on Nov 18, 2026
  2. opencodejr commented on Nov 18, 2026

    @opencodejr
    opencodejrBot
    on Nov 18, 2026
    Contributor
    More actions

    Seen with a simulated model or a mock server, not a real provider; a maintainer should confirm.

    Thanks for the detailed report. I reproduced the mislabelling part with a mock server standing in for the Go gateway's 403 response, which you gave in the report.

    What I did: on opencode v2.3.0, I pointed a custom OpenAI-compatible provider at a local server. The server answers every request with HTTP 403 and the body Upstream request failed: [403] Request rejected in accordance with our terms of use and policies., then I ran opencode run --format json with the prompt test. The error comes back as "type":"provider.auth" (an authentication failure), not as a provider policy refusal. It still happens on the latest dev (de291ab). The script below reproduces it.

    Not covered: I could not check the upstream refusal of Gemini 4 Argon itself. It happens in the hosted Go service and needs a real Go account to see. I also didn't run the desktop app, so the "Authentication error" label it shows is as you described it.

    Related:

    • opencode-go: gemini-4-argon returns 403 Endpoint is unavailable, other Go models work #61845 and Go plan: gemini-4-argon returns 403 "Endpoint is unavailable" while other Go models return 200 #61873: earlier 403s on opencode-go/gemini-4-argon while other Go models worked. The message there was Endpoint is unavailable.
    • provider: quota limit surfaced as "not valid JSON" / Authentication instead of the real message #50352: another Go error shown as an Authentication error, in that case a usage limit.
    Reproduction script (repro.sh)
    #!/usr/bin/env bash
    # Reproduces #64557: an upstream 403 policy refusal is classified as provider.auth.
    # Needs bun and @opencode/cli (bun add -g @opencode/[email protected]).
    set -euo pipefail
    dir=$(mktemp -d); cd "$dir"
    cat > mock.ts <<'TS'
    const body = JSON.stringify({ error: { type: "server_error", message: "Upstream request failed: [403] Request rejected in accordance with our terms of use and policies." } })
    Bun.serve({ port: 4599, fetch: () => new Response(body, { status: 403, headers: { "content-type": "application/json" } }) })
    TS
    bun mock.ts & mock=$!; trap 'kill $mock' EXIT; sleep 1
    mkdir proj && cd proj && git init -q
    cat > opencode.jsonc <<'JSON'
    {
      "providers": {
        "mockgo": {
          "name": "Mock Go",
          "env": ["MOCKGO_API_KEY"],
          "package": "@opencode/ai/providers/openai-compatible",
          "settings": { "baseURL": "http://127.0.0.1:4599/zen/go/v1" },
          "models": { "gemini-4-argon": { "name": "Gemini 4 Argon" } }
        }
      }
    }
    JSON
    opencode --version
    MOCKGO_API_KEY=sk-test opencode run --format json --model mockgo/gemini-4-argon "test" | grep '"type":"error"'
    # Expected: an error type other than provider.auth (e.g. a content-policy error). Actual: "type":"provider.auth".

    Run it: bash repro.sh

    Reacted by tomrannosaurus
  3. opencodejr
    added
    status/repro-simulatedReproduced with a simulated model or mock
    on Nov 18, 2026
  4. neriousy
    closed this as completedin #64910on Nov 19, 2026
  5. neriousy commented on Nov 19, 2026

    @neriousy
    neriousy
    on Nov 19, 2026
    Member
    More actions

    Thanks for the detailed report and the links, they helped a lot.

    The 403 itself came from Google, not from OpenCode. For short stretches, Google flagged one of the Vertex endpoints behind Gemini 4 Argon and rejected every request on it, whatever the prompt. Your failures at 00:11 UTC on Nov 18 fall in one of those stretches. Most of the time the gateway retried on another route and users didn't notice; yours hit a stretch where no other route was available. The refusals have stopped since, and Argon on Go is working normally again.

    The "Authentication error" label was our bug. We treated every 403 as an auth failure unless it matched a known content-policy message, and Google's wording wasn't on that list. That's fixed in #64910: these refusals are now reported as a provider policy rejection instead of an authentication failure. It will ship in the next release.

    If you see this again on a recent version, please open a new issue with the timestamp.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/providersProviders and model listsinference/goOpenCode Goplatform/macosmacOSstatus/repro-simulatedReproduced with a simulated model or mocktype/bugSomething is brokenversion/v2OpenCode 2.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.