Repository navigation
v0.8.0
llm-translator v0.8.0 Changelog
Release Date: November 2026
Release Type: Minor
Branch: next → master
Overview
Version 0.8.0 adds two drivers, Mistral and LM Studio, answers an OpenAI client's n above 1 on Anthropic-protocol upstreams by fanning out to parallel requests, and fills in stop_details.category when an Azure-style content filter says which harm category it caught. It also fixes the shared stream converter so a tool call whose later chunks carry id: null stays one call.
Nothing here needs a config change. A Mistral or LM Studio upstream that ran on the generic compatible driver is now bound to its own driver, and a server no earlier driver claims gets one more startup probe, GET /api/v0/models. See the upgrade notes.
✨ Features
Mistral API driver (#139)
A mistral driver for api.mistral.ai, matched by host name with no request of its own. It is the first built-in driver to declare info().toolCallIds ({ alphabet: "a-zA-Z0-9", min: 9, max: 9 }), so history replayed from an Anthropic client, or from an OpenAI client with other ids, goes out with valid 9-character ids, and the ids Mistral returns map back to the client's originals.
seed is sent as random_seed, and tool_choice: "required" as "any". Reasoning models answer with content as a list of typed chunks; the driver turns the text chunks into content and the thinking chunks into reasoning_content, which becomes thinking blocks, streamed and not. The driver hasn't been run against the real API yet; that is tracked in #70. Fixes #42.
LM Studio driver (#140)
An lmstudio driver, detected by a strict match on LM Studio's GET /api/v0/models listing: object: "list", a non-empty data, and every entry with object: "model", a string id, arch, compatibility_type and state, and a type of llm, vlm or embeddings. An OpenAI-style /v1/models list can never pass. The probe goes out with the other startup probes and is bounded by detectTimeout. The served models are the chat models from that list, embedding models left out.
LM Studio also serves an Anthropic-compatible POST /v1/messages; set backend: "anthropic" on the upstream to use it instead of the OpenAI-style translation. docs/drivers.md covers both. Not run against a real LM Studio server yet (#70). Fixes #37.
n above 1 on Anthropic-protocol upstreams (#142)
Anthropic's Messages API has no n, so an OpenAI client asking for several choices from an Anthropic-protocol upstream used to get an error. Now send runs n ordinary single-choice sends in parallel and combines them. Each branch is a full send with n: 1, so pools, failover, retries and capture apply per branch.
- Without streaming, the reply has every branch's choice, numbered 0 to n-1, and the summed usage.
- With streaming, chunks go out as they arrive, re-indexed to their branch, with one final usage chunk (when
stream_options.include_usageasked for it) and a single[DONE]. - The first branch to fail ends the request and aborts the rest. Aborting the caller, or the client disconnecting, cancels every branch.
onUsageis called once with the combined report, and each branch is its own capture exchange.
OpenAI-protocol upstreams still get n as is. An n above 128 is a 400. The fan-out decision is made on the endpoint the router picks first; see docs/server.md and decision D-49. Fixes #26.
stop_details.category from content-filter results (#141)
A refusal used to carry stop_details.category: null every time. When the upstream reports Azure OpenAI style content_filter_results and one of hate, sexual, violence or self_harm is filtered, on the choice or on any streamed chunk, the category is now "general_harms". Jailbreak, protected-material, profanity and blocklist matches, and every upstream that reports no filter details, still give null. The other Anthropic categories (cyber, bio, frontier_llm, reasoning_extraction) are never produced. The reasoning is recorded as decision D-50. Fixes #123.
🐛 Bug Fixes
Streamed tool calls with id: null stay one call (#140)
The OpenAI → Anthropic stream converter treated a tool-call chunk with id: null as a new call, so a server that sends the id only on the first fragment (LM Studio does) produced one tool_use block per fragment. A null id is now treated like a missing one and continues the current call, with or without an index.
📚 Documentation
- NEW: docs/changelog/v0/v0.8.0.md: this changelog.
- docs/drivers.md has new Mistral API and LM Studio sections and the updated detection table. docs/server.md has a new section on several choices (
n). docs/known-limitations.md, docs/protocol-support.md, decisions D-49 and D-50 in docs/decisions.md, and the feature inventory (FI-070, FI-097, FI-148, FI-153) are updated to match.
🔧 Dependencies
@napi-rs/canvas1.0.13 → 1.1.1 (#133). Canvas 1.1 draws text with its portable FreeType renderer by default, so text in rendered PDF page images can look slightly different from before.- Dev dependencies:
@cldmv/jsonv1.1.5 → 1.2.2,@cldmv/eslint-plugin-jsonv1.0.17 → 1.1.2,@cldmv/prettier-plugin-jsonv1.1.4 → 1.2.2 and@cldmv/vitest-runner1.5.6 → 1.6.1 (#133). @cldmv/slothletand@cldmv/slothlet-typesstay at 3.23.0; 3.24.0 is skipped.
Upgrade notes
- Mistral and LM Studio upstreams change driver. An upstream on api.mistral.ai is now bound to
mistral, and an LM Studio server tolmstudio, where both used to run oncompatible. Setbackend: "compatible"to keep the old behaviour. - One extra startup probe. A server no earlier driver claims now also gets
GET /api/v0/models. It runs in parallel with the other probes and only binds LM Studio's own listing. Setbackendon an upstream to skip probing altogether. nabove 1 costsnupstream calls. On an Anthropic-protocol upstream it is billed and rate-limited asnrequests.- No other changes are needed.
| Metric | Coverage |
|---|---|
| Statements | 100.0% |
| Branches | 100.0% |
| Functions | 100.0% |
| Lines | 100.0% |
Avg: 100.0% · 3546c34 · Node lts/*