Add --no-webui / TS_NO_WEBUI to run the server API-only - #160
Open
craig-b wants to merge 1 commit into
Open
Conversation
The bundled wwwroot chat UI is served unconditionally today; the only way to run API-only was to delete the wwwroot directory. --no-webui (or TS_NO_WEBUI set to anything but 0) skips the wwwroot static-file middleware and has GET / answer the plain liveness text, the same behavior a headless deployment without wwwroot content already gets. Every HTTP API endpoint stays up, including /uploads, whose URLs the image and video APIs return. Mirrors llama-server's --no-webui. Verified: ServerOptionsBuilderTests (5 new cases: default on, flag off, env off, env=0 on, flag beats env=0) and a live no-model server per mode (--no-webui: / is liveness text, /index.html 404, unmatched routes 404 without the WebRootPath echo, /v1 + /api + /uploads all 200; default and TS_NO_WEBUI=0: / serves the UI). Full suite 1366 green (one known-flaky perf benchmark passes isolated).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bundled wwwroot chat UI is served unconditionally; the only way to run API-only is deleting the wwwroot directory.
--no-webui(orTS_NO_WEBUIset to anything but0) skips the wwwroot static-file middleware and hasGET /answer the plain liveness text — the same behavior a headless deployment without wwwroot content already gets. Every HTTP API endpoint stays up, including/uploads, whose URLs the image and video APIs return. Mirrors llama-server's--no-webui.Verified: 5 new
ServerOptionsBuilderTestscases (default on, flag off, env off, env=0 on, flag beats env), plus a live no-model server in both modes (--no-webui:/is liveness text,/index.html404,/v1+/api+/uploadsall up; default:/serves the UI). Environment-independent lane 1146 passed / 0 failed on current main.