You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Opus 4.7 doesn't work through Google Vertex AI #27063
Opus 4.7 is available in model selection in OpenCode but when using it - it always return 429. To be clear: we have it enabled in our organization and it's available through Claude Code (but requires CLOUD_ML_REGION=eu to be set, which OpenCode seems to ignore).
In our case variables are next (we use just models available in EU):
GOOGLE_APPLICATION_CREDENTIALS=/home/<redacted>/.config/gcloud/application_default_credentials.json
GOOGLE_CLOUD_PROJECT=<redacted>
VERTEX_LOCATION=europe-west1 # note that nothing changes if I set "eu" there
# Claude Code
export CLOUD_ML_REGION=eu
export CLAUDE_CODE_USE_VERTEX=1
export ANTHROPIC_VERTEX_PROJECT_ID=<redacted>
Open OpenCode, select Opus 4.6, everything works
Select Opus 4.7 - 429 is returned
If you select same model within Claude Code - everything is fine. So the problem is most probably on provider side.
The Opus 4.7 returning 429 with CLOUD_ML_REGION being ignored appears to be a distinct new issue, so that part is fine to keep here. You may want to split the 1M token concern into a separate comment on #14003 or #12338 rather than tracking it here.
The Opus 4.7 returning 429 with CLOUD_ML_REGION being ignored appears to be a distinct new issue, so that part is fine to keep here. You may want to split the 1M token concern into a separate comment on #14003 or #12338 rather than tracking it here.
I don't think they are really duplicates, since mine one is related specifically to Google Vertex AI provider 🤔
And at least in the company I'm working we have global region disabled due to policy/laws reasons. So... Even if global region has it - the problem that somehow EU ones doesn't get picked up as Claude Code pick it up.
P.S. PR you mentioned - seems to be fixing it (haven't run it, just checked the diff). At least looks more or less about it. 👀
Activity
github-actions commentedon May 12, 2026
This issue might be a duplicate (for the 1M token context window part) of existing issues. Please check:
The Opus 4.7 returning 429 with
CLOUD_ML_REGIONbeing ignored appears to be a distinct new issue, so that part is fine to keep here. You may want to split the 1M token concern into a separate comment on #14003 or #12338 rather than tracking it here.PowerSlime commentedon May 12, 2026
I don't think they are really duplicates, since mine one is related specifically to Google Vertex AI provider 🤔
rti commentedon May 21, 2026
I just got Opus 4.7 via Vertex to work from the "global" region in OpenCode 1.14.48.
{ "$schema": "https://opencode.ai/config.json", "enabled_providers": [ "google-vertex" ], "provider": { "google-vertex": { "whitelist": [ "claude-opus-4-7@default" ] } }I think #28347 is the fix for the issue we are facing
PowerSlime commentedon May 21, 2026
The only problem is that it's available in EU as well https://docs.cloud.google.com/vertex-ai/generative-ai/docs/partner-models/claude/opus-4-7.
And at least in the company I'm working we have global region disabled due to policy/laws reasons. So... Even if global region has it - the problem that somehow EU ones doesn't get picked up as Claude Code pick it up.
P.S. PR you mentioned - seems to be fixing it (haven't run it, just checked the diff). At least looks more or less about it. 👀
rti commentedon May 21, 2026
See my comment in the PR #28347 (comment) for a workaround
miguelmanlyx commentedon May 21, 2026
Might be rate-limit errors from Gemini.
npx ai-doctorcan help check missing Retry-After handling and unsafe retry logic.rekram1-node commentedon May 22, 2026
this should be fixed in next release, will look at the 1M context separately