hermes - 💡(How to fix) Fix [Bug]: Opencode Go issue with Kimi-k2.6

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…

Error Message

First failure — session 20260525_152705_c267b0d7 at 15:27:10:

WARNING API call failed (attempt 1/3) error_type=BadRequestError
         provider=opencode-go model=kimi-k2.6
         summary=HTTP 400: Error from provider: cannot specify both
         'thinking' and 'reasoning_effort'

ERROR    Non-retryable client error:
         Error code: 400 - {'error': {'message': "Error from provider:
         cannot specify both 'thinking' and 'reasoning_effort'"}}


Then repeated 4 more times across different sessions trying kimi-k2.6:

| Session                  | Time     |
|--------------------------|----------|
| 20260525_152705_c267b0d7 | 15:27:10 |
| 20260525_165642_1ec6ab   | 16:56:49 |
| 20260525_165844_1eb604   | 16:58:50 |
| 20260525_165938_a5b92a   | 16:59:47 |
| 20260525_170115_f8be78   | 17:01:20 |

Root Cause

Root Cause Analysis (optional)

Fix Action

Fix / Workaround

⚠️ API call failed (attempt 1/3): BadRequestError [HTTP 400] 🔌 Provider: opencode-go Model: kimi-k2.6 🌐 Endpoint: https://opencode.ai/zen/go/v1 📝 Error: HTTP 400: Error from provider: cannot specify both 'thinking' and 'reasoning_effort' 📋 Details: {'object': 'error', 'type': 'invalid_request_error', 'code': 'invalid_request_error', 'message': "Error from provider: cannot specify both 'thinking' and 'reasoning_effort'"} ⚠️ Non-retryable error (HTTP 400) — trying fallback... ❌ Non-retryable error (HTTP 400): HTTP 400: Error from provider: cannot specify both 'thinking' and 'reasoning_effort' ❌ Non-retryable client error (HTTP 400). Aborting. 🔌 Provider: opencode-go Model: kimi-k2.6 🌐 Endpoint: https://opencode.ai/zen/go/v1 💡 This type of error won't be fixed by retrying.

Code Example

First failure — session 20260525_152705_c267b0d7 at 15:27:10:

    WARNING API call failed (attempt 1/3) error_type=BadRequestError
             provider=opencode-go model=kimi-k2.6
             summary=HTTP 400: Error from provider: cannot specify both
             'thinking' and 'reasoning_effort'

    ERROR    Non-retryable client error:
             Error code: 400 - {'error': {'message': "Error from provider:
             cannot specify both 'thinking' and 'reasoning_effort'"}}


    Then repeated 4 more times across different sessions trying kimi-k2.6:

    | Session                  | Time     |
    |--------------------------|----------|
    | 20260525_152705_c267b0d7 | 15:27:10 |
    | 20260525_165642_1ec6ab   | 16:56:49 |
    | 20260525_165844_1eb604   | 16:58:50 |
    | 20260525_165938_a5b92a   | 16:59:47 |
    | 20260525_170115_f8be78   | 17:01:20 |

---

Hermes Agent v0.14.0 (2026.5.16)
Project: /home/arun/.hermes/hermes-agent
Python: 3.11.15
OpenAI SDK: 2.24.0
RAW_BUFFERClick to expand / collapse

Bug Description

Commit 70aaa774b (Sat May 23, 1:49 AM — 2 days ago) titled: > fix(opencode-go): emit Kimi reasoning_effort, match KimiProfile shape

Before this commit, the kimi-k2 branch in OpenCodeGoProfile only sent extra_body.thinking — which worked fine with the OpenCode Go endpoint.

This commit added top-level reasoning_effort alongside extra_body.thinking, trying to mirror the native Moonshot API (KimiProfile at api.moonshot.ai/v1). The author's reasoning was that since "OpenCode Go proxies to the same Moonshot backend," both fields should work — exactly as they do on the native Moonshot endpoint.

The assumption was wrong: OpenCode Go's backend for kimi-k2 validates differently and rejects the dual-parameter request with HTTP 400.

This needs fixing like below:

Steps to Reproduce

  1. Run 'hermes model'
  2. Select Opencode Go and Select 'kimi-k2.6'
  3. Launch 'hermes' and say 'hi' and you will receive the below error:

⚠️ API call failed (attempt 1/3): BadRequestError [HTTP 400] 🔌 Provider: opencode-go Model: kimi-k2.6 🌐 Endpoint: https://opencode.ai/zen/go/v1 📝 Error: HTTP 400: Error from provider: cannot specify both 'thinking' and 'reasoning_effort' 📋 Details: {'object': 'error', 'type': 'invalid_request_error', 'code': 'invalid_request_error', 'message': "Error from provider: cannot specify both 'thinking' and 'reasoning_effort'"} ⚠️ Non-retryable error (HTTP 400) — trying fallback... ❌ Non-retryable error (HTTP 400): HTTP 400: Error from provider: cannot specify both 'thinking' and 'reasoning_effort' ❌ Non-retryable client error (HTTP 400). Aborting. 🔌 Provider: opencode-go Model: kimi-k2.6 🌐 Endpoint: https://opencode.ai/zen/go/v1 💡 This type of error won't be fixed by retrying.

Expected Behavior

It should work like any other model

Actual Behavior

It error our as described

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

First failure — session 20260525_152705_c267b0d7 at 15:27:10:

    WARNING API call failed (attempt 1/3) error_type=BadRequestError
             provider=opencode-go model=kimi-k2.6
             summary=HTTP 400: Error from provider: cannot specify both
             'thinking' and 'reasoning_effort'

    ERROR    Non-retryable client error:
             Error code: 400 - {'error': {'message': "Error from provider:
             cannot specify both 'thinking' and 'reasoning_effort'"}}


    Then repeated 4 more times across different sessions trying kimi-k2.6:

    | Session                  | Time     |
    |--------------------------|----------|
    | 20260525_152705_c267b0d7 | 15:27:10 |
    | 20260525_165642_1ec6ab   | 16:56:49 |
    | 20260525_165844_1eb604   | 16:58:50 |
    | 20260525_165938_a5b92a   | 16:59:47 |
    | 20260525_170115_f8be78   | 17:01:20 |

Operating System

Omarchy 3.8.1

Python Version

Python 3.13.11

Hermes Version

No response

Additional Logs / Traceback (optional)

Hermes Agent v0.14.0 (2026.5.16)
Project: /home/arun/.hermes/hermes-agent
Python: 3.11.15
OpenAI SDK: 2.24.0

Root Cause Analysis (optional)

The bug: Commit 70aaa774b (2 days ago) modified the opencode-go provider's OpenCodeGoProfile to send both extra_body.thinking and top-level reasoning_effort for kimi-k2 models — matching the native Moonshot API wire shape. But the OpenCode Go endpoint for kimi-k2 rejects requests carrying both parameters simultaneously with HTTP 400.

Proposed Fix (optional)

The fix: Reverted the kimi-k2 branch of OpenCodeGoProfile.build_api_kwargs_extras() back to sending only extra_body.thinking (enable/disable toggle), dropping top-level reasoning_effort entirely. This restores the state that was working for you before the 2-3 hermes update runs.

Files changed:
- plugins/model-providers/opencode-zen/init.py — the actual fix
- tests/plugins/model_providers/test_opencode_go_profile.py — tests updated to match

Impact: Only affects kimi-k2 models on the opencode-go provider. DeepSeek and all other models are unchanged. Thinking on/off still works; effort granularity defaults to the server's medium.

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