Expand description
Wire-format dialect adapters.
*/req.rs parses the client wire format into the crate::items
canonical model; */out.rs renders canonical responses back to that
dialect and */stream.rs holds the per-chunk SSE framer state machines.
All of it is pure data transformation; the SSE pump in sse (feature
axum) is the only runtime-coupled piece.
Modules§
- anthropic
- Inbound Anthropic Messages adapter: translates Anthropic wire format
(
POST /v1/messages,/v1/messages/count_tokens) to/from the canonical items model. This is the only Anthropic ingress path; the legacyanthropic_in.rsmodule was deleted (its conformance tests live instream.rs/out.rs). - deflate
- Deflate: the items canonical → legacy OpenAI-shaped ChatRequest.
- openai_
chat - Inbound/outbound OpenAI Chat-Completions adapter (
POST /v1/chat/completions). - openai_
responses - Inbound/outbound OpenAI Responses API adapter (
POST /v1/responses). - sse
- The one shared SSE response driver for all three client surfaces.