Skip to main content

Module protocol

Module protocol 

Source
Expand description

Wire-format abstraction over the two chat protocols that matter in the resale market: OpenAI /v1/chat/completions and Anthropic /v1/messages.

Everything else worth testing (Azure, Bedrock relays, OpenRouter, LiteLLM, New-API, One-API, vLLM, Ollama …) speaks one of these two on the wire, so two adapters cover the field.

Structs§

ChatRequest
ChatResponse
Usage

Enums§

Protocol

Functions§

error_envelope_ok
Whether an error body matches the protocol’s documented envelope. A hand-rolled proxy usually gets this subtly wrong.