Skip to main content

backend_api_handler

Function backend_api_handler 

Source
pub async fn backend_api_handler(
    __arg0: State<ProxyState>,
    req: Request<Body>,
) -> Result<Response, StatusCode>
Expand description

ChatGPT backend calls outside the model rail are not model JSON and must not be compressed or cost-metered. They are credential-preserving passthroughs.

A WebSocket upgrade (Codex Desktop remote-control pairing, #597) is tunnelled verbatim to chatgpt.com by super::chatgpt_ws; plain HTTP/SSE falls through to the reqwest forward below.