Skip to content

[MiniMax] Tool call parameter error - HTTP 400 with code 2013 #12167

@lxgxdx

Description

@lxgxdx

Bug Description

When using MiniMax as the model provider, tool calls frequently fail with HTTP 400 error and code 2013, even with valid tool schemas.

Error:

Non-retryable client error: Error code: 400 - {"type": "error", "error": {"type": "bad_request_error", "message": "invalid params, invalid function arguments json string, tool_call_id: call_function_60llhpv7vhhb_1 (2013)", "http_code": "400"}}

Error code 2013 indicates invalid function arguments JSON string, but the same tool schemas work in other sessions, suggesting the issue is with how specific tool arguments are being serialized for the MiniMax API.

Environment

Frequency

  • Intermittent but recurring across multiple sessions
  • Observed across Telegram, Feishu, and WeChat platforms
  • Multiple tool_call_ids affected (call_function_kwjtlgkpzaaw_1, call_function_261jrmwedgag_1, call_function_keshbwxhnv17_1, call_function_bjhocfh3y8el_1, call_function_60llhpv7vhhb_1, etc.)

Example Error Log

2026-04-18 22:15:21,601 ERROR [20260418_221237_6de6d2] root: Non-retryable client error: Error code: 400 - {"type": "error", "error": {"type": "bad_request_error", "message": "invalid params, invalid function arguments json string, tool_call_id: call_function_60llhpv7vhhb_1 (2013)", "http_code": "400"}, "request_id": "0632c4f974f57e6ae17663e5cb19d51a"}

Expected Behavior

Tool calls should succeed when the tool schema is valid and arguments are properly formatted.

Possible Cause

The MiniMax API may be stricter about JSON serialization of tool arguments compared to OpenAI. Characters in tool argument values may need additional escaping, or certain Unicode characters in Chinese text may cause issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions