[BUG] [Google Vertex] Opus 4.6 model name is not valid for the count_tokens API in Google Vertex
Resolved 💬 2 comments Opened Feb 9, 2026 by andreweskeclarke Closed Feb 10, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code sends an incompatible model ID to Google Vertex's count-tokens API for Opus 4.6, causing a 400 error.
The model name needs to be claude-opus-4-6 (which does NOT match old Vertex naming schemes), but Claude code sends claude-opus-4-6@default (which does match old Vertex naming schemes).
I know this is more a problem with Vertex, but thought I'd raise here as well.
What Should Happen?
Claude Code should use model names that work with Google Vertex.
Error Messages/Logs
Steps to Reproduce
TOKEN=$(gcloud auth print-access-token)
BASE="https://MY_REGION-aiplatform.googleapis.com/v1/projects/MY_PROJECT/locations/MY_REGION/publishers/anthropic/models"
# Works: model with date tag
curl -s "$BASE/count-tokens:rawPredict" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"claude-opus-4-5@20251101","messages":[{"role":"user","content":"hello"}]}'
# => {"input_tokens":8}
# Works: model without any tag
curl -s "$BASE/count-tokens:rawPredict" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"claude-opus-4-6","messages":[{"role":"user","content":"hello"}]}'
# => {"input_tokens":8}
# FAILS: model with @default tag
curl -s "$BASE/count-tokens:rawPredict" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"claude-opus-4-6@default","messages":[{"role":"user","content":"hello"}]}'
# => 400 "claude-opus-4-6@default is not supported"
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.37
Platform
Google Vertex AI
Operating System
Other Linux
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗