Files
LocalAI/core/schema/gallery-model.schema.json
Ettore Di Giacinto d0d441bb43 feat(gallery): add nanbeige4.1-3b meta entry with hardware-resolved variants
Adds the first real meta entry to the gallery index. It resolves to the
Q8_0 build on hosts with at least 6GiB of VRAM and to the Q4_K_M build
everywhere else, installing either payload under the stable name
nanbeige4.1-3b.

The entry carries a url equal to its final candidate's url. LocalAI
releases that predate candidates support parse the index non-strictly
and drop the key silently, so without that url they would list the entry
and install nothing. A regression spec parses the index the way those
releases do and asserts every meta entry stays installable for them.

Also teaches core/schema/gallery-model.schema.json about candidates. The
schema sets additionalProperties: false at the top level, so an author
following CONTRIBUTING.md and adding the yaml-language-server comment
would otherwise get a validation error on this entry.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-07-18 11:41:16 +00:00

116 lines
3.5 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/mudler/LocalAI/main/schemas/gallery.model.schema.json",
"title": "LocalAI Gallery Model Spec",
"description": "Schema for LocalAI gallery model YAML files",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Model name"
},
"description": {
"type": "string",
"description": "Human-readable description of the model"
},
"icon": {
"type": "string",
"description": "Optional icon reference or URL"
},
"license": {
"type": "string",
"description": "Model license identifier or text"
},
"urls": {
"type": "array",
"description": "URLs pointing to remote model configuration",
"items": {
"type": "string",
"format": "uri"
}
},
"config_file": {
"type": "string",
"description": "Inline YAML configuration that will be written to the model config file"
},
"files": {
"type": "array",
"description": "Files to download and install for this model",
"items": {
"type": "object",
"required": ["filename", "uri"],
"properties": {
"filename": {
"type": "string"
},
"sha256": {
"type": "string",
"description": "Optional SHA256 checksum for file verification"
},
"uri": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
}
},
"candidates": {
"type": "array",
"description": "Ordered variant list of a meta entry. The first candidate the host satisfies is installed, under the meta entry's own name. An entry carrying candidates must not also carry files or config_file.",
"minItems": 1,
"items": {
"type": "object",
"required": ["model"],
"properties": {
"model": {
"type": "string",
"description": "Name of a concrete (non-meta) gallery entry"
},
"capability": {
"type": "string",
"description": "Host capability this candidate requires, matched exactly and case-sensitively (for example metal, nvidia-cuda-12). Absent matches any host."
},
"min_vram": {
"type": "string",
"description": "Authored VRAM floor, for example 20GiB. Authoritative: inference never overwrites it."
},
"backend": {
"type": "string",
"description": "Denormalized by the nightly job for display. Never authored by hand."
},
"quantization": {
"type": "string",
"description": "Denormalized by the nightly job for display. Never authored by hand."
},
"inferred_min_vram": {
"type": "string",
"description": "Denormalized by the nightly job as a fallback floor. Never authored by hand; min_vram wins."
}
},
"additionalProperties": false
}
},
"prompt_templates": {
"type": "array",
"description": "Prompt templates written as .tmpl files",
"items": {
"type": "object",
"required": ["name", "content"],
"properties": {
"name": {
"type": "string"
},
"content": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}