Bug Description
Hello! First off, thank you all for this wonderful software! It has been a pleasure using this so far on both CLI and Slack, and I look forward to even more enhancements and integrations soon.
After updating hermes-agent today, every primary model call (I'm using xAI grok-4-1-fast, which I know should be retiring soon, but nevertheless,) fails immediately with HTTP 400 and falls back to the configured fallback model:
Non-retryable error (HTTP 400) — trying fallback...
Primary model failed — switching to fallback: anthropic/claude-sonnet-4.6 via openrouter
Error: HTTP 400: Error code: 400 - {'code': 'Client specified an invalid argument',
'error': 'Model grok-4-1-fast does not support parameter reasoningEffort.'}
Steps to Reproduce
- Configure Hermes with xAI provider + grok-4-1-fast:
yaml
model:
default: grok-4-1-fast
provider: xai
- Start the gateway (or CLI)
- Send any message
Expected Behavior
Request succeeds; model responds normally.
Actual Behavior
HTTP 400 on every call. The xAI API rejects the request because it contains a reasoningEffort parameter that grok-4-1-fast does not support.
Affected Component
Setup / Installation
Messaging Platform (if gateway-related)
N/A (CLI only)
Debug Report
Report https://paste.rs/CL1md
agent.log https://dpaste.com/H4X5F7U6C
gateway.log https://dpaste.com/CMB243MTG
Operating System
Debian GNU/Linux 13 (trixie), kernel 6.12.85+deb13-amd64
Python Version
3.11.15
Hermes Version
v0.13.0 (2026.5.7)
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
The xAI provider plugin (plugins/model-providers/xai/__init__.py) unconditionally sets api_mode="codex_responses", routing all requests to /v1/responses. The codex transport (agent/transports/codex.py line 106–108) sends reasoning: {"effort": "medium"} for xAI. However, the xAI Responses API appears to serialize or forward this as the top-level reasoningEffort field, which grok-4-1-fast rejects - this field only works for grok-4-3 and later.
Relevant code pointers:
|
api_mode="codex_responses", |
|
if reasoning_enabled and is_xai_responses: |
|
kwargs["include"] = ["reasoning.encrypted_content"] |
|
kwargs["reasoning"] = {"effort": reasoning_effort} |
|
elif self.provider == "xai": |
|
self.api_mode = "codex_responses" |
Reference:
Proposed Fix (optional)
Implement reasoning_effort only for Grok 4.3 and later iterations - Grok 4.1 now fails, and presumably Grok 4.20 as well.
Are you willing to submit a PR for this?
Bug Description
Hello! First off, thank you all for this wonderful software! It has been a pleasure using this so far on both CLI and Slack, and I look forward to even more enhancements and integrations soon.
After updating hermes-agent today, every primary model call (I'm using xAI
grok-4-1-fast, which I know should be retiring soon, but nevertheless,) fails immediately with HTTP 400 and falls back to the configured fallback model:Steps to Reproduce
Expected Behavior
Request succeeds; model responds normally.
Actual Behavior
HTTP 400 on every call. The xAI API rejects the request because it contains a
reasoningEffortparameter thatgrok-4-1-fastdoes not support.Affected Component
Setup / Installation
Messaging Platform (if gateway-related)
N/A (CLI only)
Debug Report
Operating System
Debian GNU/Linux 13 (trixie), kernel 6.12.85+deb13-amd64
Python Version
3.11.15
Hermes Version
v0.13.0 (2026.5.7)
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
The xAI provider plugin (
plugins/model-providers/xai/__init__.py) unconditionally setsapi_mode="codex_responses", routing all requests to/v1/responses. The codex transport (agent/transports/codex.pyline 106–108) sendsreasoning: {"effort": "medium"}for xAI. However, the xAI Responses API appears to serialize or forward this as the top-levelreasoningEffortfield, whichgrok-4-1-fastrejects - this field only works forgrok-4-3and later.Relevant code pointers:
hermes-agent/plugins/model-providers/xai/__init__.py
Line 9 in 44cdf55
hermes-agent/agent/transports/codex.py
Lines 106 to 108 in 44cdf55
hermes-agent/run_agent.py
Lines 1208 to 1209 in 44cdf55
Reference:
Proposed Fix (optional)
Implement
reasoning_effortonly for Grok 4.3 and later iterations - Grok 4.1 now fails, and presumably Grok 4.20 as well.Are you willing to submit a PR for this?