hermes - 💡(How to fix) Fix Anthropic provider sends `Bearer None` to /chat/completions instead of /v1/messages with OAuth credential [1 comments, 2 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#23370Fetched 2026-05-11 03:29:49
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×5commented ×1

When model.provider: anthropic is set in config.yaml and a valid Claude Code OAuth credential is present in the credential pool, the agent runtime sends requests to the wrong endpoint with a missing token, resulting in 400 invalid_request_error from Anthropic.

Error Message

Additional Logs / Traceback (optional)

Root Cause

_ANTHROPIC_COMPAT_PROVIDERS = frozenset({"minimax", "minimax-oauth", "minimax-cn"}) — anthropic isn't in there The runtime sends to /chat/completions (OpenAI-compat URL) regardless of which install you have Bearer None happens because the credential pool resolution isn't wired into the chat-call path Both behaviors are baked into the source code in ~/.hermes/hermes-agent/agent/

Code Example

Not sure

---
RAW_BUFFERClick to expand / collapse

Bug Description

Environment

  • Hermes version: (run hermes --version and paste)
  • OS: macOS (Apple Silicon, Mac mini)
  • Python: 3.11 (Hermes venv)

Summary

When model.provider: anthropic is set in config.yaml and a valid Claude Code OAuth credential is present in the credential pool, the agent runtime sends requests to the wrong endpoint with a missing token, resulting in 400 invalid_request_error from Anthropic.

Steps to reproduce

  1. Have Claude Code logged in to a Max account (claude auth status confirms login)
  2. ~/.claude.json exists and contains valid OAuth credentials
  3. Run hermes auth list — shows anthropic (1 credentials): #1 claude_code oauth claude_code ←
  4. Set config:

Steps to Reproduce

_ANTHROPIC_COMPAT_PROVIDERS = frozenset({"minimax", "minimax-oauth", "minimax-cn"}) — anthropic isn't in there The runtime sends to /chat/completions (OpenAI-compat URL) regardless of which install you have Bearer None happens because the credential pool resolution isn't wired into the chat-call path Both behaviors are baked into the source code in ~/.hermes/hermes-agent/agent/

Expected Behavior

Should connect to claude CLI

Actual Behavior

Not creating utilizing API instead

Affected Component

Configuration (config.yaml, .env, hermes setup)

Messaging Platform (if gateway-related)

No response

Debug Report

Not sure

Operating System

MacOS 15/2

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

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