using Nexus.Api.Data;

namespace Nexus.Api.Integrations;

public sealed class NvidiaProvider(IConfiguration configuration) : IModelProvider
{
    public string Name => "NVIDIA";

    public Task<IReadOnlyCollection<ModelProviderStatus>> GetModelsAsync(
        CancellationToken cancellationToken)
    {
        var configured = !string.IsNullOrWhiteSpace(
            configuration["Integrations:Nvidia:ApiKey"]);
        IReadOnlyCollection<ModelProviderStatus> models =
        [
            new(
                Name,
                "moonshotai/kimi-k2.6",
                configured ? OperationalStatus.Online : OperationalStatus.Unknown,
                false,
                configured ? "Credential configured" : "Credential required")
        ];
        return Task.FromResult(models);
    }
}
