hermes - 💡(How to fix) Fix [Bug]: Openrouter - API call failed: AuthenticationError [HTTP 401] [1 participants]

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…
GitHub stats
NousResearch/hermes-agent#14637Fetched 2026-04-24 06:15:48
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

When I try to chat in "hermes" application. I am getting following error - 📝 Error: HTTP 401: User not found. ⚠️ Non-retryable error (HTTP 401) — trying fallback... ❌ Non-retryable error (HTTP 401): HTTP 401: User not found. ❌ Non-retryable client error (HTTP 401). Aborting. I tried to use multiple models from openrouter but I am getting same error. Getting error - 📝 Error: HTTP 401: User not found. ⚠️ Non-retryable error (HTTP 401) — trying fallback... ❌ Non-retryable error (HTTP 401): HTTP 401: User not found. ❌ Non-retryable client error (HTTP 401). Aborting.

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Code Example

⚠️  This will upload the following to a public paste service:
System info (OS, Python version, Hermes version, provider, which API keys
    are configured — NOT the actual keys)
Recent log lines (agent.log, errors.log, gateway.log — may contain
    conversation fragments and file paths)
Full agent.log and gateway.log (up to 512 KB each — likely contains
    conversation content, tool outputs, and file paths)

Pastes auto-delete after 6 hours.

Collecting debug report...
Uploading...

Debug report uploaded:
  Report       https://paste.rs/PSzil
  agent.log    https://paste.rs/roR5H
  gateway.log  https://paste.rs/qMOV0

Pastes will auto-delete in 6 hours.
To delete now:  hermes debug delete <url>

Share these links with the Hermes team for support.

---
RAW_BUFFERClick to expand / collapse

Bug Description

I am using openrouter. I verified that my openrouter api_key is working and I have credits. I also checked api_key value in "/Users/[user]/.hermes/.env", it is correct. When I try to chat in "hermes" application. I am getting following error -

⚠️ API call failed (attempt 1/3): AuthenticationError [HTTP 401] 🔌 Provider: openrouter Model: openai/gpt-5.3-codex 🌐 Endpoint: https://openrouter.ai/api/v1 📝 Error: HTTP 401: User not found. 📋 Details: {'message': 'User not found.', 'code': 401} ⚠️ Non-retryable error (HTTP 401) — trying fallback... ❌ Non-retryable error (HTTP 401): HTTP 401: User not found. ❌ Non-retryable client error (HTTP 401). Aborting. 🔌 Provider: openrouter Model: openai/gpt-5.3-codex 🌐 Endpoint: https://openrouter.ai/api/v1 💡 Your API key was rejected by the provider. Check: • Is the key valid? Run: hermes setup • Does your account have access to openai/gpt-5.3-codex? • Check credits: https://openrouter.ai/settings/credits

I tried to use multiple models from openrouter but I am getting same error.

I am using version - Hermes Agent v0.10.0 (2026.4.16) I am on MacOS.

Steps to Reproduce

  1. Use Openrouter as a model provider
  2. Use any model
  3. Configure openrouter api_key
  4. Chat in Hermes

Expected Behavior

The chat should work

Actual Behavior

Getting error -

⚠️ API call failed (attempt 1/3): AuthenticationError [HTTP 401] 🔌 Provider: openrouter Model: openai/gpt-5.3-codex 🌐 Endpoint: https://openrouter.ai/api/v1 📝 Error: HTTP 401: User not found. 📋 Details: {'message': 'User not found.', 'code': 401} ⚠️ Non-retryable error (HTTP 401) — trying fallback... ❌ Non-retryable error (HTTP 401): HTTP 401: User not found. ❌ Non-retryable client error (HTTP 401). Aborting. 🔌 Provider: openrouter Model: openai/gpt-5.3-codex 🌐 Endpoint: https://openrouter.ai/api/v1 💡 Your API key was rejected by the provider. Check: • Is the key valid? Run: hermes setup • Does your account have access to openai/gpt-5.3-codex? • Check credits: https://openrouter.ai/settings/credits

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

No response

Debug Report

⚠️  This will upload the following to a public paste service:
  • System info (OS, Python version, Hermes version, provider, which API keys
    are configured — NOT the actual keys)
  • Recent log lines (agent.log, errors.log, gateway.log — may contain
    conversation fragments and file paths)
  • Full agent.log and gateway.log (up to 512 KB each — likely contains
    conversation content, tool outputs, and file paths)

Pastes auto-delete after 6 hours.

Collecting debug report...
Uploading...

Debug report uploaded:
  Report       https://paste.rs/PSzil
  agent.log    https://paste.rs/roR5H
  gateway.log  https://paste.rs/qMOV0

⏱  Pastes will auto-delete in 6 hours.
To delete now:  hermes debug delete <url>

Share these links with the Hermes team for support.

Operating System

mac os

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The most likely fix is to verify the OpenRouter API key configuration and ensure the account has access to the specified model.

Guidance

  • Check the OpenRouter API key value in the /Users/[user]/.hermes/.env file to ensure it matches the one provided by OpenRouter.
  • Verify that the account has access to the openai/gpt-5.3-codex model by checking the OpenRouter dashboard.
  • Run hermes setup to reconfigure the API key and ensure it is valid.
  • Check the credits available in the OpenRouter account to ensure they are not exhausted.

Example

No code snippet is provided as the issue seems to be related to configuration and authentication.

Notes

The issue may be related to an incorrect or invalid API key, or insufficient access to the specified model. The provided debug report links may contain more information about the issue, but they are not accessible.

Recommendation

Apply workaround: Reconfigure the OpenRouter API key and verify account access to the model, as the error message suggests an authentication issue.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Bug]: Openrouter - API call failed: AuthenticationError [HTTP 401] [1 participants]