ExAgent.Embeddings.Error (ExAgent v3.0.0)

View Source

A bounded failure from an embedding or rerank operation. :result_unconfirmed means the request may have reached the provider. :quota_admission_unconfirmed means no provider operation was dispatched. :status holds the HTTP status when available. Usage records any evidence retained even when the operation fails or the result exceeds its bound.

Stability — Candidate.

Summary

Types

reason()

@type reason() ::
  :invalid_input
  | :input_limit
  | :output_limit
  | :invalid_response
  | :provider_rejected
  | :unsupported_model
  | :invalid_provider_options
  | :result_unconfirmed
  | :cancelled
  | :rate_limiter_unavailable
  | {:rate_limiter_migration_required, pos_integer()}
  | :quota_admission_unconfirmed
  | :token_estimate_required
  | {:accounting_unavailable, String.t(), :normalized_only}
  | ExAgent.UsageLimits.Budget.admission_error()
  | {:rate_limited, ExAgent.RateLimiter.key(), non_neg_integer() | atom()}

t()

@type t() :: %ExAgent.Embeddings.Error{
  operation: ExAgent.Embeddings.operation(),
  reason: reason(),
  status: pos_integer() | nil,
  usage: ExAgent.Message.Usage.t()
}