hermes - 💡(How to fix) Fix [Bug]: API not working with opencode zen integration [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#15575Fetched 2026-04-26 05:26:29
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

Initializing agent... ────────────────────────────────────────

⚠️ API call failed (attempt 1/3): AuthenticationError [HTTP 401] 🔌 Provider: opencode-go Model: kimi-k2.6 🌐 Endpoint: https://opencode.ai/zen/go/v1 📝 Error: HTTP 401: Invalid API key. 📋 Details: {'type': 'AuthError', 'message': 'Invalid API key.'} ⚠️ Non-retryable error (HTTP 401) — trying fallback... ❌ Non-retryable error (HTTP 401): HTTP 401: Invalid API key. ❌ Non-retryable client error (HTTP 401). Aborting. 🔌 Provider: opencode-go Model: kimi-k2.6 🌐 Endpoint: https://opencode.ai/zen/go/v1 💡 Your API key was rejected by the provider. Check: • Is the key valid? Run: hermes setup • Does your account have access to kimi-k2.6? ─ ⚕ Hermes ─────────────────────────────────────────────────────────────────

 Error: Error code: 401 - {'type': 'error', 'error': {'type':               
 'AuthError', 'message': 'Invalid API key.'}}

Root Cause

Root Cause Analysis (optional)

Code Example

Initializing agent...
────────────────────────────────────────

⚠️  API call failed (attempt 1/3): AuthenticationError [HTTP 401]
   🔌 Provider: opencode-go  Model: kimi-k2.6
   🌐 Endpoint: https://opencode.ai/zen/go/v1
   📝 Error: HTTP 401: Invalid API key.
   📋 Details: {'type': 'AuthError', 'message': 'Invalid API key.'}
⚠️ Non-retryable error (HTTP 401) — trying fallback...
Non-retryable error (HTTP 401): HTTP 401: Invalid API key.
 Non-retryable client error (HTTP 401). Aborting.
   🔌 Provider: opencode-go  Model: kimi-k2.6
   🌐 Endpoint: https://opencode.ai/zen/go/v1
   💡 Your API key was rejected by the provider. Check:
Is the key valid? Run: hermes setup
Does your account have access to kimi-k2.6?
 ─  ⚕ Hermes  ───────────────────────────────────────────────────────────────── 
                                                                                
     Error: Error code: 401 - {'type': 'error', 'error': {'type':               
     'AuthError', 'message': 'Invalid API key.'}}

---

API call failed (attempt 1/3): AuthenticationError [HTTP 401]
   🔌 Provider: opencode-go  Model: kimi-k2.6
   🌐 Endpoint: https://opencode.ai/zen/go/v1
   📝 Error: HTTP 401: Invalid API key.
   📋 Details: {'type': 'AuthError', 'message': 'Invalid API key.'}
⚠️ Non-retryable error (HTTP 401) — trying fallback...
Non-retryable error (HTTP 401): HTTP 401: Invalid API key.
 Non-retryable client error (HTTP 401). Aborting.
   🔌 Provider: opencode-go  Model: kimi-k2.6
   🌐 Endpoint: https://opencode.ai/zen/go/v1
   💡 Your API key was rejected by the provider. Check:
Is the key valid? Run: hermes setup
Does your account have access to kimi-k2.6?
 ─  ⚕ Hermes  ───────────────────────────────────────────────────────────────── 
                                                                                
     Error: Error code: 401 - {'type': 'error', 'error': {'type':               
     'AuthError', 'message': 'Invalid API key.'}}                               
                                                                                
 ────────────────────────────────────────────────────────────────────────────── 
 ⚕ kimi-k2.60/262.1K │ [░░░░░░░░░░] 0% │ 22m │ ⏲ 0s 
────────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────────────
RAW_BUFFERClick to expand / collapse

Bug Description

I’ve been trying to use Hermes with opencode zen but the API just doesnt work together right now. Requests either fail or return unexpected responses, and the integration basically unusable in this state. There’s no clear indication that opencode zen is unsupported so it feels like it should work but it doesnt

Steps to Reproduce

Setup Hermes with opencode zen as the backend/api provider. Try to run a simple request or interaction through Hermes using that setup. The request fails or behaves incorrectly pretty quickly

Expected Behavior

Hermes should properly support opencode zen as an API backend, or at least handle it in a compatible way so requests go through normally

Actual Behavior

The API calls fail or return broken responses, making the integration unusable. No clear error message explaining what is wrong which makes debugging harder

<img width="688" height="493" alt="Image" src="https://github.com/user-attachments/assets/5ee6579d-ffa9-43b1-978f-70b10b0163f1" />

Affected Component

CLI (interactive chat), Configuration (config.yaml, .env, hermes setup)

Messaging Platform (if gateway-related)

No response

Debug Report

Initializing agent...
────────────────────────────────────────

⚠️  API call failed (attempt 1/3): AuthenticationError [HTTP 401]
   🔌 Provider: opencode-go  Model: kimi-k2.6
   🌐 Endpoint: https://opencode.ai/zen/go/v1
   📝 Error: HTTP 401: Invalid API key.
   📋 Details: {'type': 'AuthError', 'message': 'Invalid API key.'}
⚠️ Non-retryable error (HTTP 401) — trying fallback...
❌ Non-retryable error (HTTP 401): HTTP 401: Invalid API key.
❌ Non-retryable client error (HTTP 401). Aborting.
   🔌 Provider: opencode-go  Model: kimi-k2.6
   🌐 Endpoint: https://opencode.ai/zen/go/v1
   💡 Your API key was rejected by the provider. Check:
      • Is the key valid? Run: hermes setup
      • Does your account have access to kimi-k2.6?
 ─  ⚕ Hermes  ───────────────────────────────────────────────────────────────── 
                                                                                
     Error: Error code: 401 - {'type': 'error', 'error': {'type':               
     'AuthError', 'message': 'Invalid API key.'}}

Operating System

ubuntu 24.01

Python Version

Python 3.13.3

Hermes Version

No response

Additional Logs / Traceback (optional)

API call failed (attempt 1/3): AuthenticationError [HTTP 401]
   🔌 Provider: opencode-go  Model: kimi-k2.6
   🌐 Endpoint: https://opencode.ai/zen/go/v1
   📝 Error: HTTP 401: Invalid API key.
   📋 Details: {'type': 'AuthError', 'message': 'Invalid API key.'}
⚠️ Non-retryable error (HTTP 401) — trying fallback...
❌ Non-retryable error (HTTP 401): HTTP 401: Invalid API key.
❌ Non-retryable client error (HTTP 401). Aborting.
   🔌 Provider: opencode-go  Model: kimi-k2.6
   🌐 Endpoint: https://opencode.ai/zen/go/v1
   💡 Your API key was rejected by the provider. Check:
      • Is the key valid? Run: hermes setup
      • Does your account have access to kimi-k2.6?
 ─  ⚕ Hermes  ───────────────────────────────────────────────────────────────── 
                                                                                
     Error: Error code: 401 - {'type': 'error', 'error': {'type':               
     'AuthError', 'message': 'Invalid API key.'}}                               
                                                                                
 ────────────────────────────────────────────────────────────────────────────── 
 ⚕ kimi-k2.6 │ 0/262.1K │ [░░░░░░░░░░] 0% │ 22m │ ⏲ 0s 
────────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────────────

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

Add proper support for opencode zen in the API layer or document clearly that it’s not supported. Ideally implement a compatible adapter so it works out of the box

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 API key for opencode zen and ensure it is valid and properly configured in Hermes.

Guidance

  • Check the API key for opencode zen to ensure it is valid and not expired.
  • Run hermes setup to reconfigure the API key if necessary.
  • Verify that the account has access to the kimi-k2.6 model.
  • Consider adding a compatible adapter for opencode zen in the API layer to improve integration.

Example

No code example is provided as the issue is related to configuration and API key validation.

Notes

The issue seems to be related to an invalid API key, but it's also possible that opencode zen is not properly supported by Hermes. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Verify the API key and account access, and consider adding a compatible adapter for opencode zen. This is because the issue is likely related to an invalid API key, and adding support for opencode zen would improve the overall integration.

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]: API not working with opencode zen integration [1 participants]