feat(swagger): update swagger (#10847)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
This commit is contained in:
LocalAI [bot]
2026-07-16 08:53:02 +02:00
committed by GitHub
parent 688f904a10
commit ff8774327f
3 changed files with 273 additions and 0 deletions

View File

@@ -1124,6 +1124,90 @@ const docTemplate = `{
}
}
},
"/api/nodes/{id}/vram-budget": {
"put": {
"tags": [
"Nodes"
],
"summary": "Update a node's VRAM allocation budget",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "New value (\\",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/localai.UpdateVRAMBudgetRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "invalid budget",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"404": {
"description": "node not found",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"delete": {
"tags": [
"Nodes"
],
"summary": "Reset a node's VRAM budget to the worker default",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
},
"404": {
"description": "node not found",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api/p2p": {
"get": {
"tags": [
@@ -3748,6 +3832,9 @@ const docTemplate = `{
"description": "Cancelled is true if the operation was cancelled",
"type": "boolean"
},
"current_bytes": {
"type": "integer"
},
"deletion": {
"description": "Deletion is true if the operation is a deletion",
"type": "boolean"
@@ -3774,11 +3861,17 @@ const docTemplate = `{
"$ref": "#/definitions/galleryop.NodeProgress"
}
},
"phase": {
"type": "string"
},
"processed": {
"type": "boolean"
},
"progress": {
"type": "number"
},
"total_bytes": {
"type": "integer"
}
}
},
@@ -3951,6 +4044,15 @@ const docTemplate = `{
}
}
},
"localai.UpdateVRAMBudgetRequest": {
"type": "object",
"properties": {
"value": {
"description": "Value is the VRAM cap (\"80%\" or \"12GB\"). Empty string clears the cap.",
"type": "string"
}
}
},
"localai.VoiceProfileListResponse": {
"type": "object",
"properties": {

View File

@@ -1121,6 +1121,90 @@
}
}
},
"/api/nodes/{id}/vram-budget": {
"put": {
"tags": [
"Nodes"
],
"summary": "Update a node's VRAM allocation budget",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "New value (\\",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/localai.UpdateVRAMBudgetRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "invalid budget",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"404": {
"description": "node not found",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"delete": {
"tags": [
"Nodes"
],
"summary": "Reset a node's VRAM budget to the worker default",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
},
"404": {
"description": "node not found",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api/p2p": {
"get": {
"tags": [
@@ -3745,6 +3829,9 @@
"description": "Cancelled is true if the operation was cancelled",
"type": "boolean"
},
"current_bytes": {
"type": "integer"
},
"deletion": {
"description": "Deletion is true if the operation is a deletion",
"type": "boolean"
@@ -3771,11 +3858,17 @@
"$ref": "#/definitions/galleryop.NodeProgress"
}
},
"phase": {
"type": "string"
},
"processed": {
"type": "boolean"
},
"progress": {
"type": "number"
},
"total_bytes": {
"type": "integer"
}
}
},
@@ -3948,6 +4041,15 @@
}
}
},
"localai.UpdateVRAMBudgetRequest": {
"type": "object",
"properties": {
"value": {
"description": "Value is the VRAM cap (\"80%\" or \"12GB\"). Empty string clears the cap.",
"type": "string"
}
}
},
"localai.VoiceProfileListResponse": {
"type": "object",
"properties": {

View File

@@ -239,6 +239,8 @@ definitions:
cancelled:
description: Cancelled is true if the operation was cancelled
type: boolean
current_bytes:
type: integer
deletion:
description: Deletion is true if the operation is a deletion
type: boolean
@@ -262,10 +264,14 @@ definitions:
items:
$ref: '#/definitions/galleryop.NodeProgress'
type: array
phase:
type: string
processed:
type: boolean
progress:
type: number
total_bytes:
type: integer
type: object
localai.APIInstructionResponse:
properties:
@@ -390,6 +396,13 @@ definitions:
>= 1.
type: integer
type: object
localai.UpdateVRAMBudgetRequest:
properties:
value:
description: Value is the VRAM cap ("80%" or "12GB"). Empty string clears
the cap.
type: string
type: object
localai.VoiceProfileListResponse:
properties:
data:
@@ -3400,6 +3413,62 @@ paths:
summary: Update a node's max replicas per model
tags:
- Nodes
/api/nodes/{id}/vram-budget:
delete:
parameters:
- description: Node ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
additionalProperties:
type: boolean
type: object
"404":
description: node not found
schema:
additionalProperties: true
type: object
summary: Reset a node's VRAM budget to the worker default
tags:
- Nodes
put:
parameters:
- description: Node ID
in: path
name: id
required: true
type: string
- description: New value (\
in: body
name: request
required: true
schema:
$ref: '#/definitions/localai.UpdateVRAMBudgetRequest'
responses:
"200":
description: OK
schema:
additionalProperties:
type: string
type: object
"400":
description: invalid budget
schema:
additionalProperties: true
type: object
"404":
description: node not found
schema:
additionalProperties: true
type: object
summary: Update a node's VRAM allocation budget
tags:
- Nodes
/api/nodes/models:
get:
responses: