Repository navigation
Description
Client or integration
Codex App
Area
Provider adapter
Summary
Vertex 使用 API Key 时忽略配置的项目和 global 区域,导致 Gemini 4 Argon 返回 404。同一把 Key 直接请求项目级 global 端点可以成功。
The Vertex adapter unconditionally chooses the projectless express-mode URL whenever an API key is available. This bypasses configured project and location. In the reproduced environment, the express endpoint selects us-central1, where gemini-4-argon is unavailable. Explicit project/global inference succeeds with the same key.
Reproduction
- Configure
google-vertexas shown below, with a valid Vertex API key and project. - Request
google-vertex/gemini-4-argonthrough/v1/responses, with inputReply with exactly OK.and streaming enabled. - Observe HTTP 404 referring to
locations/us-central1, despitelocation: "global". - Send the equivalent request directly to
https://aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/global/publishers/google/models/gemini-4-argon:generateContent, authenticating withx-goog-api-key: HTTP 200,OK.
Expected: honor an explicit project/location for API-key authentication. Preserve projectless express mode when no project is configured. ADC behavior should remain unchanged.
Version
2.86.0 and 2.87.0; the same branch is present on dev at 2a10a2bc450067e3b475315ffeaefc4bb5b52ab4.
Operating system
Windows 11 Pro for Workstations, 10.0.26300
Provider and model
google-vertex / gemini-4-argon
Logs or error output
HTTP 404: Publisher model projects/PROJECT_ID/locations/us-central1/publishers/google/models/gemini-4-argon was not found or your project does not have access to it.
Screenshots and supporting files
No screenshots are needed. A local transport-only patch changes the same /v1/responses streaming request from HTTP 404 to HTTP 200 with response.completed; chat streaming and a forced function call also succeed. An upgrade from 2.86.0 to 2.87.0 overwrote that local patch and reproduced the error.
Google documents global, us, and eu for Argon: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/start/get-started-with-gemini-4
Redacted configuration
{
"providers": {
"google-vertex": {
"adapter": "google",
"baseUrl": "https://aiplatform.googleapis.com",
"googleMode": "vertex",
"apiKey": "<REDACTED>",
"project": "PROJECT_ID",
"location": "global",
"defaultModel": "gemini-4-argon",
"models": ["gemini-4-argon"],
"liveModels": false
}
}
}Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
lidge-jun commentedon Oct 17, 2026
Fixed on dev by #7266 (merge commit 5f6a629): API-key Vertex requests now honor provider.project/location, and the projectless express endpoint is kept when no project is configured.