diff --git a/swagger/docs.go b/swagger/docs.go index c471d94d4..e6792fb09 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -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": { diff --git a/swagger/swagger.json b/swagger/swagger.json index 4e42f941b..17eba941d 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -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": { diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 44a0c10c6..62c655ac8 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -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: