Commit graph

5 commits

Author SHA1 Message Date
neil
249c693e6d MLX proxy: count prompt tokens on streamed requests
Streamed responses only carry usage when the client asks for it, so the
prompt processing chart stayed at zero on Macs. The proxy now requests
the usage chunk itself and strips it from responses to clients that
didn't ask, forwarding the stream one whole event at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
2026-11-02 05:03:49 -08:00
neil
85912dd3b2 MLX: report ready only once the model answers; quieter logs
mlx_lm.server's /health is OK as soon as its thread starts, so the
dashboard showed Ready while the model was still downloading. The proxy
now sends a 1-token probe and answers /health with 503 until it succeeds.
Also drop health-check, dashboard-poll and per-file HF request lines from
the MLX log while keeping download progress bars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
2026-11-02 04:48:33 -08:00
neil
16f096714e Handle busy ports and stop orphaning mlx_lm.server
On a Mac with port 8000 already taken, the proxy failed to bind after
mlx_lm.server had started, leaving an orphan each time launchd retried.
- setup now stops our own services, then moves the API/dashboard to the
  next free ports (or errors if a port was given explicitly)
- the MLX service binds its port before starting mlx_lm.server, always
  stops the child on exit, and cleans up leftovers from earlier crashes
- drop the nonexistent huggingface_hub[cli] extra

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
2026-11-02 04:45:36 -08:00
neil
d2ab08a5f5 MLX proxy: don't count health checks as requests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
2026-11-02 04:41:26 -08:00
neil
5b9586ac80 Initial llm-host: hardware-aware local LLM server with dashboard
Detects the GPU (NVIDIA on Linux, Apple Silicon on macOS), picks the
catalog models and builds that fit, installs vLLM or MLX without sudo,
and runs the model server plus a web dashboard as user services.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
2026-11-02 03:51:06 -08:00