shunt owns one boundary: translating Claude Code’s Anthropic-compatible gateway traffic into either pass-through Anthropic Messages traffic or OpenAI Responses traffic, selected by model. It delegates all agent behavior, tool execution, and UI/session orchestration back to Claude Code, which is why the gateway can be small, stateless, and testable README.md:1-60docs/implementation-plan.md:6-249.
That mirrors routing::resolve_model and proxy::forward: body bytes are parsed only for model, then a Route selects the adapter src/routing.rs:37-89src/proxy.rs:19-126.
graph TB
Body[Request body bytes] --> Parse[Parse model only]
Parse --> Resolve[Exact, prefix, default]
Resolve --> Route[Route]
Route --> A[Anthropic adapter]
Route --> R[Responses adapter]
classDef dark fill:#2d333b,stroke:#6d5dfc,color:#e6edf3;
class Body,Parse,Resolve,Route,A,R dark;
linkStyle default stroke:#8b949e;
classDiagram
class Config
class Route
class Adapter
class Credential
class AnthropicSseMachine
Config --> Route
Route --> Adapter
Adapter --> Credential
Adapter --> AnthropicSseMachine
sequenceDiagram
autonumber
participant CC as Claude Code
participant Proxy as proxy
participant Route as routing
participant Adapter as adapter
participant Up as upstream
CC->>Proxy: POST /v1/messages
Proxy->>Route: resolve body model
Route-->>Proxy: Route
Proxy->>Adapter: forward
Adapter->>Up: upstream request
Up-->>Adapter: stream/error
Adapter-->>CC: Anthropic response