Skip to Content
ArchitectureYAML Schemas

YAML Schemas

The OpenModels registry uses three core YAML schemas to define the relationships between AI models, inference providers, and their mappings. Each schema is validated automatically via GitHub Actions on every pull request.

Registry Structure

openmodels/ ├── models/ # One file per canonical model │ ├── gpt-5.yaml │ ├── claude-sonnet-4-5.yaml │ └── deepseek-v3.yaml ├── providers/ # One file per inference provider │ ├── openai.yaml │ ├── anthropic.yaml │ └── google.yaml └── mappings/ # Grouped by provider, one file per model offering ├── anthropic/ │ └── claude-sonnet-4-5.yaml ├── deepseek/ │ └── deepseek-v3.yaml └── openai/ └── gpt-5.yaml

Model Schema

A model represents a canonical AI model independent of any provider. The filename must match the id field (e.g., claude-sonnet-4-5.yaml).

Example

id: claude-sonnet-4-5 name: Claude Sonnet 4.5 description: >- Anthropic's previous-generation balanced model with strong coding and analysis capabilities. Offers excellent price-performance ratio for production workloads requiring reliable quality. capabilities: - chat - completion - function-calling - vision - code-generation - reasoning modalities: - text - image - code context_window: 200000 licensing: proprietary created_at: "2025-10-01T00:00:00.000Z" updated_at: "2026-05-01T00:00:00.000Z"

Fields

FieldTypeRequiredDescription
idstringYesUnique identifier for the model. Must match the filename.
namestringYesHuman-readable display name.
descriptionstringYesBrief description of the model’s capabilities and positioning.
capabilitiesstring[]YesList of supported capabilities (see values below).
modalitiesstring[]YesInput/output modalities the model supports.
context_windowintegerYesMaximum context window size in tokens.
licensingstringYesLicense type: proprietary, open-source, open-weights, or other.
created_atstring (ISO 8601)YesTimestamp when the model was added to the registry.
updated_atstring (ISO 8601)YesTimestamp of the last update to this entry.

Capability Values

ValueDescription
chatMulti-turn conversational interaction
completionSingle-turn text completion
function-callingStructured tool/function invocation
visionImage understanding and analysis
audioAudio input processing
code-generationSpecialized code writing and editing
reasoningExtended chain-of-thought reasoning

Modality Values

ValueDescription
textText input and output
imageImage input (vision)
audioAudio input
codeCode-specific input/output

Provider Schema

A provider represents an inference API endpoint that serves one or more models. The filename must match the id field (e.g., anthropic.yaml).

Example

id: anthropic name: Anthropic description: >- AI safety company providing API access to the Claude family of models, known for helpfulness, harmlessness, and honesty with strong reasoning and analysis capabilities. api_base_url: https://api.anthropic.com/v1 auth_type: api-key regions: - us-east-1 - eu-west-1 compatibility: anthropic created_at: "2024-01-01T00:00:00.000Z" updated_at: "2024-06-15T00:00:00.000Z"

Fields

FieldTypeRequiredDescription
idstringYesUnique identifier for the provider. Must match the filename.
namestringYesHuman-readable display name.
descriptionstringYesBrief description of the provider and its offerings.
api_base_urlstring (URL)YesBase URL for the provider’s API.
auth_typestringYesAuthentication method: api-key, bearer, or oauth2.
regionsstring[]YesAvailable deployment regions.
compatibilitystringYesAPI compatibility format (e.g., openai, anthropic, google).
created_atstring (ISO 8601)YesTimestamp when the provider was added to the registry.
updated_atstring (ISO 8601)YesTimestamp of the last update to this entry.

Auth Type Values

ValueDescription
api-keyAPI key passed via custom header (e.g., x-api-key)
bearerBearer token in the Authorization header
oauth2OAuth 2.0 token exchange flow

Mapping Schema

A mapping connects a model to a specific provider, including pricing, rate limits, and regional availability. Files are organized under mappings/{provider_id}/{model_id}.yaml.

Example

model_id: claude-sonnet-4-5 provider_id: anthropic provider_model_name: claude-sonnet-4-5-20251001 pricing: input_per_million: 3.0 output_per_million: 15.0 currency: USD cache_write_per_million: 0.75 cache_read_per_million: 0.30 rate_limits: requests_per_minute: 100 tokens_per_minute: 200000 context_window_override: null available_regions: - us-east-1 - eu-west-1 created_at: "2025-10-01T00:00:00.000Z" updated_at: "2026-05-01T00:00:00.000Z"

Fields

FieldTypeRequiredDescription
model_idstringYesReferences an existing model id in models/.
provider_idstringYesReferences an existing provider id in providers/.
provider_model_namestringYesThe provider’s internal model identifier used in API calls.
pricingobjectYesPricing details (see sub-fields below).
rate_limitsobjectYesRate limit configuration.
context_window_overrideinteger | nullNoOverride the model’s default context window for this provider. null means use the model default.
available_regionsstring[]YesRegions where this model is available from this provider.
created_atstring (ISO 8601)YesTimestamp when the mapping was added.
updated_atstring (ISO 8601)YesTimestamp of the last update.

Pricing Fields

FieldTypeRequiredDescription
input_per_millionnumberYesCost per million input tokens in the specified currency.
output_per_millionnumberYesCost per million output tokens.
currencystringYesISO 4217 currency code (typically USD).
cache_write_per_millionnumberNoCost per million tokens for prompt cache writes.
cache_read_per_millionnumberNoCost per million tokens for prompt cache reads.
image_per_unitnumberNoCost per image input unit (for vision models).

Rate Limit Fields

FieldTypeRequiredDescription
requests_per_minuteintegerYesMaximum API requests allowed per minute.
tokens_per_minuteintegerYesMaximum tokens processed per minute.

Referential Integrity

The registry enforces referential integrity through automated validation:

  • Every model_id in a mapping must reference an existing file in models/
  • Every provider_id in a mapping must reference an existing file in providers/
  • Mapping files must be placed in the correct provider subdirectory

Validation

All schema validation runs automatically via GitHub Actions on pull requests. The validation pipeline checks:

  1. YAML syntax — Files must be valid, parseable YAML
  2. Required fields — All required fields must be present
  3. Type checking — Field values must match expected types
  4. Referential integrity — Foreign key references must resolve
  5. Naming conventions — Filenames must match their id field

See Contributing: Adding a Model for a step-by-step guide on adding new entries to the registry.

Last updated on