Skip to main content

Module dialect

Module dialect 

Source
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 legacy anthropic_in.rs module was deleted (its conformance tests live in stream.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.