namespace AIRuntime.Runtime.Providers.Fallback
{
    /// <summary>
    /// Describes why a provider request failed and whether
    /// another provider should be attempted.
    /// </summary>
    public enum ProviderFailureKind
    {
        /// <summary>
        /// The failure could not be classified safely.
        /// </summary>
        Unknown,

        /// <summary>
        /// The provider did not answer within its timeout.
        /// </summary>
        Timeout,

        /// <summary>
        /// The provider service could not be reached.
        /// </summary>
        Unavailable,

        /// <summary>
        /// The provider temporarily rejected the request
        /// because of capacity or rate limits.
        /// </summary>
        RateLimited,

        /// <summary>
        /// The configured model does not exist or is unavailable.
        /// </summary>
        ModelUnavailable,

        /// <summary>
        /// Authentication or authorisation failed.
        /// </summary>
        Authentication,

        /// <summary>
        /// The provider rejected the request as invalid.
        /// </summary>
        InvalidRequest,

        /// <summary>
        /// The provider returned malformed or unusable data.
        /// </summary>
        InvalidResponse,

        /// <summary>
        /// The provider completed the request but supplied no assistant text
        /// or tool calls. This is usually a transient routing/model failure,
        /// not a malformed tool-call contract.
        /// </summary>
        EmptyResponse,

        /// <summary>
        /// The caller cancelled the operation.
        /// </summary>
        Cancelled,

        /// <summary>The configured model cannot accept the request's input modality.</summary>
        UnsupportedInput
    }
}
