Description
There are two essential formats for model and prediction configuration information:
- the flat key-value types used at the SDK boundary (
LlmPredictionConfig
,LlmLoadModelConfig
,EmbeddingLoadModelConfig
) - the field listing based
KvConfigStack
format used in the LM Studio wire format
lmstudio-js
defines the mapping between the two in https://github.com/lmstudio-ai/lmstudio-js/blob/main/packages/lms-kv-config/src/schema.ts
The lmstudio-js
JSON schema export publishes both the SDK boundary types and the wire format types, but it doesn't publish the details of how to translate between them. Accordingly, lmstudio-
5476
python
has to define its own duplicative mapping logic in https://github.com/lmstudio-ai/lmstudio-python/blob/main/src/lmstudio/_kv_config.py
This can lead to functionality lags, as the Python SDK may silently fail to translate defined-but-not-yet-implemented config settings from the SDK boundary formats to the wire config stack format.
Information which the Python SDK needs for each input key:
- the mapped config stack field name for the setting (both the namespace prefix, and the key name itself, since the latter may differ from the input attribute/key name)
- whether the value should be sent to the server as is, or if it should be nested as a checkbox subfield (that is, sent as
{"key": server_config_name, "value": {"checked": True, "value": value}}
rather than as just{"key": server_config_name, "value": value}
)
(corresponding lmstudio-python
issue to consume the exported data file once it is available: lmstudio-ai/lmstudio-python#32