Skip to main content

lmstudiox

An extended Python SDK for LM Studio with support for explicitly enabling or disabling model thinking mode.

Unofficial project. lmstudiox is an independent, community-developed project. It is not affiliated with, endorsed by, or officially maintained by LM Studio or its developers.

lmstudiox extends the official lmstudio Python SDK with additional capabilities, including explicit control over model thinking mode.

It provides an API compatible with the original SDK while allowing developers to disable thinking mode when needed.

Features

  • Thinking Mode Control: Explicitly enable or disable model thinking mode through LlmPredictionConfig.
  • Familiar API: Built on top of the official lmstudio SDK, retaining its familiar usage patterns.
  • Streaming Support: Supports asynchronous streaming responses.
  • Version Alignment: The package version is kept in sync with the official lmstudio package version on PyPI.

Installation

pip install lmstudiox

Usage

The following example demonstrates the difference between the official lmstudio SDK and lmstudiox when interacting with a model.

import asyncio
import lmstudio
import lmstudiox


# Use the official lmstudio SDK (thinking mode enabled by default).
async def use_lmstudio():
    async with lmstudio.AsyncClient("localhost:1234") as client:
        model = await client.llm.model("qwen3.5-9b")
        stream = await model.respond_stream("hello !")
        async for x in stream:
            if x.content:
                print(x.content, end="", flush=True)
        print()


# Use lmstudiox to explicitly disable thinking mode.
async def use_lmstudiox():
    async with lmstudiox.AsyncClient("localhost:1234") as client:
        model = await client.llm.model("qwen3.5-9b")
        stream = await model.respond_stream("hello !", config=lmstudiox.LlmPredictionConfig(enable_thinking=False))
        async for x in stream:
            if x.content:
                print(x.content, end="", flush=True)
        print()


# Run both examples for comparison.
asyncio.run(use_lmstudio())
asyncio.run(use_lmstudiox())

Requirements

  • Python >= 3.12
  • LM Studio with its local API server enabled

Acknowledgements

This project is built on top of the official LM Studio Python SDK.

Special thanks to the LM Studio team for providing the underlying SDK and local inference platform.

License

See LICENSE for details.

Metadata

Release files for lmstudiox 1.5.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lmstudiox 1.5.0.1
File Size Uploaded Provenance Actions
lmstudiox-1.5.0.1.tar.gz 331.9 kB Without provenance Details for lmstudiox-1.5.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lmstudiox 1.5.0.1
File Interpreter ABI Platform Actions
lmstudiox-1.5.0.1-py3-none-any.whl Python 3 none any Details for lmstudiox-1.5.0.1-py3-none-any.whl

Total release size: 677.5 kB

Release files / lmstudiox-1.5.0.1.tar.gz

Download URL lmstudiox-1.5.0.1.tar.gz
Size 331.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bb54d1c009f8c3665ed4a110baf0c5d4322b43f02c5c42fde861882cb4e85fd2
BLAKE2b-256 checksum
How to use checksums
abf186c80b9455177d8cc5c2a85f33513afb58adccd240492c6deaa1fab16e38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Release files / lmstudiox-1.5.0.1-py3-none-any.whl

Download URL lmstudiox-1.5.0.1-py3-none-any.whl
Size 345.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
508ed5e3d2ecbcd32f4e404a5d14c2b8b799d7acb4f7e03b9faa4ea15c31e2ca
BLAKE2b-256 checksum
How to use checksums
381e9926e439e2f3d3b7d63d19e989430bd83d0948731f3843ada1b0fda8b0ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.34.2

Security for lmstudiox 1.5.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page