Skip to content

Commit 9d69ee2

Browse files
ericrallengl1tch
andcommitted
Release packages v0.4.0
- switch pricing metadata to per-million-token units - add provider-specific pricing and YAML schema hints - cross-check model routes against models.dev and OpenRouter Co-Authored-By: gl1tch <gl1tch.engram@protonmail.com>
1 parent 77eafce commit 9d69ee2

100 files changed

Lines changed: 2794 additions & 1316 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"yaml.schemas": {
3+
"./model-metadata.schema.json": "models/*.yaml",
4+
"./provider.schema.json": "providers/*.yaml"
5+
}
6+
}

README.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Model Metadata Central
22

3-
A centralized, language-agnostic, open-source approach to storing and sharing model definitions like context windows, cost per token, etc.
3+
A centralized, language-agnostic, open-source approach to storing and sharing model definitions like context windows, token pricing, providers, and modality support.
44

55
**Note**: This project does not strive to be an exhaustive registry of every model, but a registry that I can use in my own projects to provide consistent, sane defaults for model and provider selection for provider and model agnostic projects where the user can configure which models and providers they want to use.
66

@@ -54,12 +54,12 @@ These schema defines properties that are relevant to the model and developers wh
5454
- `model_description`: A human-friendly description of the model
5555
- `model_version`: The version of the model
5656
- **Example** `0613`
57-
- `cost_per_token`: The cost per token in USD
57+
- `cost_per_million_tokens`: The token cost in USD per 1,000,000 tokens
5858
- **Example**: `json {
59-
"input": 0.0000015,
60-
"output": 0.000002
59+
"input": 1.5,
60+
"output": 2
6161
}`
62-
- **Note**: supports either a basic number or an object with `input` and `output` numbers to define different costs between input tokens and output tokens
62+
- **Note**: supports `input`, `cached_input`, `cache_write_input`, and `output`. Each value may be a number or a modality map such as `{ "text": 1.5, "audio": 10 }`.
6363
- `knowledge_cutoff`: The training data cutoff date for the model
6464
- **Note**: This is helpful when dealing with applications where you may need to know if you should supplement the model's training data with more recent information
6565
- `tokenizer`: What type of tokenization the model uses
@@ -80,10 +80,18 @@ These schema defines properties that are relevant to the model and developers wh
8080
model_id_on_provider: gpt-4o
8181
- provider_id: openrouter
8282
model_id_on_provider: openai/gpt-4o
83+
model_info: https://openrouter.ai/openai/gpt-4o
84+
cost_per_million_tokens:
85+
input: 2.5
86+
output: 10
8387
```
84-
- **Note**: Allows a single model to be accessed via direct provider API or aggregator. Provider definitions live in `/providers`.
88+
- **Note**: Allows a single model to be accessed via direct provider API or aggregator, with provider-specific model IDs, info links, and pricing overrides. Provider definitions live in `/providers`.
8589
- `meta_model`: If the model is a meta model, like [OpenRouter's Auto Router](https://openrouter.ai/openrouter/auto), this field indicates that the model may have special treatment for context, tokenization, and cost
8690

91+
### YAML Editor Hints
92+
93+
This repo includes `.vscode/settings.json` schema associations for `models/*.yaml` and `providers/*.yaml`. In VS Code with a YAML language server, those associations provide key completion, validation, and hover descriptions from the JSON Schemas.
94+
8795
### Provider Schema
8896

8997
Provider definitions in [`providers/`](./providers) describe API endpoints and routing. See [`provider.schema.json`](./provider.schema.json).
@@ -121,7 +129,7 @@ status: active
121129

122130
### Included Models
123131

124-
66 active models across 12 primary model providers (deprecated models exist in [`/models`](./models) but are excluded from this list). Provider definitions cover 17 direct/local/aggregator routes.
132+
73 model definitions across direct, local, and aggregator providers. Provider definitions cover 18 direct/local/aggregator routes.
125133

126134
**OpenAI**:
127135

@@ -148,13 +156,11 @@ status: active
148156

149157
**Anthropic**:
150158

151-
- `claude-haiku-4`
152159
- `claude-haiku-4-5`
153160
- `claude-opus-4-6`
154161
- `claude-opus-4-6-fast`
155162
- `claude-opus-4-7`
156163
- `claude-opus-latest`
157-
- `claude-sonnet-4-2`
158164
- `claude-sonnet-4-6`
159165

160166
**Google**:
@@ -166,19 +172,17 @@ status: active
166172

167173
**DeepSeek**:
168174

169-
- `deepseek-coder-v4`
170175
- `deepseek-v4-flash`
171176
- `deepseek-v4-pro`
172177

173178
**xAI**:
174179

175-
- `grok-4.2`
176-
- `grok-4.2-multi-agent`
180+
- `grok-4.20`
181+
- `grok-4.20-multi-agent`
177182

178183
**Moonshot AI**:
179184

180185
- `kimi-k2.6`
181-
- `kimi-v3`
182186

183187
**Mistral AI**:
184188

@@ -194,11 +198,11 @@ status: active
194198

195199
- `minimax-m2`
196200
- `minimax-m2.1`
197-
- `minimax-m2.1-highspeed`
198201
- `minimax-m2.5`
199202
- `minimax-m2.5-highspeed`
200203
- `minimax-m2.7`
201204
- `minimax-m2.7-highspeed`
205+
- `minimax-m3`
202206

203207
**Z.AI**:
204208

@@ -214,6 +218,11 @@ status: active
214218
- `qwen3-32b`
215219
- `qwen3.6-flash`
216220
- `qwen3.6-plus`
221+
- `qwen3.7-plus`
222+
223+
**Claudinio**:
224+
225+
- `claudinio-essential`
217226

218227
**Groq**:
219228

model-metadata.schema.json

Lines changed: 119 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,9 @@
4545
"type": "integer",
4646
"minimum": 1
4747
},
48-
"cost_per_token": {
49-
"description": "The cost per token in USD",
50-
"type": ["object", "number"],
51-
"minimum": 0,
52-
"properties": {
53-
"input": {
54-
"description": "The cost per token of input send to the model",
55-
"type": "number",
56-
"minimum": 0
57-
},
58-
"output": {
59-
"description": "The cost per token of output generated by the model",
60-
"type": "number",
61-
"minimum": 0
62-
}
63-
}
48+
"cost_per_million_tokens": {
49+
"description": "The model provider's default token pricing in USD per 1,000,000 tokens. Provider-specific entries may override this on individual providers.",
50+
"$ref": "#/$defs/token_costs"
6451
},
6552
"knowledge_cutoff": {
6653
"description": "The training data cutoff date for the model",
@@ -76,8 +63,38 @@
7663
"type": "array",
7764
"items": {
7865
"type": "string",
79-
"enum": ["function", "instruction", "code", "multilingual", "multimodal"]
66+
"enum": [
67+
"function",
68+
"instruction",
69+
"code",
70+
"multilingual",
71+
"multimodal",
72+
"structured",
73+
"reasoning"
74+
]
75+
},
76+
"uniqueItems": true,
77+
"minItems": 1
78+
},
79+
"input_type": {
80+
"description": "The type of input the model accepts",
81+
"type": "array",
82+
"items": {
83+
"type": "string",
84+
"enum": ["text", "image", "audio", "video", "other"]
85+
},
86+
"default": ["text"],
87+
"uniqueItems": true,
88+
"minItems": 1
89+
},
90+
"output_type": {
91+
"description": "The type of output the model generates",
92+
"type": "array",
93+
"items": {
94+
"type": "string",
95+
"enum": ["text", "image", "audio", "video", "other"]
8096
},
97+
"default": ["text"],
8198
"uniqueItems": true,
8299
"minItems": 1
83100
},
@@ -114,18 +131,102 @@
114131
"model_id_on_provider": {
115132
"description": "The model ID as used by this specific provider (may differ from model_id)",
116133
"type": "string"
134+
},
135+
"model_info": {
136+
"description": "Provider-specific link to this model, such as an aggregator listing or provider docs page",
137+
"type": "string",
138+
"format": "uri"
139+
},
140+
"cost_per_million_tokens": {
141+
"description": "Provider-specific token pricing in USD per 1,000,000 tokens. Use this when an aggregator or route prices the model differently from the primary provider.",
142+
"$ref": "#/$defs/token_costs"
117143
}
118144
},
119145
"required": ["provider_id"]
120146
},
147+
"token_costs": {
148+
"type": "object",
149+
"description": "Token pricing in USD per 1,000,000 tokens. Each direction may be a single number or a map of modality-specific prices.",
150+
"properties": {
151+
"input": {
152+
"description": "Input token cost. May be a single blended price or modality-specific prices.",
153+
"$ref": "#/$defs/token_cost_value"
154+
},
155+
"cached_input": {
156+
"description": "Cached input token read cost, when the provider exposes separate cache pricing.",
157+
"$ref": "#/$defs/token_cost_value"
158+
},
159+
"cache_write_input": {
160+
"description": "Cache write input token cost, when the provider exposes separate cache pricing.",
161+
"$ref": "#/$defs/token_cost_value"
162+
},
163+
"output": {
164+
"description": "Output token cost. May be a single blended price or modality-specific prices.",
165+
"$ref": "#/$defs/token_cost_value"
166+
}
167+
},
168+
"additionalProperties": false
169+
},
170+
"token_cost_value": {
171+
"description": "A token price in USD per 1,000,000 tokens, either as one number or split by modality.",
172+
"oneOf": [
173+
{
174+
"type": "number",
175+
"minimum": 0
176+
},
177+
{
178+
"$ref": "#/$defs/modality_costs"
179+
}
180+
]
181+
},
182+
"modality_costs": {
183+
"type": "object",
184+
"description": "Modality-specific token prices in USD per 1,000,000 tokens.",
185+
"properties": {
186+
"text": {
187+
"description": "Text token cost in USD per 1,000,000 tokens.",
188+
"type": "number",
189+
"minimum": 0
190+
},
191+
"image": {
192+
"description": "Image token cost in USD per 1,000,000 tokens.",
193+
"type": "number",
194+
"minimum": 0
195+
},
196+
"audio": {
197+
"description": "Audio token cost in USD per 1,000,000 tokens.",
198+
"type": "number",
199+
"minimum": 0
200+
},
201+
"video": {
202+
"description": "Video token cost in USD per 1,000,000 tokens.",
203+
"type": "number",
204+
"minimum": 0
205+
},
206+
"other": {
207+
"description": "Other or provider-specific token cost in USD per 1,000,000 tokens.",
208+
"type": "number",
209+
"minimum": 0
210+
}
211+
},
212+
"additionalProperties": false,
213+
"minProperties": 1
214+
},
121215
"tokenizer_config": {
122216
"type": "object",
123217
"description": "Tokenizer family and the specific encoding/version identifier within that family",
124218
"properties": {
125219
"family": {
126220
"description": "Tokenizer library or system (example: tiktoken, tekken, sentencepiece)",
127221
"type": "string",
128-
"enum": ["tiktoken", "tekken", "sentencepiece", "huggingface", "other", "unknown"]
222+
"enum": [
223+
"tiktoken",
224+
"tekken",
225+
"sentencepiece",
226+
"huggingface",
227+
"other",
228+
"unknown"
229+
]
129230
},
130231
"name": {
131232
"description": "The encoding or version identifier within the family (example: 'cl100k_base' for tiktoken, 'v3' for tekken)",

models/claude-haiku-4-5.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ model_info: https://docs.anthropic.com/en/docs/about-claude/models/overview
66
model_type: chat
77
context_window: 200000
88
max_tokens: 64000
9-
cost_per_token:
10-
input: 0.000001
11-
output: 0.000005
9+
cost_per_million_tokens:
10+
input: 1
11+
output: 5
1212
knowledge_cutoff: "2025-02-28"
1313
tuning: [multimodal, function]
14+
input_type: [text, image]
15+
output_type: [text]
1416
providers:
1517
- provider_id: anthropic
1618
model_id_on_provider: claude-haiku-4-5
1719
- provider_id: openrouter
1820
model_id_on_provider: anthropic/claude-haiku-4.5
21+
model_info: https://openrouter.ai/anthropic/claude-haiku-4.5

models/claude-haiku-4.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

models/claude-opus-4-6-fast.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ model_description: High-speed variant of Opus 4.6. Optimized for rapid responses
55
model_info: https://docs.anthropic.com/en/docs/models/claude-opus-4-6
66
model_type: chat
77
context_window: 1000000
8-
cost_per_token:
9-
input: 0.000030
10-
output: 0.000150
8+
cost_per_million_tokens:
9+
input: 30
10+
output: 150
1111
tuning: [function]
12+
input_type: [text, image]
13+
output_type: [text]
1214
providers:
13-
- provider_id: anthropic
14-
model_id_on_provider: claude-opus-4-6-fast
1515
- provider_id: openrouter
16-
model_id_on_provider: anthropic/claude-opus-4-6-fast
16+
model_id_on_provider: anthropic/claude-opus-4.6-fast
17+
model_info: https://openrouter.ai/anthropic/claude-opus-4.6-fast

models/claude-opus-4-6.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ model_info: https://docs.anthropic.com/en/docs/about-claude/models/overview
66
model_type: chat
77
context_window: 1000000
88
max_tokens: 128000
9-
cost_per_token:
10-
input: 0.000005
11-
output: 0.000025
9+
cost_per_million_tokens:
10+
input: 5
11+
output: 25
1212
knowledge_cutoff: "2025-05-31"
1313
tuning: [multimodal, function]
14+
input_type: [text, image]
15+
output_type: [text]
1416
providers:
1517
- provider_id: anthropic
1618
model_id_on_provider: claude-opus-4-6
1719
- provider_id: openrouter
1820
model_id_on_provider: anthropic/claude-opus-4.6
21+
model_info: https://openrouter.ai/anthropic/claude-opus-4.6

models/claude-opus-4-7.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ model_description: Anthropic's most capable model. Exceptional at complex reason
55
model_info: https://docs.anthropic.com/en/docs/models/claude-opus-4-7
66
model_type: chat
77
context_window: 1000000
8-
cost_per_token:
9-
input: 0.000005
10-
output: 0.000025
8+
cost_per_million_tokens:
9+
input: 5
10+
output: 25
1111
tuning: [function]
12+
input_type: [text, image]
13+
output_type: [text]
1214
providers:
1315
- provider_id: anthropic
1416
model_id_on_provider: claude-opus-4-7
1517
- provider_id: openrouter
16-
model_id_on_provider: anthropic/claude-opus-4-7
18+
model_id_on_provider: anthropic/claude-opus-4.7
19+
model_info: https://openrouter.ai/anthropic/claude-opus-4.7

0 commit comments

Comments
 (0)