Skip to content

[Claude Code - Stage 1] Transparent /v1/messages proxy + protocol contract #114

Description

@ashwing

Part of #113 (Claude Code integration).

Transparent proxy for /v1/messages and /v1/messages/count_tokens to the vLLM upstream, plus the Anthropic gateway protocol contract obligations a naive proxy gets wrong.

The proxy itself landed in #99 (raw body/headers/query/status/SSE/error pass-through, dual auth). This issue tracks the remaining contract items that need explicit test coverage:

  • system attribution-block strip works — only holds if system is forwarded verbatim, block-first (reordering/merging/stringifying breaks it and pollutes the prompt-cache key).
  • anthropic-beta forwarded as an open list (never allowlist beta values — the set changes per release).
  • anthropic-version forwarded unchanged.
  • Dual auth: accept either Authorization or x-api-key (done in feat: add Anthropic Messages gateway proxy #99).
  • Error bodies forwarded unmodified — Claude Code's auto-retry matches on upstream wording (done in feat: add Anthropic Messages gateway proxy #99, worth a regression test).

Acceptance: #99 merged + the two attribution/beta contract tests land. Contract details in #98 → "Gateway protocol contract".

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Fields

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