Skip to content

Latest commit

 

History

211 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIModels

AIModels is a normalized catalog of AI models, creators, and inference providers. One shared data set is shipped through two packages:

The catalog is also the source of truth for aimodels.dev, AIWrapper, and Sila.

Design

Canonical model identity is independent from the provider that serves it:

canonical model: gpt-6-astra
OpenAI API:      gpt-6-astra
OpenRouter API:  openai/gpt-6-astra

Model files describe what a model is. Provider files describe where it is available and translate the canonical ID when an API expects a prefix, dated snapshot, or other provider-specific form.

import { models } from 'aimodels';

const model = models.id('gpt-6-astra');
model?.idFor('openrouter'); // openai/gpt-6-astra

models.fromProviderId('openrouter', 'openai/gpt-6-astra'); // canonical Model
from aimodels import models

model = models.id("gpt-6-astra")
model.id_for("openrouter")  # openai/gpt-6-astra

models.from_provider_id("openrouter", "openai/gpt-6-astra")

Repository structure

data/models/       Canonical model records, grouped by creator
data/providers/    Provider metadata, availability, ID mappings, and pricing
data/orgs.json     Shared organization metadata
data/schemas/      Generated JSON Schemas for catalog files
js/                JavaScript/TypeScript package and tests
python/            Python package and tests
docs/dev/          Maintainer guidance and architecture notes

The JSON in data/ is the only catalog source. Do not duplicate model data in either language implementation.

Development

Validate catalog data and the JavaScript package:

cd js
npm ci
npm run validate:data
npm run typecheck
npm run lint
npm run build

Validate the Python package from the repository root:

python3 -m pytest python/tests
python3 -m build python

When a public behavior is implemented in one package, add the equivalent API and tests in the other package unless the difference is intentional and documented.

See the documentation map for maintainer guidance. Read how to edit data before changing catalog records and architecture for data flow and invariants.

License

MIT

About

A collection of AI model specifications across different providers

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages