diff --git a/src/lmstudio/sync_api.py b/src/lmstudio/sync_api.py index 474b09b..ffa196e 100644 --- a/src/lmstudio/sync_api.py +++ b/src/lmstudio/sync_api.py @@ -1339,9 +1339,8 @@ def get_info(self) -> ModelInstanceInfo: """Get the model info for this model.""" return self._session.get_model_info(self.identifier) - # Private until this API can emit the client config types @sdk_public_api() - def _get_load_config(self) -> AnyLoadConfig: + def get_load_config(self) -> AnyLoadConfig: """Get the model load config for this model.""" return self._session._get_load_config(self.identifier) diff --git a/tests/async/test_embedding_async.py b/tests/async/test_embedding_async.py index 6432ae2..482f217 100644 --- a/tests/async/test_embedding_async.py +++ b/tests/async/test_embedding_async.py @@ -111,7 +111,8 @@ async def test_context_length_async(model_id: str, caplog: LogCap) -> None: async def test_get_load_config_async(model_id: str, caplog: LogCap) -> None: caplog.set_level(logging.DEBUG) async with AsyncClient() as client: - response = await client.embedding._get_load_config(model_id) + model = await client.embedding.model(model_id) + response = await model.get_load_config() logging.info(f"Load config response: {response}") assert response assert isinstance(response, EmbeddingLoadModelConfig) diff --git a/tests/async/test_llm_async.py b/tests/async/test_llm_async.py index 949ca16..bfc2d98 100644 --- a/tests/async/test_llm_async.py +++ b/tests/async/test_llm_async.py @@ -93,7 +93,8 @@ async def test_context_length_async(model_id: str, caplog: LogCap) -> None: async def test_get_load_config_async(model_id: str, caplog: LogCap) -> None: caplog.set_level(logging.DEBUG) async with AsyncClient() as client: - response = await client.llm._get_load_config(model_id) + model = await client.llm.model(model_id) + response = await model.get_load_config() logging.info(f"Load config response: {response}") assert response assert isinstance(response, LlmLoadModelConfig) diff --git a/tests/sync/test_embedding_sync.py b/tests/sync/test_embedding_sync.py index f1a11f7..89a39e6 100644 --- a/tests/sync/test_embedding_sync.py +++ b/tests/sync/test_embedding_sync.py @@ -112,7 +112,8 @@ def test_context_length_sync(model_id: str, caplog: LogCap) -> None: def test_get_load_config_sync(model_id: str, caplog: LogCap) -> None: caplog.set_level(logging.DEBUG) with Client() as client: - response = client.embedding._get_load_config(model_id) + model = client.embedding.model(model_id) + response = model.get_load_config() logging.info(f"Load config response: {response}") assert response assert isinstance(response, EmbeddingLoadModelConfig) diff --git a/tests/sync/test_llm_sync.py b/tests/sync/test_llm_sync.py index b3f4ece..9945362 100644 --- a/tests/sync/test_llm_sync.py +++ b/tests/sync/test_llm_sync.py @@ -93,7 +93,8 @@ def test_context_length_sync(model_id: str, caplog: LogCap) -> None: def test_get_load_config_sync(model_id: str, caplog: LogCap) -> None: caplog.set_level(logging.DEBUG) with Client() as client: - response = client.llm._get_load_config(model_id) + model = client.llm.model(model_id) + response = model.get_load_config() logging.info(f"Load config response: {response}") assert response assert isinstance(response, LlmLoadModelConfig)