Repository navigation
lmgw 0.5.0
Realtime voice over WebRTC, an encrypted and mutually authenticated link for paired devices, decision models, and labs that keep their history. lmgw is MIT-licensed from this release.
- WebRTC realtime calls.
POST /v1/realtime/callsis OpenAI's WebRTC transport for/v1/realtimesessions, in OpenAI's shape: post an SDP offer (rawapplication/sdp, or multipart with asessionpart) with your key and get the answer back. Audio is Opus over UDP, encrypted with DTLS-SRTP; events travel on theoai-eventsdata channel;POST /v1/realtime/calls/{call_id}/hangupends a call. OpenAI's browser example and the Agents SDK'sOpenAIRealtimeWebRTCwork with the base URL pointed at lmgw. lmgw answers as ICE-lite with one host candidate, the address the POST arrived on, and has no STUN or TURN: the client must reach that address directly, on the LAN or through a VPN. The UDP port is the HTTP port's number unless Settings → Realtime → WebRTC calls names another; that group also lists the live calls. - The device link. Paired devices connect to a TLS listener of their own and authenticate with a certificate; bearer device keys are gone. The plain listener stays HTTP for local OpenAI clients and the dashboard.
- lmgw runs a small private CA. The pairing QR code or link carries the CA's fingerprint, a one-time token and the URLs to try (LAN, VPN). The device makes its own key, enrols the public half with the token and gets a certificate, and both sides check each other from then on.
- Each enrolment is confirmed on the Devices card: the device and the card show the same short code, and the device opens nothing until you click Confirm. The card also copies the CA certificate and rotates the CA. The CA's key is encrypted under the desktop's Secret Service.
- The listener is off until you pair a device; the pairing form offers to turn it on and, for another machine, to widen it. Its port is the HTTP port's number plus one (Settings → Network & access → Devices).
- The Chat feed is a push channel for devices.
GET /chat/api/feedtakeskeepalive_s(up tochat_feed_keepalive_max_s, default 900), so a phone can hold the connection open in the background.hellocarries the keep-alive, the device's URLs, certificate andopen_approvals; a livecaught_upends the catch-up; every message write is recorded asmessage.added,message.updatedormessage.deleted. - Device-hosted tools and the device-tools grant. A key's policy gains
device_tools, the device labels (for example["kai"]) whose hosted tools it reaches; the tool scope then filters them like any server's. An allow pattern such askai__*no longer reaches a device by itself (the upgrade grants the labels existing patterns named). A Chat thread's attached label that offers nothing says why in the error frame (tool_unreachable,tool_offline, ...). - Decision models.
POST /v1/systemonerelays the System One wire (a state and typed questions, answered with calibrated probabilities) to a local llama.cpp decision model (b11361 or later) or to an OpenAI-compatible upstream such as OpenRouter. A GGUF whose header declaresdecision.typeis a third aux kind, published asdecide/<id>; aux rows gainubatch_size,batch_size,mmproj_path,backendandthreads. OpenRouter's decision, embedding, rerank, speech and image models now appear in/v1/modelsunder their own tasks. - The lab store and the Decision lab. The Decision, Image and Audio labs keep their runs in lmgw's database. The new Decision lab asks a decision model typed questions, compares and perturbs inputs, and saves question sets with a confidence threshold per question. A set run sends a CSV or JSONL file through a set as a job and reports accuracy, a confusion matrix, reliability bins and the threshold curve; batch agents can classify through a set. The Image and Audio labs save the files their runs made (one file, or a zip with a manifest).
- Save As dialogs. Every download in the desktop app asks where to save, through the desktop portal where there is one.
- VRAM and plan accuracy. A chat or aux row's footprint charges llama.cpp's compute buffers, and the KV cache follows llama.cpp's layout (sliding windows, shared layers, no V cache under MLA, MTP and draft contexts). A plan that cannot fit the card says so, and plans load nothing.
- GGUF licence badges. The Models page shows each file's licence from its header beside the row.
- MIT licence. lmgw was FSL-1.1-MIT; it is plain MIT now.
Breaking / upgrade notes
- Paired devices must pair again. Every existing device row becomes v1: its bearer opens nothing, and the refusal says so. Pair again from the Devices card and confirm the code; v1 pairing links are refused.
key_rotaterefuses a device. - Kai needs 0.2.0, which pairs over the device link. Kai mobile 0.1.0 is released alongside.
- VRAM estimates rise for chat and aux rows (compute buffers), so admission can refuse or evict where a start used to fit.
- Removed spellings are refused, naming the valid one: the op
embed_model_set(useaux_model_set);embedas an auxtarget(useaux);upstream_setprotocolopenaiwith kindllama_server(usellama_cpp); theprobeparameter of the model plan tools. - Run arguments are lists of strings (
extra_run_args,extra_args) on every tool, op and answer; the newline or shell text form is refused. - Answers changed:
key_createanswerskey(wasplaintext);routableisroutable_candidates; unknown values are left out instead of""ornull; unknown ids are404 not_foundon the docs routes; a failed dictation answers{code, message}; the self-admin tools use the dashboard's names and types. - Migrations 0079 to 0084 run on start. Building needs
opus-devel; the RPM depends onopus.
Fixes
- Container starts no longer pass the desktop app's open files or
LD_LIBRARY_PATHtopasta, which caused SELinux denials. - A failed agent run no longer keeps the agent's token in its error text.
- Saving an alias no longer resets its min-p, repeat, presence and frequency penalties.
- Price sync leaves models billed per character, second or image unpriced instead of pricing them wrong.
- The Audio lab's voice list starts no model when the page opens.
- A voice-mode reply bubble stops spinning when its done frame is bad.