namespace AIStudio.AIOperations; /// /// What the caller of an AI operation adds to the choice of its provider. /// public sealed record AIOperationProviderOptions { /// /// The IDs of the providers to fall back on when the preferred provider of the operation cannot be used, in order. /// /// /// An empty ID is allowed and stands for a fallback nobody named, e.g., an assistant without a provider. /// public IReadOnlyList FallbackProviderIds { get; init; } = []; /// /// Whether the minimum confidence of the operation applies to the fallbacks as well. /// /// /// Usually it does: a provider somebody picked for something else has to clear the bar of the operation, /// otherwise a provider ruled out for it would still see its content. A caller turns it off where the /// fallback saw the content anyway, e.g., the model of a chat which summarizes that very chat. /// public bool OwnMinimumConfidenceAppliesToFallbacks { get; init; } = true; /// /// An optional check of the caller, applied to every configured candidate. /// /// /// It returns NONE when the provider passes, and otherwise the issue to report, usually /// NOT_ALLOWED_FOR_CONTENT or CONTEXT_WINDOW_TOO_SMALL. /// public Func? CheckProvider { get; init; } }