1.9 KiB
Ollama "Provider Authentication Error" Fix
Symptom
After configuring a local provider (Ollama, vLLM, etc.), the agent reports "Provider authentication failed" on the next request. Gateway logs show: Unknown provider 'custom:<name>'.
Root Cause
Wrong provider name. The Hermes custom endpoint provider is registered as custom (bare), not custom:ollama, custom:vllm, or any custom:<name> variant. The suffix format is not recognized — custom:ollama and openai are both rejected as unknown providers.
Secondary cause: hermes config set for model.* keys can silently fail to persist (reports "✓ Set" but file shows old values). Always verify with grep -A5 '^model:' ~/.hermes/config.yaml.
Fix
-
Set the provider to
custom(no suffix):hermes config set model.provider custom hermes config set model.base_url http://localhost:11434/v1 hermes config set model.api_key ollama hermes config set model.default qwen2.5:14b -
Verify the file:
grep -A6 '^model:' ~/.hermes/config.yamlMust show
provider: custom. -
Test the Ollama API directly:
curl -s http://localhost:11434/v1/chat/completions -H "Content-Type: application/json" \ -d '{"model":"qwen2.5:14b","messages":[{"role":"user","content":"hi"}],"stream":false}' -
Restart gateway (from OUTSIDE the gateway process — cannot restart from within):
hermes gateway restart
Notes
- The provider
customis a reserved Hermes provider that readsmodel.base_urlandmodel.api_keydirectly. It usestransport="openai_chat"(OpenAI-compatible API). - If you set
customand still get the error, check withgrep— theconfig setmay have silently failed. Re-run the commands. - Gateway restart must be done from a separate shell (SSH, desktop terminal) — not from within a gateway session.