|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$id": "https://www.schemastore.org/modelparams.json", |
| 4 | + "$ref": "#/definitions/Model", |
| 5 | + "title": "modelparams.dev Model", |
| 6 | + "description": "Schema for a single AI model variant entry in the modelparams.dev catalog. Documentation: https://github.com/mnfst/modelparams.dev/blob/main/docs/model-parameters-schema.md", |
| 7 | + "definitions": { |
| 8 | + "Model": { |
| 9 | + "type": "object", |
| 10 | + "properties": { |
| 11 | + "provider": { |
| 12 | + "type": "string", |
| 13 | + "minLength": 1, |
| 14 | + "pattern": "^[a-z0-9][a-z0-9-]*$" |
| 15 | + }, |
| 16 | + "authType": { |
| 17 | + "type": "string", |
| 18 | + "enum": ["api_key", "subscription"] |
| 19 | + }, |
| 20 | + "model": { |
| 21 | + "type": "string", |
| 22 | + "minLength": 1, |
| 23 | + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$" |
| 24 | + }, |
| 25 | + "params": { |
| 26 | + "type": "array", |
| 27 | + "items": { |
| 28 | + "anyOf": [ |
| 29 | + { |
| 30 | + "type": "object", |
| 31 | + "properties": { |
| 32 | + "path": { |
| 33 | + "type": "string", |
| 34 | + "minLength": 1, |
| 35 | + "pattern": "^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)*$" |
| 36 | + }, |
| 37 | + "label": { |
| 38 | + "type": "string", |
| 39 | + "minLength": 1, |
| 40 | + "maxLength": 80 |
| 41 | + }, |
| 42 | + "description": { |
| 43 | + "type": "string", |
| 44 | + "minLength": 1, |
| 45 | + "maxLength": 500 |
| 46 | + }, |
| 47 | + "group": { |
| 48 | + "type": "string", |
| 49 | + "enum": [ |
| 50 | + "generation_length", |
| 51 | + "sampling", |
| 52 | + "reasoning", |
| 53 | + "tooling", |
| 54 | + "output_format", |
| 55 | + "observability", |
| 56 | + "provider_metadata" |
| 57 | + ] |
| 58 | + }, |
| 59 | + "applicability": { |
| 60 | + "type": "object", |
| 61 | + "properties": { |
| 62 | + "only": { |
| 63 | + "anyOf": [ |
| 64 | + { |
| 65 | + "type": "object", |
| 66 | + "additionalProperties": { |
| 67 | + "anyOf": [ |
| 68 | + { |
| 69 | + "anyOf": [ |
| 70 | + { |
| 71 | + "type": "string" |
| 72 | + }, |
| 73 | + { |
| 74 | + "type": "number" |
| 75 | + }, |
| 76 | + { |
| 77 | + "type": "boolean" |
| 78 | + }, |
| 79 | + { |
| 80 | + "type": "null" |
| 81 | + } |
| 82 | + ] |
| 83 | + }, |
| 84 | + { |
| 85 | + "type": "array", |
| 86 | + "items": { |
| 87 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability/properties/only/anyOf/0/additionalProperties/anyOf/0" |
| 88 | + }, |
| 89 | + "minItems": 1 |
| 90 | + }, |
| 91 | + { |
| 92 | + "type": "object", |
| 93 | + "properties": { |
| 94 | + "not": { |
| 95 | + "anyOf": [ |
| 96 | + { |
| 97 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability/properties/only/anyOf/0/additionalProperties/anyOf/0" |
| 98 | + }, |
| 99 | + { |
| 100 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability/properties/only/anyOf/0/additionalProperties/anyOf/1" |
| 101 | + } |
| 102 | + ] |
| 103 | + } |
| 104 | + }, |
| 105 | + "required": ["not"], |
| 106 | + "additionalProperties": false |
| 107 | + } |
| 108 | + ] |
| 109 | + }, |
| 110 | + "propertyNames": { |
| 111 | + "pattern": "^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)*$" |
| 112 | + } |
| 113 | + }, |
| 114 | + { |
| 115 | + "type": "array", |
| 116 | + "items": { |
| 117 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability/properties/only/anyOf/0" |
| 118 | + }, |
| 119 | + "minItems": 1 |
| 120 | + } |
| 121 | + ] |
| 122 | + }, |
| 123 | + "except": { |
| 124 | + "anyOf": [ |
| 125 | + { |
| 126 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability/properties/only/anyOf/0" |
| 127 | + }, |
| 128 | + { |
| 129 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability/properties/only/anyOf/1" |
| 130 | + } |
| 131 | + ] |
| 132 | + } |
| 133 | + }, |
| 134 | + "additionalProperties": false |
| 135 | + }, |
| 136 | + "type": { |
| 137 | + "type": "string", |
| 138 | + "const": "boolean" |
| 139 | + }, |
| 140 | + "default": { |
| 141 | + "type": "boolean" |
| 142 | + } |
| 143 | + }, |
| 144 | + "required": ["path", "label", "description", "group", "type"], |
| 145 | + "additionalProperties": false |
| 146 | + }, |
| 147 | + { |
| 148 | + "type": "object", |
| 149 | + "properties": { |
| 150 | + "path": { |
| 151 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/path" |
| 152 | + }, |
| 153 | + "label": { |
| 154 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/label" |
| 155 | + }, |
| 156 | + "description": { |
| 157 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/description" |
| 158 | + }, |
| 159 | + "group": { |
| 160 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/group" |
| 161 | + }, |
| 162 | + "applicability": { |
| 163 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability" |
| 164 | + }, |
| 165 | + "type": { |
| 166 | + "type": "string", |
| 167 | + "const": "enum" |
| 168 | + }, |
| 169 | + "default": { |
| 170 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability/properties/only/anyOf/0/additionalProperties/anyOf/0" |
| 171 | + }, |
| 172 | + "values": { |
| 173 | + "type": "array", |
| 174 | + "items": { |
| 175 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability/properties/only/anyOf/0/additionalProperties/anyOf/0" |
| 176 | + }, |
| 177 | + "minItems": 1 |
| 178 | + } |
| 179 | + }, |
| 180 | + "required": [ |
| 181 | + "path", |
| 182 | + "label", |
| 183 | + "description", |
| 184 | + "group", |
| 185 | + "type", |
| 186 | + "values" |
| 187 | + ], |
| 188 | + "additionalProperties": false |
| 189 | + }, |
| 190 | + { |
| 191 | + "type": "object", |
| 192 | + "properties": { |
| 193 | + "path": { |
| 194 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/path" |
| 195 | + }, |
| 196 | + "label": { |
| 197 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/label" |
| 198 | + }, |
| 199 | + "description": { |
| 200 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/description" |
| 201 | + }, |
| 202 | + "group": { |
| 203 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/group" |
| 204 | + }, |
| 205 | + "applicability": { |
| 206 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability" |
| 207 | + }, |
| 208 | + "type": { |
| 209 | + "type": "string", |
| 210 | + "const": "integer" |
| 211 | + }, |
| 212 | + "default": { |
| 213 | + "type": "integer" |
| 214 | + }, |
| 215 | + "range": { |
| 216 | + "type": "object", |
| 217 | + "properties": { |
| 218 | + "min": { |
| 219 | + "type": "number" |
| 220 | + }, |
| 221 | + "max": { |
| 222 | + "type": "number" |
| 223 | + }, |
| 224 | + "step": { |
| 225 | + "type": "number", |
| 226 | + "exclusiveMinimum": 0 |
| 227 | + } |
| 228 | + }, |
| 229 | + "additionalProperties": false |
| 230 | + } |
| 231 | + }, |
| 232 | + "required": ["path", "label", "description", "group", "type"], |
| 233 | + "additionalProperties": false |
| 234 | + }, |
| 235 | + { |
| 236 | + "type": "object", |
| 237 | + "properties": { |
| 238 | + "path": { |
| 239 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/path" |
| 240 | + }, |
| 241 | + "label": { |
| 242 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/label" |
| 243 | + }, |
| 244 | + "description": { |
| 245 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/description" |
| 246 | + }, |
| 247 | + "group": { |
| 248 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/group" |
| 249 | + }, |
| 250 | + "applicability": { |
| 251 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability" |
| 252 | + }, |
| 253 | + "type": { |
| 254 | + "type": "string", |
| 255 | + "const": "number" |
| 256 | + }, |
| 257 | + "default": { |
| 258 | + "type": "number" |
| 259 | + }, |
| 260 | + "range": { |
| 261 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/2/properties/range" |
| 262 | + } |
| 263 | + }, |
| 264 | + "required": ["path", "label", "description", "group", "type"], |
| 265 | + "additionalProperties": false |
| 266 | + }, |
| 267 | + { |
| 268 | + "type": "object", |
| 269 | + "properties": { |
| 270 | + "path": { |
| 271 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/path" |
| 272 | + }, |
| 273 | + "label": { |
| 274 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/label" |
| 275 | + }, |
| 276 | + "description": { |
| 277 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/description" |
| 278 | + }, |
| 279 | + "group": { |
| 280 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/group" |
| 281 | + }, |
| 282 | + "applicability": { |
| 283 | + "$ref": "#/definitions/Model/properties/params/items/anyOf/0/properties/applicability" |
| 284 | + }, |
| 285 | + "type": { |
| 286 | + "type": "string", |
| 287 | + "const": "string" |
| 288 | + }, |
| 289 | + "default": { |
| 290 | + "type": "string" |
| 291 | + } |
| 292 | + }, |
| 293 | + "required": ["path", "label", "description", "group", "type"], |
| 294 | + "additionalProperties": false |
| 295 | + } |
| 296 | + ] |
| 297 | + } |
| 298 | + } |
| 299 | + }, |
| 300 | + "required": ["provider", "authType", "model", "params"], |
| 301 | + "additionalProperties": false |
| 302 | + } |
| 303 | + } |
| 304 | +} |
0 commit comments