AI.Endpoint.OpenAI (fnord v0.9.30)

View Source

OpenAI-specific endpoint implementation.

Provides the endpoint path and error classification used by AI.Endpoint's centralized retry/backoff logic.

Summary

Functions

Provider-specific error classifier for OpenAI/Cloudflare style responses. See AI.Endpoint.endpoint_error_classify/4 for contract details.

Functions

endpoint_error_classify(status, body, headers, transport_reason)

@spec endpoint_error_classify(
  integer() | nil,
  binary() | nil,
  list() | nil,
  term() | nil
) ::
  :ok | {:retry, atom(), non_neg_integer() | nil} | {:fail, atom(), binary()}

Provider-specific error classifier for OpenAI/Cloudflare style responses. See AI.Endpoint.endpoint_error_classify/4 for contract details.