Skip to content

[awf] api-proxy: GOOGLE_API_KEY invalid — Smoke Gemini runs failing with API_KEY_INVALID since 2026-04-29 #2288

Closed

Description

@lpcox

Problem

All Smoke Gemini workflow runs have been failing since at least 2026-04-29 00:21 UTC with HTTP 400 INVALID_ARGUMENT / API_KEY_INVALID from generativelanguage.googleapis.com. The agent makes zero LLM calls before terminating. This is a P0 blocker for all Gemini-based smoke tests.

HTTP 400 INVALID_ARGUMENT
reason: API_KEY_INVALID
service: generativelanguage.googleapis.com
message: "API key not valid. Please pass a valid API key."

Context

Root Cause

The GOOGLE_API_KEY repository secret in github/gh-aw is invalid (expired, deleted, or replaced with an incorrect value). The API proxy sidecar (containers/api-proxy/) injects this key for Gemini requests, but there is no startup health check for Gemini — the sidecar only validates ANTHROPIC_BASE_URL, OPENAI_BASE_URL, and COPILOT_API_URL on startup. The bad key is therefore not caught until the first real LLM call.

Proposed Solution

Immediate (Ops)

  1. Navigate to Settings → Secrets and variables → Actions in github/gh-aw
  2. Rotate/replace GOOGLE_API_KEY with a valid Gemini API key (project must have generativelanguage.googleapis.com enabled)
  3. Re-run a Smoke Gemini job to confirm recovery

Code Fix (Firewall)

Add a Gemini startup health check in the API proxy sidecar, analogous to the existing checks for OpenAI/Anthropic/Copilot. This prevents silent failures that only surface at first LLM call:

  • In containers/api-proxy/, add a GEMINI_API_KEY presence check during container startup (similar to how ANTHROPIC_API_KEY is validated before forwarding)
  • Emit a clear [WARN] GEMINI_API_KEY not set or empty log line at sidecar startup so the health check in docker-compose.yml can detect misconfiguration early

Success Criteria

  • Smoke Gemini run completes with conclusion: success
  • Firewall logs show generativelanguage.googleapis.com:443 receiving successful responses
  • Agent produces at least 1 LLM turn and valid safe output

Generated by Firewall Issue Dispatcher · ● 986.3K · ◷

Activity

  1. lpcox commented on Apr 29, 2026

    @lpcox
    CollaboratorAuthor

    Closing as duplicate of #2296. This is an operational credential issue — the GOOGLE_API_KEY secret needs to be rotated in the github/gh-aw repository settings. PR #2200 (startup key validation) and PR #2182 (Gemini auth param stripping) provide code-side mitigations already.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions