anomalyco / anomalyco/opencode
ZEN gemini-3.6-flash returns "Upstream request failed" while gemini-3.5-flash works
Open
@StarpTech is already working on this.
Since Jul 28, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
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_
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.