Repository navigation
lmgw 0.4.4
lmgw's own HTTP API is documented and typed, and a developer document covers what clients, devices and agents can call.
-
/v1/openapi.jsonis the developer document. It lists every operation a non-owner credential reaches: the inference routes, the Chat API that paired devices use, the agent run API, andGET /api/version, with a map of which key kind may call what. The owner's admin plane stays in/api/openapi.json. -
Documented for the first time:
- the rest of the Chat API: thread create, read, settings, delete, pin, move, archive and keep; send, continue, regenerate and edit with their SSE frames; message delete, read-aloud, voice warm-up, speech stop, search, folder patch and delete, attachments, and the exports (including the
lmgw.chat.v1bundle); - the Knowledge bases API, the Audio lab and Image lab APIs, and
GET /chat/api/threads/rows.
Only the dashboard's pages, the
/uiredirects and the agent app and MCP proxies stay undocumented. - the rest of the Chat API: thread create, read, settings, delete, pin, move, archive and keep; send, continue, regenerate and edit with their SSE frames; message delete, read-aloud, voice warm-up, speech stop, search, folder patch and delete, attachments, and the exports (including the
-
Typed answers. Every answer, op result and SSE frame of lmgw's own API is an
lmgw-api-typestype that the handler builds, and the schema comes from that type. Fields the server always sends are listed asrequired; request bodies of shared types are<Name>Inputcomponents. audio.cpp's own JSON (/v1/tasks/*,/v1/audio/alignments) is relayed verbatim and documented as such. The/v1protocol routes still pass unknown request parameters to the upstream. -
Kept honest by tests. Every drift test validates the live answer against the built document, including every Chat turn frame and the
/v1/chat/completionsstream. A test refuses new untyped answers, and a check holds the count of inline JSON in handlers and ops to a ratchet (README, "Typed answers"). -
Behaviour changes, malformed input and error paths only:
- A JSON body of the wrong shape is
422 bad_requeston every Chat route (send'svoice, continue, regenerate and the job answer were 400). Invalid JSON stays 400. - Audio lab bodies of the wrong shape are
422 {error}. Before, a non-stringtranscriptcleared the clip's transcript and a non-stringaliasfell back to another model. GET /audio-lab/api/refs/{name}errors are JSON{error}(were plain text). The Audio lab's speech and task hand-offs answer a bad body in the OpenAI envelope. Image lab errors gainparam,typeandcodewhere they lacked them.
- A JSON body of the wrong shape is
-
Fixes: a tool turn could overflow a 2 MiB stack in a debug build; GitHub CI runs the full test suite again.