Skip to main content

Module http

Module http 

Source
Expand description

HTTP server, route wiring, shared headers, and route errors.

Routes include Venice-backed model listing, encrypted chat request construction, response transformation, and OpenAI-compatible errors/headers.

Structs§

AppState
Shared HTTP application state used by route handlers.
ProxyMetadataHeaders
Safe proxy metadata headers.

Enums§

ChatStreamError
Errors returned while parsing, decrypting, or transforming upstream chat streams.
ProxyError
Errors returned by HTTP handlers and rendered as OpenAI-compatible JSON errors.

Constants§

HEADER_PROXY_ATTESTATION_MODE
HEADER_PROXY_ATTESTED_MODEL
HEADER_PROXY_E2EE
HEADER_PROXY_ERROR_CODE
HEADER_PROXY_KEY_BINDING
HEADER_PROXY_NVIDIA_VERIFIED
HEADER_PROXY_SESSION_ID
HEADER_PROXY_SESSION_SCOPE
HEADER_PROXY_TDX_DEBUG
HEADER_PROXY_TDX_VERIFIED
HEADER_PROXY_TEE_PROVIDER
HEADER_PROXY_TOOL_MODE
HEADER_PROXY_TOOL_RETRIES

Functions§

apply_error_headers
Applies proxy error metadata headers to an HTTP error response.
router
Builds the HTTP router using the configured Venice API key environment variable.
router_with_venice_client
Builds the HTTP router with an already-constructed Venice client.
serve
Serves an already-built router on an already-bound listener.