Skip to content

API Error: 400 invalid params - chat content has invalid message role: system (2013) in Claude Code CLI v2.1.156 using Minimax Anthropic API #43

@ZoanHy

Description

@ZoanHy

Description

I am currently using Claude Code CLI v2.1.156 with the following Anthropic-compatible API endpoint:

https://api.minimax.io/anthropic

Because I am not located in China, I use this endpoint instead of the default one.

Starting today, every chat request fails with the following error:

API Error: 400 invalid params, chat content has invalid message role: system (2013)

Steps to Reproduce

  1. Open Claude Code CLI v2.1.156
  2. Configure API endpoint to:
    https://api.minimax.io/anthropic
  3. Start a normal chat session
  4. Send any prompt
  5. Error appears immediately

Expected Behavior

Chat requests should work normally with Anthropic-compatible APIs.

Actual Behavior

All requests fail with:

API Error: 400 invalid params, chat content has invalid message role: system (2013)

Environment

  • Claude Code CLI version: v2.1.156
  • API provider: Minimax
  • API endpoint: https://api.minimax.io/anthropic
  • OS: Windows
  • Issue started occurring: Today

Please help check whether:

  • Claude Code CLI recently changed the message format
  • system role handling became incompatible
  • or Minimax Anthropic compatibility has changed recently

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