Expand description
tt-provider-compat — the OpenAI-wire-compatible adapter machinery.
Many inference providers (OpenAI itself, plus Mistral, Groq, Together AI,
OpenRouter) speak the OpenAI POST /chat/completions + /embeddings wire
format. This crate holds the shared plumbing — request/response translation,
SSE streaming, error mapping, the HTTP client config, and the generic
OpenAICompatibleProvider — so each adapter crate is a thin
configuration over it.
tt-provider-openai builds its native adapter on top of this crate (adding
the OpenAI pricing catalog); the four BYOK adapters depend only on this
crate, not on the full OpenAI adapter.
Re-exports§
pub use client::ClientConfig;pub use compat::CompatConfig;pub use compat::OpenAICompatibleProvider;
Modules§
- client
- HTTP client configuration for the OpenAI adapter.
- compat
- Shared base for OpenAI-compatible provider adapters.
- errors
- Maps HTTP status codes and OpenAI error bodies to
tt_shared::ProviderError. - stream
- SSE parser and streaming chat completion for the OpenAI adapter.
- translate
- Request translation for the OpenAI adapter.