test/client-branch-coverage
Add four targeted tests hitting the previously uncovered branches in `client.extract_responses_text` (lines 221–233): dict items with a non-list content field, content list entries that are not dicts, dict entries whose text value is not a str, and object items where `getattr(entry, "text")` is non-str. Also declare `aiohttp` in the optional [test] extra so the full suite can import `routes.py` without a ModuleNotFoundError. Branch coverage: 99% (4 branches missed) → 100% (146/146 branches). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ComfyUI LMStudio Nodes (Unofficial)
Small ComfyUI custom nodes to connect to a remote LMStudio server through OpenAI-compatible API (/v1).
Nodes
-
LMStudio - Connect
- Connect to a remote LMStudio URL
- Set API token
- Pull/load model list automatically (Refresh Models)
- Test connectivity to server
- Supports LM Reasonning mode toggle
- Supports Tooling / MCP toggle
-
LMStudio - Text Gen
- System prompt + user prompt
- Text generation through the shared connection
<think>...</think>blocks are stripped from response output
-
LMStudio - Image To Text
- System prompt + user prompt + image input
- Image description / caption style generation
<think>...</think>blocks are stripped from response output
Quick start
- Put this folder in
ComfyUI/custom_nodes/ - Install deps:
pip install -r requirements.txt - Restart ComfyUI
Testing
Run the Python unit tests with coverage gate (>=90%):
pytest -q
Notes
- This is not an official LMStudio project.
- Not affiliated with LMStudio.
- It is a quickly vibecoded utility project.
References
Languages
Python
94.8%
JavaScript
5.2%
