adachsoft/ai-model-list-provider-nvidia

ai-model-list-provider-nvidia

Maintainers

Package info

gitlab.com/a.adach/ai-model-list-provider-nvidia

Issues

pkg:composer/adachsoft/ai-model-list-provider-nvidia

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.0 2026-06-29 07:45 UTC

This package is not auto-updated.

Last update: 2026-06-29 18:34:55 UTC


README

This package provides an NVIDIA implementation of the ai-model-list SPI. It exposes a simple PHP API for listing available NVIDIA AI models using the unified AiModelProvider interface.

Installation

Install via Composer:

composer require adachsoft/ai-model-list-provider-nvidia

Requirements

  • PHP >= 8.3
  • adachsoft/ai-model-list (installed automatically as a dependency)
  • An NVIDIA API key

Usage

use AdachSoft\AIModelList\Spi\AiModelProvider\Model\ProviderId;
use AdachSoft\AiModelListProviderNvidia\Factory\NvidiaAiModelProviderFactory;

$apiKey = getenv('NVIDIA_KEY'); // or load from your own configuration/.env

$factory = new NvidiaAiModelProviderFactory();
$provider = $factory->create($apiKey);

$providerId = new ProviderId('nvidia');
$models = $provider->listModels($providerId);

foreach ($models as $model) {
    echo $model->getName() . PHP_EOL;
}

Testing

To run the test suite:

composer install
vendor/bin/phpunit

There is also an optional production test that can hit the real NVIDIA API. It is marked with the production PHPUnit group and requires a valid NVIDIA_KEY in your environment or .env file.

vendor/bin/phpunit --group production

Versioning

This library follows Semantic Versioning.

License

MIT License. See the LICENSE file for details.