Summary
hermes doctor reports the Google Gemini API key as invalid API key, but the same key successfully authenticates against the Gemini API directly.
What I verified
From this host:
GET https://generativelanguage.googleapis.com/v1beta/models?key=<API_KEY> returned HTTP 200
POST https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=<API_KEY> returned HTTP 200 and generated a valid response
GET /v1beta/models with Authorization: Bearer <API_KEY> returned HTTP 401, which suggests the doctor check is using the wrong auth style for this provider
Expected behavior
hermes doctor should validate Gemini API keys using the Gemini API's ?key= auth flow, or otherwise avoid reporting a false invalid-key error when the key is actually valid.
Actual behavior
hermes doctor prints a Gemini connectivity warning/invalid key message even though the Gemini API calls succeed.
Notes
- OpenAI/Codex remains the default provider; Gemini was configured only as an optional credential.
- This appears to be a false positive in the doctor connectivity check, not a billing issue.
Environment
- Hermes Agent on AWS Lightsail Ubuntu 24.04
hermes update completed successfully before this check
Reproduction steps
- Set
GEMINI_API_KEY in ~/.hermes/.env
- Run
hermes doctor
- Observe Gemini being flagged invalid
- Call the Gemini API directly with the same key and observe success
Summary
hermes doctorreports the Google Gemini API key asinvalid API key, but the same key successfully authenticates against the Gemini API directly.What I verified
From this host:
GET https://generativelanguage.googleapis.com/v1beta/models?key=<API_KEY>returned HTTP 200POST https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=<API_KEY>returned HTTP 200 and generated a valid responseGET /v1beta/modelswithAuthorization: Bearer <API_KEY>returned HTTP 401, which suggests the doctor check is using the wrong auth style for this providerExpected behavior
hermes doctorshould validate Gemini API keys using the Gemini API's?key=auth flow, or otherwise avoid reporting a false invalid-key error when the key is actually valid.Actual behavior
hermes doctorprints a Gemini connectivity warning/invalid key message even though the Gemini API calls succeed.Notes
Environment
hermes updatecompleted successfully before this checkReproduction steps
GEMINI_API_KEYin~/.hermes/.envhermes doctor