LLMProxy.Providers.HTTPResult (llm_proxy v0.3.1)

Copy Markdown View Source

Converts upstream HTTP responses and exceptions into LLMProxy.Providers.Result values. Cooldowns are recorded at the provider execution boundary, not during conversion.

Summary

Functions

extract(body)

handle_exception(exception)

handle_response(token, response, model \\ nil)

post(req, body, token, model \\ nil)

provider_details(body)

result(error, status, token, opts \\ [])

retry_after_ms(headers)

Parses a bounded Retry-After delay from HTTP headers, in milliseconds.