Claude Code >= 2.1.154 breaks with vLLM Anthropic-compatible endpoint on DGX Spark

Hi everyone,

I wanted to flag a compatibility issue I ran into today when using Claude Code CLI (latest version) with vLLM serving as an Anthropic-compatible backend on my DGX Spark.

The problem

After Claude Code auto-updated to v2.1.154 (and later), every prompt fails with a 400 Bad Request from vLLM:

API Error: 400 54 validation errors:
{‘type’: ‘literal_error’, ‘loc’: (‘body’, ‘messages’, 1, ‘role’),
‘msg’: “Input should be ‘user’ or ‘assistant’”, ‘input’: ‘system’}

Root cause

Recent Claude Code versions (>= 2.1.154) started sending additional message roles (system, ctx, msg) inside the messages array of the Anthropic Messages API. vLLM’s Anthropic protocol strictly validates roles as only user or assistant, so these requests get rejected before any inference happens.

My setup

  • DGX Spark (GB10)
  • vLLM with Anthropic-compatible /v1/messages endpoint
  • Claude Code CLI via ANTHROPIC_BASE_URL pointing to local vLLM

Workaround that worked for me

Downgrade Claude Code to v2.1.153 (last version before the breaking change). The official install script always pulls latest, so here’s a manual install script:

#!/bin/bash
set -e

VERSION=“2.1.153”
PLATFORM=“linux-arm64” # adjust: linux-x64, darwin-arm64, etc.
CHECKSUM=“6277fbbea72228a069e4719fc3e5fa36f16749247a2321c520dae93e83e92d9c”
URL=“https://downloads.claude.ai/claude-code-releases

curl -fsSL -o /tmp/claude “$URL/$VERSION/$PLATFORM/claude”
echo “$CHECKSUM /tmp/claude” | sha256sum -c -
chmod +x /tmp/claude
/tmp/claude install
rm -f /tmp/claude

Note: Claude Code auto-updates by default. To stay on 2.1.153, set “autoUpdate”: false in ~/.config/claude/settings.json.

Long-term fix

The proper fix is on the vLLM side — either expanding the allowed role enum or normalizing these non-standard roles before validation. There’s an open issue tracking this: [Bug]: Claude Code CLI >= 2.1.154 sends ctx/msg/system roles and breaks vLLM Anthropic Messages API validation · Issue #44000 · vllm-project/vllm · GitHub

Hope this saves someone a few hours of debugging! Let me know if anyone has a cleaner solution or a vLLM patch that handles this properly.

Hi.
I don’t think autoUpdate is currently working.
It might be a good idea to provide an environment variable to disable automatic updates.

export DISABLE_AUTOUPDATER=1
{
  "env": {
    "DISABLE_AUTOUPDATER": "1"
  }
}

If the Auto-updates item shows disabled when you run claude doctor, then everything is working as expected.

I somehow detected did before my trip that all of a sudden started failing without any changes on the DGX side, so I reverted back to 150 (i remembered that worked) and disabled auto-updater.

Now just coming back from my and getting everything up and running, I read this! I thought It was something that I screwed up on my side :)

thanks for posting!