Files
LocalAI/addons/quantization/manifest.json
T
Ettore Di Giacinto 1834d4fd72 refactor(addons): make manifest api 2 the only version
No release ever shipped add-ons, so there is no installed base on api 1.
The manifest must now declare api {"min": 2, "max": 2}; a manifest with
api 1, no api or a wider range is refused with a message that names the
range.

Every field that was gated on api 2 is now part of the contract, so the
Min*API constants and their gates are gone, and so are HostAPIMin and
the apiMin host field. Three older-manifest shims go with them: the
resource listing the host implied for one add-on, the legacyArgs hint
for arguments an older version of a tool took, and the tests that
checked the gates. All shipped manifests and the test fixtures declare
api 2.

Assisted-by: Claude:claude-sonnet-5-5 go test
2026-11-03 16:15:07 +00:00

171 lines
5.3 KiB
JSON

{
"schemaVersion": 1,
"id": "quantization",
"version": "0.1.0",
"executable": "quantization",
"os": "linux",
"arch": "amd64",
"host": {
"min": 1,
"max": 1
},
"api": {"min": 2, "max": 2},
"protocol": {
"min": 1,
"max": 1
},
"dataFormat": {
"min": 1,
"max": 1
},
"capabilities": {
"hostOperations": {
"required": [
"quantize.get",
"quantize.import",
"quantize.list",
"quantize.start",
"quantize.stop"
]
},
"tools": [
"resource-exists",
"quantize-list",
"quantize-start",
"quantize-status",
"quantize-stop",
"quantize-import"
],
"toolDefinitions": [
{
"name": "quantize-list",
"kind": "read",
"description": "List the quantization jobs of the person you are talking to, newest first, including jobs started in the web page. A model can only control jobs it started.",
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false
}
},
{
"name": "quantize-start",
"kind": "create",
"description": "Start a new quantization job. In a chat it runs at once and the person can undo it; from an API key it is only a proposal that a person confirms. A model can only control jobs it started.",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A label for the job, 1 to 80 characters.",
"maxLength": 80
},
"model": {
"type": "string",
"description": "Model to quantize as a gallery or Hugging Face ID. A local path is refused.",
"maxLength": 256
},
"backend": {
"type": "string",
"description": "Quantization backend. The default is llama-cpp-quantization.",
"maxLength": 64
},
"quantizationType": {
"type": "string",
"description": "Quantization type, such as q4_k_m (lowercase letters, digits and underscores). The default is q4_k_m.",
"maxLength": 32
}
},
"required": [
"name",
"model"
],
"additionalProperties": false
}
},
{
"name": "quantize-status",
"kind": "read",
"description": "Show the status of a quantization job that a tool started. A model can only control jobs it started.",
"inputSchema": {
"type": "object",
"properties": {
"resourceId": {
"type": "string",
"description": "ID of the quantization job, as returned by a job start. Only a job that a tool started has one."
}
},
"required": [
"resourceId"
],
"additionalProperties": false
}
},
{
"name": "quantize-stop",
"kind": "write",
"description": "Stop a quantization job that a tool started. Stopping cannot be undone. In a chat it runs at once and the person can undo it; from an API key it is only a proposal that a person confirms. A model can only control jobs it started.",
"inputSchema": {
"type": "object",
"properties": {
"resourceId": {
"type": "string",
"description": "ID of the quantization job, as returned by a job start. Only a job that a tool started has one."
}
},
"required": [
"resourceId"
],
"additionalProperties": false
}
},
{
"name": "quantize-import",
"kind": "write",
"description": "Register the result of a quantization job that a tool started as a model. Administrators only. Importing cannot be undone. In a chat it runs at once and the person can undo it; from an API key it is only a proposal that a person confirms. A model can only control jobs it started.",
"inputSchema": {
"type": "object",
"properties": {
"resourceId": {
"type": "string",
"description": "ID of the quantization job, as returned by a job start. Only a job that a tool started has one."
},
"name": {
"type": "string",
"description": "Name of the model, 1 to 64 letters, digits, dots, dashes or underscores. Leave out to let the engine choose.",
"maxLength": 64
}
},
"required": [
"resourceId"
],
"additionalProperties": false
}
}
],
"undo": true,
"resources": {
"noun": "quantization job",
"create": "quantize-start",
"inspect": "quantize-status"
},
"ui": {
"entry": "ui/quantization.js",
"css": [
"ui/quantization.css"
],
"sdk": {
"min": 2,
"max": 2
},
"pages": [
"jobs"
],
"navigation": [],
"mainPage": "jobs",
"icon": "ui/icon.png",
"title": "Quantization",
"description": "Shrink a model to a smaller quantized file, then import it so you can chat with it."
}
}
}