Skip to content

Add --no-webui / TS_NO_WEBUI to run the server API-only - #160

Open
craig-b wants to merge 1 commit into
zhongkaifu:mainfrom
craig-b:feature/no-webui
Open

Add --no-webui / TS_NO_WEBUI to run the server API-only#160
craig-b wants to merge 1 commit into
zhongkaifu:mainfrom
craig-b:feature/no-webui

Conversation

@craig-b

@craig-b craig-b commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The bundled wwwroot chat UI is served unconditionally; the only way to run API-only is deleting 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: 5 new ServerOptionsBuilderTests cases (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.html 404, /v1 + /api + /uploads all up; default: / serves the UI). Environment-independent lane 1146 passed / 0 failed on current main.

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant