Skip to content

DeepSeek Anthropic-compatible endpoint doesn't support system role in messages array #720

@yohanchen1

Description

@yohanchen1

Environment

Error

API Error: 400 - messages[1].role: unknown variant system, expected user or assistant

Cause

SDK 0.3.154 puts system role into the messages array, but DeepSeek's /anthropic
endpoint only supports system as a top-level field, not inside the messages array.

Previous working version

0.36.1 (SDK 0.3.143) - works correctly

Note

Claude Code CLI (v2.1.150) with the same DeepSeek endpoint works fine,
suggesting the issue is specific to how claude-agent-acp constructs messages.

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