Skip to content

UI: Server lifecycle — Start/Stop, network, copyable OpenAI endpoints #34

Description

@Som23Git

Summary

Parent: #33

Build the MVP control surface: one primary action to start and stop a local VeloxQuant-backed inference server, plus the network + endpoint chrome users expect from oMLX's Server tab.

Why this is its own issue

Start/Stop is the adoption hook. Method education and live KV telemetry are valuable but should not block a working launcher. This issue is the thinnest vertical slice that makes VeloxQuant runnable for non-Python users.

Depends on

Scope (MVP)

Header / lifecycle

  • Status pill: Stopped / Starting / Running / Error
  • Primary button: Start ServerStop Server
  • Show app/library version (e.g. VeloxQuant-MLX 0.41.0)
  • Surface subprocess stderr on failure (port in use, unsupported method, model load OOM)

Network

  • Listen address: 127.0.0.1 (default, safer) and 0.0.0.0 (LAN)
  • Port (default 8000); changing while running prompts restart
  • Persist settings across launches (local config file)

API endpoints (copy to clipboard)

  • OpenAI-compatible: http://127.0.0.1:{port}/v1
  • Health: http://127.0.0.1:{port}/health
  • Include metrics / Anthropic base URL only if the backend actually serves them (do not invent endpoints)

Minimal model bind

  • Model id or local path required before Start (cannot start an empty server)
  • Optional: last-used model remembered

Default generation knobs (lightweight; deeper method UI is #35 placeholder)

  • Max tokens, temperature, top-p, context window — passed through as server/profile defaults
  • Method + bits fields present but may be a simple dropdown until the method panel lands

Non-goals

  • Full method library browser / paper-deviation callouts → child method UI
  • Live compression charts / /v1/kv/stats dashboard → child telemetry UI
  • Model download manager, appearance themes, security/auth panels
  • Reimplementing mlx_lm.server inside the UI process

Acceptance criteria

  1. Clicking Start Server brings health endpoint to 200 with a small mlx-community model and a RFC: OpenAI-compatible server — mlx_lm.server already serves 35/40 caches, but compression is accounting-only at runtime #27-supported method.
  2. Clicking Stop Server terminates the child process; port is free afterward.
  3. Copy buttons produce the correct URLs for the configured host/port.
  4. Starting with an unsupported method (RFC: OpenAI-compatible server — mlx_lm.server already serves 35/40 caches, but compression is accounting-only at runtime #27 crash tier, e.g. standalone caches without adapter) fails at Start with a readable error — no silent fp16 fallback.
  5. README / docs-site getting-started links this as the non-library first-run path once shipped.

Implementation notes

  • Prefer managing a subprocess (veloxquant serve … or equivalent) over embedding HTTP in the UI process.
  • Keep optional packaging: do not force UI deps on the core PyPI package (#33 stack discussion).

Reference

oMLX 0.5.3 → Settings → Server: status header, Network (listen + port), API Endpoints list with copy icons, Default Profile knobs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions