Skip to content

ZEN gemini-3.6-flash returns "Upstream request failed" while gemini-3.5-flash works #39293

Description

@gozimi

Description

gemini-3.6-flash consistently returns an upstream error, while gemini-3.5-flash works with the exact same request.

Plugins

No response

OpenCode version

No response

Steps to reproduce

Request

curl -X POST \
  "https://opencode.ai/zen/v1/models/gemini-3.6-flash:generateContent" \
  -H "x-goog-api-key: <ZEN_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "parts": [
          {
            "text": "Hello!"
          }
        ]
      }
    ]
  }'

**Result**
{
  "error": {
    "code": 400,
    "message": "Error from provider (Console): Upstream request failed",
    "status": "INVALID_ARGUMENT"
  }
}

**Expected**
The request should succeed and return a normal Gemini response.

**Additional information**
GET /v1/models includes gemini-3.6-flash.
Replacing the model with gemini-3.5-flash (same endpoint, same API key, same payload) works correctly.
Calling the official Google Gemini API directly with gemini-3.6-flash and the same payload also works.

### Screenshot and/or share link

_No response_

### Operating System

_No response_

### Terminal

_No response_

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