Skip to content

[Bug]: Can't use alibaba codingplan w,th hermes agent #1739

@atasever

Description

@atasever

Bug Description

🔐 Anthropic 401 — authentication failed.
Auth method: Bearer (OAuth/setup-token)
Token prefix: sk-ant-oat01...
Troubleshooting:
• Check ANTHROPIC_TOKEN in ~/.hermes/.env for Hermes-managed OAuth/setup tokens
• Check ANTHROPIC_API_KEY in ~/.hermes/.env for API keys or legacy token values
• For API keys: verify at https://console.anthropic.com/settings/keys
• For Claude Code: run 'claude /login' to refresh, then retry
• Clear stale keys: hermes config set ANTHROPIC_TOKEN ""
• Legacy cleanup: hermes config set ANTHROPIC_API_KEY ""
⚠️ API call failed (attempt 1/3): AuthenticationError
⏱️ Time elapsed before failure: 1.42s
📝 Error: Error code: 401 - {'error': {'code': 'invalid_api_key', 'message': 'invalid access token or token expired', 'param': None, 'type': 'invalid_request_error'}, 'request_id': '251709bf-c4e1-9fa9-93af-bf7d
📊 Request context: 2 messages, ~3,367 tokens, 30 tools
─ ⚕ Hermes

Error: Error code: 401 - {'error': {'code': 'invalid_api_key', 'message': 'invalid access token or token expired', 'param': None, 'type': 'invalid_request_error'}, 'request_id':
'251709bf-c4e1-9fa9-93af-bf7da08cc310'}

🧾 Request debug dump written to: /home/ml/.hermes/sessions/request_dump_20260317_143123_d50158_20260317_143127_836650.json

request_dump_20260317_143123_d50158_20260317_143127_836650.json

Steps to Reproduce

head .hermes/config.yaml
model:
default: qwen3.5-plus
provider: alibaba
base_url: https://coding-intl.dashscope.aliyuncs.com/apps/anthropic

cat .hermes/.env | grep dashs
DASHSCOPE_BASE_URL=https://coding-intl.dashscope.aliyuncs.com/apps/anthropic
DASHSCOPE_API_KEY=sk-sp-......................................................

Expected Behavior

should use alibaba coding plan

Actual Behavior

can't connect to alibaba api

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

No response

Operating System

Ubuntu 24.04

Python Version

3.11.9

Hermes Version

0.3.0

Relevant Logs / Traceback

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions