Skip to content

lmgw 0.4.2

Choose a tag to compare

@github-actions github-actions released this 08 Oct 17:48
· 13 commits to main since this release

Client apps as paired devices, prices beyond tokens, and a Chat that follows every client.

  • Client apps as paired devices. Pair a client (a desktop voice client first, a phone later) from Usage → Keys → Devices with an lmgw-pair: link.
    • Each device gets its own key, tool scope and budget. It reaches the Chat API and /v1, and nothing of the admin plane.
    • Disable, Rotate and Delete end its connections at once. The realtime close says why: 4003 with a kind token for a revocation, 4004 for a thread out of reach.
    • A device can be given its own level of lmgw's admin tools (off, read only or full), capped by the gateway's own setting.
  • A Chat change feed and ongoing folders. GET /chat/api/feed streams thread and folder changes, running turns, voice sessions and the GPU hold, and resumes across restarts.
    • A folder can be one ongoing conversation that every client continues (POST /chat/api/folders/{id}/current). A new thread starts after the folder's idle time or on "New conversation".
    • The new lmgw-client crate holds the realtime protocol, the voice state and the feed reader for clients; the dashboard's voice panel runs on it.
  • The dashboard's Chat follows other clients live. A chat frame on /api/events names what changed, and the page reads it again without leaving the tab. A draft whose conversation was deleted elsewhere waits, unsaved, until you send it.
  • Prices beyond tokens. A model can be priced per audio minute, per 1M characters, per generated image and per request, beside its token rates.
    • Requests record the audio length, characters and images they measured. Nothing is estimated: a quantity lmgw can't measure stays unknown, never 0.
    • Usage and Traffic show the quantities.
    • The catalog sync brings in request fees and cache prices, and a fallback is priced as the alias that answered.
  • Supertonic speaks typographic text. A reply containing a character the model's vocabulary lacks, such as „ or an emoji, no longer fails its speech. Such characters become plain equivalents or are dropped, and x-lmgw-speech names them. A text with nothing left to say is empty_input on every TTS model.
  • No more "database is locked". Every write takes SQLite's write lock up front, so concurrent writes wait their turn instead of failing.
  • MCP servers connect or fail. An HTTP/SSE server's handshake is bounded by its timeout_ms.
    • Podman-isolated servers run in labelled containers, which are removed when the server stops and swept at the next start.
    • Settings saves and the GPU hold no longer wait for MCP reconnects.
  • Streams follow stream_options.include_usage. Streamed chat completions end with a usage chunk only when the client asks for it, as OpenAI's do.
  • A clean shutdown. Quit, an update's restart and SIGTERM stop the gateway first: feeds and voice sessions close with 1001, and cut turns keep their partial reply.
  • The API reference reads as documentation for client developers.

Upgrading: migrations 0061 to 0070 run on start. If an old price row used a removed unit (per_second, per_char), lmgw refuses to start and names the row. Delete it and enter the price again in the new units. Run the price sync once after upgrading, so request fees and cache prices arrive.