-
Notifications
You must be signed in to change notification settings - Fork 444
MiniMax LLM Error (2013): Multiple system messages in requests #198
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Pre-checks
- I have searched existing issues and this is not a duplicate.
Deployment Method
Source (setup.sh)
Steps to Reproduce
Issue Description
When using the MiniMax LLM, the following error occurs in Agent-to-Agent communication and trigger execution scenarios:
HTTP 400: {"type":"error","error":{"type":"bad_request_error","message":"invalid params, invalid chat setting (2013)","http_code":"400"}}
Affected Features
- Agent-to-Agent communication via Gateway
- Automatic trigger execution
Reproduction Steps
- Configure an Agent using the MiniMax model
- Have another Agent send a message to this Agent (via Gateway)
OR
Configure an automatic trigger execution - Observe the error message in
backend.log
Expected vs Actual Behavior
Root Cause
The MiniMax LLM does not support multiple messages with the system role in the message list.
The issue exists in two files:
app/api/gateway.py- During Agent-to-Agent communicationapp/services/trigger_daemon.py- During trigger execution
The code logic in both locations is as follows:
- Construct a complete context-aware
system_prompt - Add a system message to the
messageslist:{"role": "system", "content": system_prompt} - Call
call_llm(messages) - The
call_llmfunction internally adds another system message:api_messages = [LLMMessage(role="system", content=system_prompt)]
Result: The message list contains two system messages, which MiniMax rejects and returns error (2013).
Logs / Screenshots
2026-03-24 21:16:19 | ERROR | app.api.websocket:call_llm:262 - [LLM] LLMError provider=minimax model=MiniMax-M2.5 round=1: HTTP 400: {"type":"error","error":{"type":"bad_request_error","message":"invalid params, invalid chat setting (2013)","http_code":"400"}}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working