Bug Description
hermes doctor reports Google Gemini API (invalid API key) — a false positive. The GOOGLE_API_KEY is valid and functional; only the healthcheck probe is broken.
Root Cause
The healthcheck probe for the gemini provider sends the API key as a Bearer token:
Authorization: Bearer <GOOGLE_API_KEY>
However, the Google Generative Language API /v1beta/models endpoint does not support Bearer token authentication — it only accepts the key as a ?key= query parameter.
Verified:
Bearer header → HTTP 401 Unauthorized
?key= query → HTTP 200 OK
Reproduction
- Have a valid
GOOGLE_API_KEY in ~/.hermes/.env
- Run
hermes doctor
- Observe:
✗ gemini (invalid API key)
Expected Behavior
The healthcheck should either:
- Use
?key=<GOOGLE_API_KEY> query parameter for Google endpoints, OR
- Skip the healthcheck for providers that don't support Bearer token auth (similar to how MiniMax China is handled with
supports_health_check=False)
Context
- Provider:
gemini (Google Generative Language API)
- Endpoint hit:
https://generativelanguage.googleapis.com/v1beta/models
- The key works perfectly for actual Gemini API calls — only the healthcheck fails
- Related code:
hermes_cli/doctor.py _build_apikey_providers_list() which dynamically pulls in the gemini plugin
Suggested Fix
In _build_apikey_providers_list() or the healthcheck loop, either:
- Special-case the
gemini provider to use ?key= query param, OR
- Add
supports_health_check=False to the gemini profile (like MiniMax China)
Bug Description
hermes doctorreportsGoogle Gemini API (invalid API key)— a false positive. TheGOOGLE_API_KEYis valid and functional; only the healthcheck probe is broken.Root Cause
The healthcheck probe for the
geminiprovider sends the API key as a Bearer token:However, the Google Generative Language API
/v1beta/modelsendpoint does not support Bearer token authentication — it only accepts the key as a?key=query parameter.Verified:
Reproduction
GOOGLE_API_KEYin~/.hermes/.envhermes doctor✗ gemini (invalid API key)Expected Behavior
The healthcheck should either:
?key=<GOOGLE_API_KEY>query parameter for Google endpoints, ORsupports_health_check=False)Context
gemini(Google Generative Language API)https://generativelanguage.googleapis.com/v1beta/modelshermes_cli/doctor.py_build_apikey_providers_list()which dynamically pulls in thegeminipluginSuggested Fix
In
_build_apikey_providers_list()or the healthcheck loop, either:geminiprovider to use?key=query param, ORsupports_health_check=Falseto thegeminiprofile (like MiniMax China)