|
45 | 45 | "type": "integer", |
46 | 46 | "minimum": 1 |
47 | 47 | }, |
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" |
64 | 51 | }, |
65 | 52 | "knowledge_cutoff": { |
66 | 53 | "description": "The training data cutoff date for the model", |
|
76 | 63 | "type": "array", |
77 | 64 | "items": { |
78 | 65 | "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"] |
80 | 96 | }, |
| 97 | + "default": ["text"], |
81 | 98 | "uniqueItems": true, |
82 | 99 | "minItems": 1 |
83 | 100 | }, |
|
114 | 131 | "model_id_on_provider": { |
115 | 132 | "description": "The model ID as used by this specific provider (may differ from model_id)", |
116 | 133 | "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" |
117 | 143 | } |
118 | 144 | }, |
119 | 145 | "required": ["provider_id"] |
120 | 146 | }, |
| 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 | + }, |
121 | 215 | "tokenizer_config": { |
122 | 216 | "type": "object", |
123 | 217 | "description": "Tokenizer family and the specific encoding/version identifier within that family", |
124 | 218 | "properties": { |
125 | 219 | "family": { |
126 | 220 | "description": "Tokenizer library or system (example: tiktoken, tekken, sentencepiece)", |
127 | 221 | "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 | + ] |
129 | 230 | }, |
130 | 231 | "name": { |
131 | 232 | "description": "The encoding or version identifier within the family (example: 'cl100k_base' for tiktoken, 'v3' for tekken)", |
|
0 commit comments