Skip to content

lmgw 0.4.4

Choose a tag to compare

@github-actions github-actions released this 10 Oct 12:09
· 9 commits to main since this release

lmgw's own HTTP API is documented and typed, and a developer document covers what clients, devices and agents can call.

  • /v1/openapi.json is 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, and GET /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.v1 bundle);
    • the Knowledge bases API, the Audio lab and Image lab APIs, and GET /chat/api/threads/rows.

    Only the dashboard's pages, the /ui redirects and the agent app and MCP proxies stay undocumented.

  • Typed answers. Every answer, op result and SSE frame of lmgw's own API is an lmgw-api-types type that the handler builds, and the schema comes from that type. Fields the server always sends are listed as required; request bodies of shared types are <Name>Input components. audio.cpp's own JSON (/v1/tasks/*, /v1/audio/alignments) is relayed verbatim and documented as such. The /v1 protocol 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/completions stream. 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_request on every Chat route (send's voice, 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-string transcript cleared the clip's transcript and a non-string alias fell 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 gain param, type and code where they lacked them.
  • Fixes: a tool turn could overflow a 2 MiB stack in a debug build; GitHub CI runs the full test suite again.