Brian Hung
Projects
Claude Code Proxy
A Cloudflare Worker that lets Claude Code run on any model the Vercel AI SDK supports.
Cloudflare Worker
POST /v1/messages, a Hono route
SSE events
Claude Code
the CLI, unchanged
toModelMessages, toTools
Anthropic JSON to AI SDK
resolveModelId
sonnet to SONNET_MODEL_ID
wrapLanguageModel
swaps in native web search
toAnthropicStream
AI SDK parts to Anthropic SSE
providers.languageModel
openai, google, xai, anthropic
Without streaming, the same path returns one JSON message instead of events.