#hermes API call failed, debug share

1 messages · Page 1 of 1 (latest)

lime yarrow
#

I am trying to talk to my agent but I'm getting an error msg. hermes debug share
────────────────────────────────────────

⚠️ API call failed (attempt 1/3): GeminiAPIError [HTTP 400]
🔌 Provider: gemini Model: gemini-flash-lite-latest
🌐 Endpoint: https://generativelanguage.googleapis.com/v1beta
📝 Error: HTTP 400 — Error 400 (Bad Request)!!1
⚠️ Non-retryable error (HTTP 400) — trying fallback...
❌ Non-retryable error (HTTP 400): HTTP 400 — Error 400 (Bad Request)!!1
❌ Non-retryable client error (HTTP 400). Aborting.
🔌 Provider: gemini Model: gemini-flash-lite-latest
🌐 Endpoint: https://generativelanguage.googleapis.com/v1beta
💡 This type of error won't be fixed by retrying.
─ ⚕ Hermes ─────────────────────────────────────────────────────────────────────────────────

 Error: Gemini returned HTTP 400: <html><title>Error 400 (Bad                               
 Request)!!1</title></html>                                                                 

──────────────────────────────────────────────────────────────────────────────────────────────
⚕ gemini-flash-lite-latest │ 0/1M │ [░░░░░░░░░░] 0% │ 3m │ ⏲ 0s
────────────────────────────────────────────────────────────────── what do I need to do, to fix this error, please?

sand aspen
#

That paste is the on-screen API error, not the debug share output we need.

A Gemini HTTP 400 is too generic by itself. It can be a bad model name, a malformed request, a tool/schema issue, or something in the current config/session. Please run this in the terminal, not inside the Hermes chat:

hermes debug share --lines 1000

Then paste the three links it prints, usually:

Report:
agent.log:
gateway.log:

Those logs should give us the model, provider route, config state, and surrounding error context so we can narrow down the cause.

lime yarrow
#

I didnt get a gateway.log

sand aspen
#

The key is detected, but that only means Hermes found a value in ~/.hermes/.env. It does not prove the Google project/key can actually call the selected Gemini model.

Let’s verify the Google key directly and, if needed, replace it with one from a project that has access to the model you want.

In Google AI Studio, create or select an API key here:

https://aistudio.google.com/apikey

Make sure it is from the Google project you want to use. Free-tier and billing-enabled projects can have different model access and quota behavior, depending on the model, so the important thing is that the selected project/key can call the exact model you configured.

Then update the key in Hermes from the terminal:

hermes config set GOOGLE_API_KEY your_new_key_here

Now test Gemini through Hermes with a fresh session:

hermes config set model.provider gemini
hermes config set model.default gemini-flash-lite-latest
hermes

Send only:

hello

If that still returns HTTP 400, test the key directly against Google from the terminal:

( set -a; source ~/.hermes/.env; set +a; curl -sS -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-flash-lite-latest:generateContent?key=${GOOGLE_API_KEY:-$GEMINI_API_KEY}" -H "Content-Type: application/json" -d '{"contents":[{"role":"user","parts":[{"text":"hello"}]}],"generationConfig":{"maxOutputTokens":32}}' )

If the direct curl also fails, fix the key/project/model access in Google AI Studio or Google Cloud. If the curl works but Hermes still fails, send a fresh hermes debug share --lines 1000 from right after the failed Hermes test.

lime yarrow
#

Ok, thx.

I will try your suggestions, and report my results.

lime yarrow
#

Set GOOGLE_API_KEY in /home/prem/.hermes/.env
prem@prem-MacBookPro11-3:~/Desktop$ hermes config set model.provider gemini
✓ Set model.provider = gemini in /home/prem/.hermes/config.yaml
prem@prem-MacBookPro11-3:~/Desktop$ hermes config set model.default gemini-flash-lite-latest
✓ Set model.default = gemini-flash-lite-latest in /home/prem/.hermes/config.yaml
prem@prem-MacBookPro11-3:~/Desktop$ hermes

hello
Initializing agent...

────────────────────────────────────────
⚠️ API call failed (attempt 1/3): NotFoundError [HTTP 404]
🔌 Provider: gemini Model: gemini-flash-lite-latest
🌐 Endpoint: http://127.0.0.1:11434/v1
📝 Error: HTTP 404: model 'gemini-flash-lite-latest' not found
📋 Details: {'message': "model 'gemini-flash-lite-latest' not found", 'type': 'not_found_error', 'param': None, 'code': None}
⏳ Retrying in 2.6s (attempt 1/3)...
I'm getting 404 error now.

sand aspen
#

your endpoint is pointing at local now.

#

not the gemini provider

#

please read the instructions carefully

#

you can also use hermes model to go through the menu

#

These are terminal commands and need to be sent in the terminal, not into chat inside hermes. outside of hermes

lime yarrow
# sand aspen please read the instructions carefully

I'm reading them carefully, understanding them is another thing, lol. that part. I'm guessing, about half the time, because a lot of this stuff is going over my head to be honest, so I humbly request your patience. I created the key, on the free tier, I didn't see any option to select the model.

#

→ (●) Google AI Studio (Gemini models — native Gemini API) ← currently active
I ran hermes model, and its saying gemini model is active.

sand aspen
#

Got it. That means the picker now says Gemini is active, but we still need the actual test results.

Please do these in this exact order from your normal terminal, outside of Hermes.

First run:

hermes status

Then start a brand new Hermes session:

hermes

Send only:

hello

If hello fails, exit Hermes and immediately run:

hermes debug share --lines 1000

Then paste the debug share links it prints. Please do not only paste the on-screen error from inside Hermes again; that visible error is not enough to diagnose the active config/log state.

Then run the direct Google key test from your normal terminal:

( set -a; source ~/.hermes/.env; set +a; curl -sS -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-flash-lite-latest:generateContent?key=${GOOGLE_API_KEY:-$GEMINI_API_KEY}" -H "Content-Type: application/json" -d '{"contents":[{"role":"user","parts":[{"text":"hello"}]}],"generationConfig":{"maxOutputTokens":32}}' )

Paste the output from that curl command too.

After that we can tell which case this is: Hermes works now, Google rejects the key/model directly, or Hermes is still routing/configuring the request incorrectly.

lime yarrow
#

prem@prem-MacBookPro11-3:~$ ( set -a; source ~/.hermes/.env; set +a; curl -sS -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-flash-lite-latest:generateContent?key=${GOOGLE_API_KEY:-$GEMINI_API_KEY}" -H "Content-Type: application/json" -d '{"contents":[{"role":"user","parts":[{"text":"hello"}]}],"generationConfig":{"maxOutputTokens":32}}' )
{
"candidates": [
{
"content": {
"parts": [
{
"text": "Hello! How can I help you today?",
"thoughtSignature": "EjQKMgEMOdbHztdBr5l4XrM32o+vBzwRL5bivztyKeeDbD4E4z4PsUuXhRg8YnXbtfwtrW+x"
}
],
"role": "model"
},
"finishReason": "STOP",
"index": 0
}
],
"usageMetadata": {
"promptTokenCount": 2,
"candidatesTokenCount": 9,
"totalTokenCount": 11,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 2
}
],
"serviceTier": "standard"
},
"modelVersion": "gemini-3.1-flash-lite",
"responseId": "1gsBau3KLI-Gz7IPpLvZiQc"
}

sand aspen
#

Your Google key works. The curl proved that.

The problem is this line from Hermes logs:

provider=gemini base_url=http://127.0.0.1:11434/v1 model=gemini-flash-lite-latest

That URL is wrong for Gemini. 127.0.0.1:11434 is your local Ollama endpoint.

Gemini should be using:

https://generativelanguage.googleapis.com/v1beta

Please do this from your normal terminal, outside of Hermes.

First exit Hermes if it is open:

/exit

Then paste these commands:

hermes config set model.provider gemini
hermes config set model.default gemini-flash-lite-latest
hermes config set model.base_url https://generativelanguage.googleapis.com/v1beta

Then check whether localhost is still saved anywhere:

grep -n "127.0.0.1:11434\|localhost:11434" ~/.hermes/config.yaml ~/.hermes/.env

If that grep prints any lines, replace that localhost URL with:

https://generativelanguage.googleapis.com/v1beta

Then start Hermes again:

hermes

Send only:

hello

If it still fails, paste the new error, especially the Endpoint: line.

lime yarrow
#

ok, I think its working now. I typed hello, and it responded. thanks, so much, for all the help.🙏 🙂