Description
When a tool call fails with an HTTP 400 error from MiniMax API (minimax-cn provider), the returned tool_call_id is not properly invalidated. Subsequent new sessions continue to reuse the same invalidated tool_call_id, causing every request to fail with:
Error code: 400 - {'type': 'error', 'error': {'type': 'bad_request_error', 'message': 'invalid params, invalid function arguments json string, tool_call_id: call_function_XXXXX_1 (2013)', 'http_code': '400'}
Evidence
The same pattern has reproduced multiple times across different dates:
- 2026-04-26:
call_function_18464z1gskgy_1 → 400, reused across ~5 sessions
- 2026-04-26:
call_function_bgfd4km3qnvm_1 → 400, reused across ~3 sessions
- 2026-04-27:
call_function_41ojma24zxdp_1 → 400, reused across 4+ sessions
Each time a new tool_call_id appears on first failure, it then gets "stuck" and reused in all subsequent sessions until the Hermes service is restarted.
Steps to Reproduce
- Use MiniMax provider (
minimax-cn) with tools enabled
- Trigger any tool call that produces a 400 error (e.g., malformed parameters)
- Observe that all subsequent sessions also fail with the same
tool_call_id
Expected Behavior
When a tool call returns a 400 error, Hermes should:
- Invalidate that
tool_call_id
- Generate a fresh
tool_call_id for subsequent requests
- Not persist or cache the failed ID across sessions
Environment
- Provider: MiniMax (
minimax-cn)
- Model:
MiniMax-M2.7
- Base URL:
https://api.minimaxi.com/v1
- Platform: Docker
Description
When a tool call fails with an HTTP 400 error from MiniMax API (
minimax-cnprovider), the returnedtool_call_idis not properly invalidated. Subsequent new sessions continue to reuse the same invalidatedtool_call_id, causing every request to fail with:Evidence
The same pattern has reproduced multiple times across different dates:
call_function_18464z1gskgy_1→ 400, reused across ~5 sessionscall_function_bgfd4km3qnvm_1→ 400, reused across ~3 sessionscall_function_41ojma24zxdp_1→ 400, reused across 4+ sessionsEach time a new
tool_call_idappears on first failure, it then gets "stuck" and reused in all subsequent sessions until the Hermes service is restarted.Steps to Reproduce
minimax-cn) with tools enabledtool_call_idExpected Behavior
When a tool call returns a 400 error, Hermes should:
tool_call_idtool_call_idfor subsequent requestsEnvironment
minimax-cn)MiniMax-M2.7https://api.minimaxi.com/v1