Overview of codex-client
mainThe codex-client crate provides a generic transport layer designed to handle HTTP requests, retries, and streaming primitives. It is intentionally agnostic of any specific Codex or OpenAI logic, making it a neutral utility for managing network communication.
Key capabilities include:
- HTTP Transport: Defines
HttpTransportand a defaultReqwestTransportimplementation, along with lightweightRequestandResponsetypes. - Retry Utilities: Provides mechanisms for handling transient failures via
RetryPolicy,RetryOn,run_with_retry, andbackofffunctions. - Streaming Support: Includes an
sse_streamhelper to convert byte streams into raw Server-Sent Events (SSE)data:frames, featuring idle timeouts and error surfacing.