Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vllm_mlx/api/anthropic_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

import json
import re
import uuid

from .anthropic_models import (
Expand Down Expand Up @@ -60,6 +61,10 @@ def anthropic_to_openai(request: AnthropicRequest) -> ChatCompletionRequest:
system_text = "\n".join(parts)
else:
system_text = str(request.system)
# Strip per-request billing/tracking headers injected by some
# clients (e.g. Claude Code). These contain a per-request hash
# that prevents prefix-cache reuse across turn boundaries.
system_text = re.sub(r"x-anthropic-billing-header:[^\n]*\n?", "", system_text)
messages.append(Message(role="system", content=system_text))

# Convert each message
Expand Down
Loading