Skip to main content

Crate causa_protocol

Crate causa_protocol 

Source
Expand description

Wire-protocol translation for LLM providers.

causa-protocol renders ContextFrame → provider wire bodies and parses wire responses → kernel ModelOutput. translation::context_frame is the shared policy walk; the three renderers (translation::anthropic, openai_chat, openai_responses) are thin emitters over it. The crate serves the causa_kernel::ModelGateway seam and is consumed by causa-provider’s gateways. It is transport-free.

Layering:

causa-kernel (facts, ModelGateway seam)
  <- causa-protocol (render/parse)   <- causa-provider

causa-protocol must not depend on reqwest, Axum, or any concrete provider SDK.

Re-exports§

pub use protocol::Protocol;
pub use translation::sse_parser::SseEvent;
pub use translation::sse_parser::SseParser;

Modules§

protocol
Wire-protocol discriminator for provider adapters.
translation
Translation between kernel DTOs and provider-native DTOs.