How noepeyre/harness-python works
This small repository contains a terminal chat client, an older alternative client, and a standalone LM Studio-compatible mock server. The main workflow selects and loads a model, sends chat turns while tracking response IDs for conversation continuity, and supports model management and retry commands. The mock server maintains an in-memory model catalog and can simulate completions offline or optionally adapt requests to Mistral. The excerpts do not establish that the client and mock server are deployed together; their chat endpoint paths also differ.
Main entry points: lmstudio_mock_mistral.py Compatibility API · main.py Interactive client · models.py Legacy chat client
Components 9
Terminal clients
- Interactive client
main.py - Legacy chat client
old/models.py
Mock server
- Compatibility API
old/lmstudio_mock_mistral.py - Model state
old/lmstudio_mock_mistral.py - Offline simulation
old/lmstudio_mock_mistral.py - Mistral adapter
old/lmstudio_mock_mistral.py
External services
- LM Studio API
- Mistral API
Other components
- Terminal user
Connections 8
- Terminal user → Interactive client: enters prompts
main.py - Interactive client → LM Studio API: sends model and chat requests
main.py - Terminal user → Legacy chat client: enters prompts
old/models.py - Legacy chat client → LM Studio API: sends chat requests
old/models.py - Compatibility API → Model state: reads and updates
old/lmstudio_mock_mistral.py - Compatibility API → Offline simulation: builds fallback
old/lmstudio_mock_mistral.py - Compatibility API → Mistral adapter: builds request
old/lmstudio_mock_mistral.py - Mistral adapter → Mistral API: sends optional request
old/lmstudio_mock_mistral.py