Skip to content

bug(vertex): API-key requests ignore project/location and fail for Gemini 4 Argon #7265

Closed

Description

@andrew05060414

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

  1. Configure google-vertex as shown below, with a valid Vertex API key and project.
  2. Request google-vertex/gemini-4-argon through /v1/responses, with input Reply with exactly OK. and streaming enabled.
  3. Observe HTTP 404 referring to locations/us-central1, despite location: "global".
  4. Send the equivalent request directly to https://aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/global/publishers/google/models/gemini-4-argon:generateContent, authenticating with x-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

  1. added
    bug
    provider
    on Oct 17, 2026
  2. lidge-jun commented on Oct 17, 2026

    @lidge-jun
    Owner

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugprovider

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions