feat(swagger): update swagger (#9587)

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-04-27 23:28:03 +02:00
committed by GitHub
parent ea1df8945b
commit 5efbe8405f
3 changed files with 249 additions and 0 deletions

View File

@@ -907,6 +907,90 @@ const docTemplate = `{
}
}
},
"/api/nodes/{id}/max-replicas-per-model": {
"put": {
"tags": [
"Nodes"
],
"summary": "Update a node's max replicas per model",
"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.UpdateMaxReplicasPerModelRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
},
"400": {
"description": "value must be \u003e= 1",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"404": {
"description": "node not found",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"delete": {
"tags": [
"Nodes"
],
"summary": "Reset a node's max replicas per model 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": [
@@ -2951,6 +3035,15 @@ const docTemplate = `{
}
}
},
"localai.UpdateMaxReplicasPerModelRequest": {
"type": "object",
"properties": {
"value": {
"description": "Value is the new per-model replica cap on this node. Must be \u003e= 1.",
"type": "integer"
}
}
},
"localai.vramEstimateRequest": {
"type": "object",
"properties": {

View File

@@ -904,6 +904,90 @@
}
}
},
"/api/nodes/{id}/max-replicas-per-model": {
"put": {
"tags": [
"Nodes"
],
"summary": "Update a node's max replicas per model",
"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.UpdateMaxReplicasPerModelRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
},
"400": {
"description": "value must be \u003e= 1",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"404": {
"description": "node not found",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
},
"delete": {
"tags": [
"Nodes"
],
"summary": "Reset a node's max replicas per model 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": [
@@ -2948,6 +3032,15 @@
}
}
},
"localai.UpdateMaxReplicasPerModelRequest": {
"type": "object",
"properties": {
"value": {
"description": "Value is the new per-model replica cap on this node. Must be \u003e= 1.",
"type": "integer"
}
}
},
"localai.vramEstimateRequest": {
"type": "object",
"properties": {

View File

@@ -306,6 +306,13 @@ definitions:
success:
type: boolean
type: object
localai.UpdateMaxReplicasPerModelRequest:
properties:
value:
description: Value is the new per-model replica cap on this node. Must be
>= 1.
type: integer
type: object
localai.vramEstimateRequest:
properties:
context_size:
@@ -2714,6 +2721,62 @@ paths:
summary: Estimate VRAM usage for a model
tags:
- config
/api/nodes/{id}/max-replicas-per-model:
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 max replicas per model 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.UpdateMaxReplicasPerModelRequest'
responses:
"200":
description: OK
schema:
additionalProperties:
type: integer
type: object
"400":
description: value must be >= 1
schema:
additionalProperties: true
type: object
"404":
description: node not found
schema:
additionalProperties: true
type: object
summary: Update a node's max replicas per model
tags:
- Nodes
/api/p2p:
get:
responses: