Skip to content

symfony/models-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

PHP models.dev Package

This repository provides a daily snapshot of the models.dev API as a Composer package. It makes the full catalog of AI model metadata (providers, models, pricing, context limits, modalities, …) available to any PHP project via a simple composer require.

How it works

A GitHub Actions workflow runs every day at 06:00 UTC:

  1. It fetches the latest data from https://models.dev/api.json.
  2. If the data has changed, it commits the updated models-dev.json file.
  3. It creates a GitHub Release with a new version tag and a changelog describing added/removed providers and models. The version follows semver: minor bumps for additions and metadata updates (v1.0v1.1), major bumps when models or providers are removed (v1.3v2.0).

Installation

Releases follow semver: minor versions add new models or providers, major versions indicate removals. Use the ^ constraint to automatically receive new models/providers while staying protected from removals:

composer require symfony/models-dev:^1.0

When a new major version is released, review the release notes to see what was removed before upgrading.

The models-dev.json file at the root of the package contains the full dataset.

Usage

This package can be used in conjunction with the Symfony AI Models.dev bridge, which provides a universal platform giving access to all AI providers available on models.dev with automatic capability discovery, pricing, and routing to specialized bridges. See the full documentation for details.

You can also use the JSON data directly:

$models = json_decode(
    file_get_contents(__DIR__.'/vendor/symfony/models-dev/models-dev.json'),
    true,
);

// List all providers
$providers = array_keys($models);

// Get all models for a given provider
$openaiModels = $models['openai']['models'];

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors