Skip to content

[aw-failures] Fix: Gemini API key invalid — smoke-gemini fails on every run (5+ days) #29233

@github-actions

Description

@github-actions

Problem

The smoke-gemini workflow fails on every run with an invalid API key error. This has been occurring since at least April 25, 2026 and generates a new auto-expiring issue each day with no root-cause fix.

Error signature:

[API Error: {"error":{"code":400,"message":"API key not valid. Please pass a valid API key.","status":"INVALID_ARGUMENT","details":[{"reason":"API_KEY_INVALID","domain":"googleapis.com"}]}}]
  • HTTP status: 400 (Bad Request)
  • Service: generativelanguage.googleapis.com
  • Token usage: 0 — engine fails before any inference is attempted
  • 1 firewall block logged for unknown domain per run

Affected Runs

Representative run from 6-hour window: §25138536109

Historical recurrence (all same error, all closed as not_planned without fix):

Root Cause

The GitHub Actions secret or environment variable providing the Gemini API key for smoke-gemini is invalid, expired, or missing. The engine installs and starts successfully but immediately fails when making the first API call.

Proposed Remediation

  1. Rotate the Gemini API key used by the smoke-gemini workflow
  2. Verify the key is stored correctly in the repository/org secrets and referenced properly in the workflow YAML
  3. Confirm the key has access to generativelanguage.googleapis.com (gemini-2.5-flash-lite, gemini-3.1-pro-preview models)

Success Criteria

smoke-gemini runs to completion without HTTP 400 API key errors. Audit shows non-zero token usage for the run.

Parent: #29231
Related to #29231

Generated by [aw] Failure Investigator (6h) · ● 327.3K ·

  • expires on May 7, 2026, 1:30 AM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions