hermes - 💡(How to fix) Fix doctor should validate Gemini API keys with Gemini native auth instead of generic Bearer probe

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

A valid Gemini key can be reported as invalid/unauthorized because the health check uses the wrong auth shape.

Fix Action

Fix / Workaround

Local workaround tested

A local patch moved gemini out of the generic API-key provider list and added a Gemini native model-list probe. After this change, hermes doctor reported Gemini correctly with the same key.

Code Example

GET https://generativelanguage.googleapis.com/v1beta/models
x-goog-api-key: <key>
RAW_BUFFERClick to expand / collapse

Bug description

hermes doctor can misreport Gemini API keys as invalid if it checks Gemini through the generic OpenAI-compatible/Bearer connectivity path. Gemini AI Studio keys should be validated with Gemini's native API-key mechanism (x-goog-api-key or equivalent), not an OpenAI-style Bearer probe.

Steps to reproduce

  1. Configure a valid Gemini API key in GOOGLE_API_KEY / GEMINI_API_KEY.
  2. Run hermes doctor.
  3. Observe Gemini being handled like a generic API-key provider rather than a dedicated native provider.

Actual behavior

A valid Gemini key can be reported as invalid/unauthorized because the health check uses the wrong auth shape.

Expected behavior

doctor should treat Gemini as a dedicated provider and probe a Gemini native endpoint, for example:

GET https://generativelanguage.googleapis.com/v1beta/models
x-goog-api-key: <key>

A 200 response should mark Gemini API connectivity as OK; 400/401/403 should produce a targeted Gemini key diagnostic.

Local workaround tested

A local patch moved gemini out of the generic API-key provider list and added a Gemini native model-list probe. After this change, hermes doctor reported Gemini correctly with the same key.

Environment

  • Hermes checkout commit: 9f182bd7b
  • OS: Ubuntu 24.04 / Linux
  • Provider: Gemini API key mode

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

doctor should treat Gemini as a dedicated provider and probe a Gemini native endpoint, for example:

GET https://generativelanguage.googleapis.com/v1beta/models
x-goog-api-key: <key>

A 200 response should mark Gemini API connectivity as OK; 400/401/403 should produce a targeted Gemini key diagnostic.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING