Skip to content

Commit 796fcfa

Browse files
authored
Sync lmstudio.js schema (2025-03-20) (#56)
* Breaking change: gpuOffload -> gpu in model loading config * gpuStrictVramCap is expected to be a temporary spelling * Add docstring caveats on config API stability
1 parent d2ce49e commit 796fcfa

File tree

8 files changed

+593
-64
lines changed

8 files changed

+593
-64
lines changed

sdk-schema/lms-with-inferred-unions.json

Lines changed: 155 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,16 @@
6767
},
6868
{
6969
"$ref": "#/definitions/presetManifest"
70+
},
71+
{
72+
"$ref": "#/definitions/modelManifest"
7073
}
7174
],
7275
"discriminator": {
7376
"mapping": {
7477
"plugin": "#/definitions/pluginManifest",
75-
"preset": "#/definitions/presetManifest"
78+
"preset": "#/definitions/presetManifest",
79+
"model": "#/definitions/modelManifest"
7680
},
7781
"propertyName": "type"
7882
}
@@ -84,10 +88,14 @@
8488
"$ref": "#/definitions/kebabCase"
8589
},
8690
"name": {
87-
"$ref": "#/definitions/kebabCase"
91+
"type": "string",
92+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
93+
"minLength": 1,
94+
"maxLength": 100
8895
},
8996
"description": {
90-
"type": "string"
97+
"type": "string",
98+
"maxLength": 1000
9199
},
92100
"revision": {
93101
"type": "integer"
@@ -425,7 +433,7 @@
425433
"embeddingLoadModelConfig": {
426434
"type": "object",
427435
"properties": {
428-
"gpuOffload": {
436+
"gpu": {
429437
"$ref": "#/definitions/gpuSetting"
430438
},
431439
"contextLength": {
@@ -592,6 +600,9 @@
592600
},
593601
{
594602
"$ref": "#/definitions/errorDisplayDataGenericEngineDoesNotSupportFeature"
603+
},
604+
{
605+
"$ref": "#/definitions/errorDisplayDataGenericPresetNotFound"
595606
}
596607
],
597608
"discriminator": {
@@ -601,7 +612,8 @@
601612
"generic.pathNotFound": "#/definitions/errorDisplayDataGenericPathNotFound",
602613
"generic.identifierNotFound": "#/definitions/errorDisplayDataGenericIdentifierNotFound",
603614
"generic.domainMismatch": "#/definitions/errorDisplayDataGenericDomainMismatch",
604-
"generic.engineDoesNotSupportFeature": "#/definitions/errorDisplayDataGenericEngineDoesNotSupportFeature"
615+
"generic.engineDoesNotSupportFeature": "#/definitions/errorDisplayDataGenericEngineDoesNotSupportFeature",
616+
"generic.presetNotFound": "#/definitions/errorDisplayDataGenericPresetNotFound"
605617
},
606618
"propertyName": "code"
607619
}
@@ -656,6 +668,50 @@
656668
"unknown"
657669
]
658670
},
671+
"gpuSplitConfig": {
672+
"type": "object",
673+
"properties": {
674+
"strategy": {
675+
"$ref": "#/definitions/gpuSplitStrategy"
676+
},
677+
"disabledGpus": {
678+
"type": "array",
679+
"items": {
680+
"type": "integer",
681+
"minimum": 0
682+
}
683+
},
684+
"priority": {
685+
"type": "array",
686+
"items": {
687+
"type": "integer",
688+
"minimum": 0
689+
}
690+
},
691+
"customRatio": {
692+
"type": "array",
693+
"items": {
694+
"type": "number",
695+
"minimum": 0
696+
}
697+
}
698+
},
699+
"required": [
700+
"strategy",
701+
"disabledGpus",
702+
"priority",
703+
"customRatio"
704+
],
705+
"additionalProperties": false
706+
},
707+
"gpuSplitStrategy": {
708+
"type": "string",
709+
"enum": [
710+
"evenly",
711+
"priorityOrder",
712+
"custom"
713+
]
714+
},
659715
"kvConfigFieldDependency": {
660716
"type": "object",
661717
"properties": {
@@ -688,10 +744,12 @@
688744
"kvConfigLayerName": {
689745
"type": "string",
690746
"enum": [
747+
"currentlyEditing",
691748
"currentlyLoaded",
692749
"apiOverride",
693750
"conversationSpecific",
694751
"conversationGlobal",
752+
"preset",
695753
"serverSession",
696754
"httpServerRequestOverride",
697755
"completeModeFormatting",
@@ -852,9 +910,12 @@
852910
"llmLoadModelConfig": {
853911
"type": "object",
854912
"properties": {
855-
"gpuOffload": {
913+
"gpu": {
856914
"$ref": "#/definitions/gpuSetting"
857915
},
916+
"gpuStrictVramCap": {
917+
"type": "boolean"
918+
},
858919
"contextLength": {
859920
"type": "integer",
860921
"minimum": 1
@@ -1697,6 +1758,9 @@
16971758
},
16981759
"jsonSchema": {
16991760
"$ref": "#/definitions/functionToolCallRequest/properties/arguments/additionalProperties"
1761+
},
1762+
"gbnfGrammar": {
1763+
"type": "string"
17001764
}
17011765
},
17021766
"required": [
@@ -1708,7 +1772,8 @@
17081772
"type": "string",
17091773
"enum": [
17101774
"none",
1711-
"json"
1775+
"json",
1776+
"gbnf"
17121777
]
17131778
},
17141779
"llmToolArray": {
@@ -2449,6 +2514,41 @@
24492514
],
24502515
"additionalProperties": false
24512516
},
2517+
"modelManifest": {
2518+
"type": "object",
2519+
"properties": {
2520+
"type": {
2521+
"type": "string",
2522+
"const": "model",
2523+
"default": "model",
2524+
"title": "Type"
2525+
},
2526+
"virtual": {
2527+
"type": "boolean",
2528+
"const": true
2529+
},
2530+
"owner": {
2531+
"$ref": "#/definitions/kebabCase"
2532+
},
2533+
"name": {
2534+
"$ref": "#/definitions/artifactManifestBase/properties/name"
2535+
},
2536+
"description": {
2537+
"$ref": "#/definitions/artifactManifestBase/properties/description"
2538+
},
2539+
"revision": {
2540+
"$ref": "#/definitions/artifactManifestBase/properties/revision"
2541+
}
2542+
},
2543+
"required": [
2544+
"type",
2545+
"virtual",
2546+
"owner",
2547+
"name",
2548+
"description"
2549+
],
2550+
"additionalProperties": false
2551+
},
24522552
"modelQuery": {
24532553
"type": "object",
24542554
"properties": {
@@ -2500,7 +2600,7 @@
25002600
"$ref": "#/definitions/kebabCase"
25012601
},
25022602
"name": {
2503-
"$ref": "#/definitions/kebabCase"
2603+
"$ref": "#/definitions/artifactManifestBase/properties/name"
25042604
},
25052605
"description": {
25062606
"$ref": "#/definitions/artifactManifestBase/properties/description"
@@ -2537,7 +2637,7 @@
25372637
"$ref": "#/definitions/kebabCase"
25382638
},
25392639
"name": {
2540-
"$ref": "#/definitions/kebabCase"
2640+
"$ref": "#/definitions/artifactManifestBase/properties/name"
25412641
},
25422642
"description": {
25432643
"$ref": "#/definitions/artifactManifestBase/properties/description"
@@ -4149,6 +4249,9 @@
41494249
"predictionConfigStack": {
41504250
"$ref": "#/definitions/kvConfigStack"
41514251
},
4252+
"fuzzyPresetIdentifier": {
4253+
"type": "string"
4254+
},
41524255
"ignoreServerSessionConfig": {
41534256
"type": "boolean"
41544257
}
@@ -5585,6 +5688,49 @@
55855688
],
55865689
"additionalProperties": false
55875690
},
5691+
"errorDisplayDataGenericPresetNotFound": {
5692+
"type": "object",
5693+
"properties": {
5694+
"code": {
5695+
"type": "string",
5696+
"const": "generic.presetNotFound",
5697+
"default": "generic.presetNotFound",
5698+
"title": "Code"
5699+
},
5700+
"specifiedFuzzyPresetIdentifier": {
5701+
"type": "string"
5702+
},
5703+
"availablePresetsSample": {
5704+
"type": "array",
5705+
"items": {
5706+
"type": "object",
5707+
"properties": {
5708+
"identifier": {
5709+
"type": "string"
5710+
},
5711+
"name": {
5712+
"type": "string"
5713+
}
5714+
},
5715+
"required": [
5716+
"identifier",
5717+
"name"
5718+
],
5719+
"additionalProperties": false
5720+
}
5721+
},
5722+
"totalAvailablePresets": {
5723+
"type": "integer"
5724+
}
5725+
},
5726+
"required": [
5727+
"code",
5728+
"specifiedFuzzyPresetIdentifier",
5729+
"availablePresetsSample",
5730+
"totalAvailablePresets"
5731+
],
5732+
"additionalProperties": false
5733+
},
55885734
"parsedFileIdentifierLocal": {
55895735
"type": "object",
55905736
"properties": {

0 commit comments

Comments
 (0)