docs: clarify Anthropic Claude auth flow

This commit is contained in:
teknium1
2026-03-14 19:49:38 -07:00
parent 70ea13eb40
commit 799114ac8b
4 changed files with 25 additions and 10 deletions

View File

@@ -84,6 +84,13 @@ When provider resolution selects `anthropic`, Hermes uses:
- the native Anthropic Messages API
- `agent/anthropic_adapter.py` for translation
Credential resolution for native Anthropic now prefers refreshable Claude Code credentials over copied env tokens when both are present. In practice that means:
- Claude Code credential files are treated as the preferred source when they include refreshable auth
- manual `ANTHROPIC_TOKEN` / `CLAUDE_CODE_OAUTH_TOKEN` values still work as explicit overrides
- Hermes preflights Anthropic credential refresh before native Messages API calls
- Hermes still retries once on a 401 after rebuilding the Anthropic client, as a fallback path
## OpenAI Codex path
Codex uses a separate Responses API path: