ModelSaar

Linux, macOS and Windows

Rendered from docs/platforms.md at commit 18614e438388. The repository file is authoritative.

The gateway is one Python package with no compiled code of its own. It runs on Linux, macOS and Windows with Python 3.10–3.13. This page says what is checked on each system on every push, where the systems behave differently, and what has not been checked.

What CI runs on each system

Every push runs these jobs on GitHub-hosted runners (.github/workflows/ci.yml):

job Linux macOS Windows what it does
test Python 3.10, 3.12, 3.13 — — the full non-live test suite, lint, site checks
os-unit — Python 3.12 Python 3.12 the same full non-live test suite
os-wheel 3.10, 3.13 3.10, 3.13 3.10, 3.13 the installed wheel, end to end, fresh and as an upgrade (below)
installer x86_64, arm64 — — the one-line installer against a real systemd user unit
container, container-arm64 amd64, arm64 — — the container image

os-wheel builds the wheel, installs it into a new virtual environment whose path contains a space and a non-ASCII character, and drives the installed modelsaar command the way a first user does (scripts/wheel_e2e.py, standard library only):

  1. modelsaar init against a local fixture backend, config validate, discover, doctor;
  2. modelsaar serve; a request without a key and one with a wrong key are refused (401);
  3. an authenticated chat completion, a streamed one (SSE through to [DONE]), /v1/models, modelsaar status, modelsaar decisions <id> for the request just made, modelsaar test;
  4. stop with the system's own interrupt (Ctrl+C; CTRL_BREAK_EVENT on Windows), check that the process exited, the port is free again and the home directory can be removed;
  5. the same again as an upgrade: install the previous release from PyPI, initialise, serve a request, then install the new wheel over it and check that the configuration and both key files are byte for byte unchanged and the new build serves with them.

The backend in these jobs is the repository's fixture (modelsaar.testing.fakebackend), started from the installed package. That makes the result evidence for the gateway — packaging, paths, sockets, signals, console output, the CLI — on each system. It is not evidence about any inference runtime on that system.

Where the systems differ

topic Linux, macOS Windows
home directory ~/.modelsaar (or MODELSAAR_HOME) %USERPROFILE%\.modelsaar (or MODELSAAR_HOME)
who can read the key files files are created 0600, the keys folder 0700; doctor warns on anything wider there are no permission bits: access follows the folder's ACL, which ModelSaar neither sets nor inspects. Inside your user profile the default ACL is private to you; doctor warns when the key files are elsewhere
"is the gateway's port free?" (before offline probe and live eval) a closed port refuses a connection at once; macOS also refuses when a listener's accept queue is full a closed loopback port takes about two seconds to refuse, and a listener with a full accept queue refuses too
…and how ModelSaar answers it on every system: the port is free when the system lets ModelSaar bind it exclusively (the socket is closed again at once and never listens). A connection that times out or is refused while another socket holds the address is not proof of anything; the command stops and says it could not tell (--allow-concurrent overrides). Linux additionally recognises a port whose only remaining holder is the closing connections of a server that just stopped the same; for up to a minute after a gateway on that port stopped, Windows and macOS may still answer "could not tell" — run the command again
server.host: 0.0.0.0 — not a valid destination. On every system the CLI talks to a gateway bound to all interfaces over loopback
console output UTF-8 almost everywhere consoles and pipes often use cp1252 or cp437. Text that the code page cannot show (model output, for instance) prints with ? in place of the character; a command never fails for it. Files are always read and written as UTF-8
stopping modelsaar serve Ctrl+C or SIGTERM Ctrl+C or Ctrl+Break
running as a service examples/modelsaar.service (systemd), examples/com.modelsaar.gateway.plist (launchd) no unit is shipped; use Task Scheduler or a service wrapper of your choice with modelsaar serve
one-line installer (install.sh) Linux and macOS (CI exercises it on Linux x86_64 and arm64) inside WSL2 only. Natively, install with pipx install modelsaar, uv tool install modelsaar or pip install modelsaar in a virtual environment
container image amd64, arm64 through Docker Desktop (Linux containers)
isolated code execution for modelsaar eval code tasks bubblewrap or Docker on Linux; on macOS use MODELSAAR_MACOS_SANDBOX=verify modelsaar sandbox check to verify the opt-in native backend on the local machine Docker only. Without a verified isolation backend code tasks are reported as skipped, never run unisolated
clock resolution sub-millisecond about 16 ms. A timer for a deadline can fire one tick before the clock reads that deadline. A wait is therefore classified by which bound ended it, and the last tick before a deadline counts as the deadline: nothing new is started in it. The tests reproduce this clock on every system (tests/test_portability.py)

Source files are checked out with LF line endings on every system (.gitattributes); two evaluator files are pinned by checksum and scripts run under bash on Windows as well.

Real inference on native operating systems

A separate native inference workflow installs the candidate wheel and a checksum-pinned llama.cpp executable on Windows x64, macOS arm64 and Linux x64. A pinned SmolLM2 model answers a local authenticated chat and streamed chat through the gateway.

What has not been checked

Reproducing the check on your machine

python -m pip install build && python -m build --wheel
python scripts/wheel_e2e.py --wheel dist/modelsaar-*.whl                       # fresh install
python scripts/wheel_e2e.py --wheel dist/modelsaar-*.whl --upgrade-from 0.3.0  # upgrade in place

The script works in a temporary directory, uses a free port, and removes everything it created. It needs network access to PyPI for the dependencies (and for the previous release in the upgrade case).