From f8755997cc980e24e676b3ce87f0790e568841eb Mon Sep 17 00:00:00 2001 From: "mudler's LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Tue, 21 Jul 2026 08:47:02 +0200 Subject: [PATCH] feat(swagger): update swagger (#11001) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> --- swagger/docs.go | 20 ++++++++++++++++++++ swagger/swagger.json | 20 ++++++++++++++++++++ swagger/swagger.yaml | 28 ++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) diff --git a/swagger/docs.go b/swagger/docs.go index e6792fb09..d557cef3c 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -3789,6 +3789,15 @@ const docTemplate = `{ } } }, + "gallery.Variant": { + "type": "object", + "properties": { + "model": { + "description": "Model is the name of a gallery entry that declares no variants of its own.", + "type": "string" + } + } + }, "galleryop.NodeProgress": { "type": "object", "properties": { @@ -4008,6 +4017,17 @@ const docTemplate = `{ "items": { "type": "string" } + }, + "variant": { + "description": "Variant installs one specific build of an entry that declares variants,\nnamed as it appears in the entry's ` + "`" + `variants` + "`" + ` list (see the ` + "`" + `variants` + "`" + `\nand ` + "`" + `auto_variant` + "`" + ` fields of the gallery listing). Leave it empty to let\nLocalAI auto-select the largest build this host can actually run.", + "type": "string" + }, + "variants": { + "description": "Variants is an optional, UNORDERED list of alternative builds of the same\nmodel (other backends such as MLX or vLLM, other quantizations) that the\ninstaller may pick instead of this entry's own payload. Authoring is\ndeliberately dumb: name the models, and the selector works out which one\nthis host should get.\n\nThe entry itself is always the last resort, so an entry carrying variants\nstays a complete, installable entry and older LocalAI releases, which drop\nthis key, install it exactly as before.", + "type": "array", + "items": { + "$ref": "#/definitions/gallery.Variant" + } } } }, diff --git a/swagger/swagger.json b/swagger/swagger.json index 17eba941d..4d074a148 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -3786,6 +3786,15 @@ } } }, + "gallery.Variant": { + "type": "object", + "properties": { + "model": { + "description": "Model is the name of a gallery entry that declares no variants of its own.", + "type": "string" + } + } + }, "galleryop.NodeProgress": { "type": "object", "properties": { @@ -4005,6 +4014,17 @@ "items": { "type": "string" } + }, + "variant": { + "description": "Variant installs one specific build of an entry that declares variants,\nnamed as it appears in the entry's `variants` list (see the `variants`\nand `auto_variant` fields of the gallery listing). Leave it empty to let\nLocalAI auto-select the largest build this host can actually run.", + "type": "string" + }, + "variants": { + "description": "Variants is an optional, UNORDERED list of alternative builds of the same\nmodel (other backends such as MLX or vLLM, other quantizations) that the\ninstaller may pick instead of this entry's own payload. Authoring is\ndeliberately dumb: name the models, and the selector works out which one\nthis host should get.\n\nThe entry itself is always the last resort, so an entry carrying variants\nstays a complete, installable entry and older LocalAI releases, which drop\nthis key, install it exactly as before.", + "type": "array", + "items": { + "$ref": "#/definitions/gallery.Variant" + } } } }, diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 62c655ac8..e28632183 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -210,6 +210,13 @@ definitions: $ref: '#/definitions/gallery.NodeDriftInfo' type: array type: object + gallery.Variant: + properties: + model: + description: Model is the name of a gallery entry that declares no variants + of its own. + type: string + type: object galleryop.NodeProgress: properties: current: @@ -372,6 +379,27 @@ definitions: items: type: string type: array + variant: + description: |- + Variant installs one specific build of an entry that declares variants, + named as it appears in the entry's `variants` list (see the `variants` + and `auto_variant` fields of the gallery listing). Leave it empty to let + LocalAI auto-select the largest build this host can actually run. + type: string + variants: + description: |- + Variants is an optional, UNORDERED list of alternative builds of the same + model (other backends such as MLX or vLLM, other quantizations) that the + installer may pick instead of this entry's own payload. Authoring is + deliberately dumb: name the models, and the selector works out which one + this host should get. + + The entry itself is always the last resort, so an entry carrying variants + stays a complete, installable entry and older LocalAI releases, which drop + this key, install it exactly as before. + items: + $ref: '#/definitions/gallery.Variant' + type: array type: object localai.ModelResponse: properties: