Skip to main content

Module protocol

Module protocol 

Source
Expand description

Protocol translation between caller and upstream LLM wire formats.

The canonical model is the hub: inbound adapters parse caller requests into it and render responses back out, while outbound adapters send it to upstream providers and convert their replies and streams into canonical_response events. This indirection lets any supported inbound protocol target any supported upstream provider.

Re-exports§

pub use inbound::InboundAdapter;
pub use inbound::InboundParseError;
pub use inbound::anthropic_messages;
pub use inbound::openai_responses;
pub use outbound::OutboundAdapter;
pub use outbound::OutboundAdapterRegistration;
pub use outbound::OutboundCtx;
pub use outbound::OutboundOutcome;
pub use outbound::anthropic as outbound_anthropic;
pub use outbound::openai_chat;
pub use outbound::openai_responses as outbound_openai_responses;

Modules§

canonical
Re-export facade for the canonical wire request model, now defined in systemprompt_models::wire::canonical.
canonical_response
Re-export facade for the canonical wire response/event model, now defined in systemprompt_models::wire::canonical.
inbound
Inbound protocol adapters: caller wire format to canonical model.
outbound
Outbound protocol adapters: canonical model to upstream provider.

Structs§

CanonicalMessage
CanonicalRequest
CanonicalResponse
CanonicalTool
CanonicalUsage
ThinkingConfig

Enums§

CanonicalContent
CanonicalEvent
CanonicalStopReason
CanonicalToolChoice
ContentBlockKind
ImageSource
Role