You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Gemini engine fails with AWF proxy: GEMINI_API_BASE_URL points to proxy but proxy has no Gemini handler #25294
When using engine: gemini in a workflow, the run fails with exit code 41:
Please set an Auth method in your /home/runner/.gemini/settings.json or specify
one of the following environment variables before running: GEMINI_API_KEY,
GOOGLE_GENAI_USE_VERTEXAI, GOOGLE_GENAI_USE_GCA
The secret GEMINI_API_KEYis correctly configured as a repository secret
(visible as *** in the logs).
Root cause
The AWF infrastructure sets GEMINI_API_BASE_URL to http://host.docker.internal:10003
(the AWF API proxy), but the proxy reports no Gemini support:
[INFO] API proxy enabled: OpenAI=false, Anthropic=false, Copilot=false
[WARN] ⚠️ API proxy enabled but no API keys found in environment
The Gemini CLI receives GEMINI_API_BASE_URL pointing to a proxy that doesn't
understand the Gemini protocol. It then fails to authenticate, even though GEMINI_API_KEY is set in the environment.
v0.68.3 partially fixes this — proxy handles Gemini routing but doesn't inject the real key
After upgrading to v0.68.3 (which includes the fix from gh-aw-firewall#1944), the exit code 41 issue is resolved and the proxy now correctly reports Gemini=true:
[INFO] API proxy enabled: OpenAI=false, Anthropic=false, Copilot=false, Gemini=true
--gemini-api-target generativelanguage.googleapis.com
However, the run now fails with API_KEY_INVALID (exit code 144) instead:
_ApiError: {"error":{"code":400,"message":"API key not valid. Please pass a valid API key.",
"status":"INVALID_ARGUMENT","reason":"API_KEY_INVALID"}}
The GEMINI_API_KEY secret is confirmed valid — calling generativelanguage.googleapis.com directly with the key works fine. The issue appears to be that the placeholder GEMINI_API_KEY injected into the agent container (per the fix) is being forwarded to Google as-is, rather than being substituted with the real key by the proxy sidecar before the request leaves the sandbox.
So the fix resolved the routing half of the problem but the key injection half still isn't working.
Activity
fix: filter AWF infrastructure lines from engine failure context (#25294
lpcox commentedon Apr 8, 2026
🔗 AWF tracking issue: https://github.com/github/gh-aw-firewall/issues/github/gh-aw-firewall#1806
lpcox commentedon Apr 12, 2026
🔗 AWF tracking issue: https://github.com/github/gh-aw-firewall/issues/github/gh-aw-firewall#1931
dbrattli commentedon Apr 15, 2026
v0.68.3 partially fixes this — proxy handles Gemini routing but doesn't inject the real key
After upgrading to v0.68.3 (which includes the fix from gh-aw-firewall#1944), the exit code 41 issue is resolved and the proxy now correctly reports
Gemini=true:However, the run now fails with
API_KEY_INVALID(exit code 144) instead:The
GEMINI_API_KEYsecret is confirmed valid — callinggenerativelanguage.googleapis.comdirectly with the key works fine. The issue appears to be that the placeholderGEMINI_API_KEYinjected into the agent container (per the fix) is being forwarded to Google as-is, rather than being substituted with the real key by the proxy sidecar before the request leaves the sandbox.So the fix resolved the routing half of the problem but the key injection half still isn't working.
lpcox commentedon Apr 16, 2026
🔗 AWF tracking issue: https://github.com/github/gh-aw-firewall/issues/github/gh-aw-firewall#2009
lpcox commentedon Apr 16, 2026
Fixed in gh-aw-firewall by PR github/gh-aw-firewall#1995 (Gemini credential isolation) and #1944 (GEMINI_API_BASE_URL). Closing tracking issue github/gh-aw-firewall#2009.