Skip to content

feat(broker-proxy): support Claude Code request compatibility - #1

Open
wtfsayo wants to merge 1 commit into
masterfrom
codex/claude-code-client-compat
Open

feat(broker-proxy): support Claude Code request compatibility#1
wtfsayo wants to merge 1 commit into
masterfrom
codex/claude-code-client-compat

Conversation

@wtfsayo

@wtfsayo wtfsayo commented Aug 22, 2026

Copy link
Copy Markdown

Summary

  • move Claude Code request compatibility into a dedicated broker-proxy module
  • update the emulated request shape to Claude Code 2.1.224 with the Agent SDK system block
  • calculate the request-dependent cch after all proxy body transformations
  • add per-request x-client-request-id headers and make compatibility block insertion idempotent
  • preserve caller messages, tools, system content, streaming, metering, and retry behavior

This lets Anthropic-compatible clients use the pool without installing a client-specific compatibility patch. broker-proxy applies the subscription request shape after the pool leases a Claude seat.

Verification

  • node --test packages/broker-proxy/claude-code-protocol.test.js packages/broker-proxy/proxy.test.js
  • 37 tests passed
  • node -c packages/broker-proxy/claude-code-protocol.js
  • node -c packages/broker-proxy/proxy.js
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant