systemprompt_models/wire/mod.rs
1//! Canonical AI wire types and per-protocol codecs, shared by the gateway and
2//! the agent provider clients.
3//!
4//! The gateway speaks one provider-neutral model internally. Inbound adapters
5//! parse a client wire request into a [`canonical::CanonicalRequest`]; outbound
6//! adapters render that request to an upstream provider, parse the upstream
7//! reply into a [`canonical::CanonicalResponse`], and map upstream SSE bytes to
8//! [`canonical::CanonicalEvent`]s.
9//!
10//! - [`canonical`] holds those provider-neutral request/response/event types.
11//! - The per-protocol modules ([`anthropic`], [`openai_chat`],
12//! [`openai_responses`], [`gemini`]) hold the codec for one wire dialect:
13//! request build, response parse, stop-reason + usage mapping, SSE-to-event
14//! translation, and auth-header construction.
15//!
16//! These types are defined ONCE here and re-exported by the gateway and the
17//! agent provider clients so both layers share a single wire vocabulary.
18
19pub mod canonical;
20
21pub mod anthropic;
22pub mod gemini;
23pub mod openai_chat;
24pub mod openai_responses;