What's New
Added
- Quality metadata — every response includes structured quality signals (truncation, think-block detection, token estimation, finish reason) so Claude can make informed trust decisions about local LLM output
- Session metrics resource —
houtini://metrics/sessionMCP resource exposes cumulative offload stats and per-model performance as JSON, enabling proactive routing feedback - Request semaphore — inference calls are serialised to prevent stacked timeouts when parallel requests hit a single-model server
- HuggingFace thinking detection — auto-detects
enable_thinkingsupport from HF chat templates at startup, suppresses thinking at inference time. No hardcoded model lists. - Token savings benchmark —
benchmark.mjstests realistic delegation patterns against real source files. 93.3% savings measured across code review, architecture review, and code explanation tasks.
Fixed
- SQLite statement leak in
getCachedProfile— statement was not freed ifgetAsObject()threw (now wrapped in try/finally) - Unflushed SSE buffer — the final streaming chunk (often containing usage data) could be stranded in the buffer after loop exit, causing missing token counts on truncated responses
- Session stats on truncated responses — token counts now estimated from content length (~4 chars/token) when the usage chunk is lost, instead of silently showing zero
- Division by zero guard —
tokPerSeccalculation now requires minimum 50ms generation time
Improved
- Prompt structure —
custom_promptuses multi-turn format (context acknowledged before instruction);code_taskmoves task into system message - Output constraints — per-family hints now include explicit markdown format instructions
Full changelog: https://github.com/houtini-ai/lm/blob/main/CHANGELOG.md
npm: npm install @houtini/lm@2.8.0