hermes - 💡(How to fix) Fix OpenCode provider sends both `thinking` and `reasoning_effort`, causing 400 invalid_request_error

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

ERROR agent.conversation_loop: Non-retryable client error: Error code: 400 - {'error': {'object': 'error', 'type': 'invalid_request_error', 'code': 'invalid_request_error', 'message': "Error from provider: cannot specify both 'thinking' and 'reasoning_effort'"}}

Root Cause

  • thinking — Anthropic-style extended thinking parameter
  • reasoning_effort — OpenAI-style reasoning control parameter

The provider appears to inherit or default both fields from request construction logic, causing the upstream API to reject the call.

Fix Action

Fix / Workaround

  • This is a provider-level bug, not a user configuration issue
  • The error is non-retryable (400), so it hard-fails conversations until fixed
  • A local workaround was applied by modifying request construction to ensure parameter exclusivity

Code Example

ERROR agent.conversation_loop: Non-retryable client error: Error code: 400 - {'error': {'object': 'error', 'type': 'invalid_request_error', 'code': 'invalid_request_error', 'message': "Error from provider: cannot specify both 'thinking' and 'reasoning_effort'"}}
RAW_BUFFERClick to expand / collapse

Bug Description

The OpenCode provider (opencode-go) sends both thinking and reasoning_effort parameters in the same API request to the underlying model endpoint. These parameters are mutually exclusive — the upstream API rejects the call with a 400 error.

Error

ERROR agent.conversation_loop: Non-retryable client error: Error code: 400 - {'error': {'object': 'error', 'type': 'invalid_request_error', 'code': 'invalid_request_error', 'message': "Error from provider: cannot specify both 'thinking' and 'reasoning_effort'"}}

Root Cause

  • thinking — Anthropic-style extended thinking parameter
  • reasoning_effort — OpenAI-style reasoning control parameter

The provider appears to inherit or default both fields from request construction logic, causing the upstream API to reject the call.

Steps to Reproduce

  1. Configure Hermes to use an OpenCode provider (e.g., deepseek-v4-pro via opencode-go)
  2. Trigger any agent conversation loop
  3. Observe the 400 invalid_request_error with the message above

Expected Behavior

Only one of thinking or reasoning_effort should be sent per request, depending on the target model's expected API shape.

Actual Behavior

Both parameters are sent simultaneously, causing a hard failure (non-retryable 400) that blocks the conversation loop entirely.

Environment

  • Hermes Agent version: current as of 2026-05-25
  • Provider: opencode-go
  • Model: deepseek-v4-pro (also affects other models via this provider)
  • OS: macOS 26.5

Notes

  • This is a provider-level bug, not a user configuration issue
  • The error is non-retryable (400), so it hard-fails conversations until fixed
  • A local workaround was applied by modifying request construction to ensure parameter exclusivity

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