Repository navigation
ModelSaar 1.0 support contract
An application connects to one gateway. It can request a concrete deployment or a virtual model such as auto. For every successful routed request the gateway reports the deployment it selected. The decision record identifies the requirements, evidence and admission result.
Routing under load
The default observation mode records serving latency and expected admission wait on each eligible deployment. Operators can choose routing.load.mode: prefer to move an unpinned chat request to another eligible model within their configured quality margin. A request can tighten the alias’s admission wait or estimated response-time budget. The gateway reports its choice in the decision record. For example, add "modelsaar": {"budget": {"max_wait_ms": 120}} to a compatible chat request to allow up to 120 ms of admission waiting. Model generation and transport add to the caller’s elapsed time. A strict estimated latency target can refuse a request before dispatch. Context, capabilities, privacy and continuity still take precedence.
A two-host check sent a chat to a free Mac CPU model while the preferred GX10 deployment was handling another request. An explicitly addressed request to the same busy GX10 honored its own wait limit.
Stable interfaces
- Installation and upgrade. The Python wheel supplies the
modelsaarcommand on Windows, macOS and Linux. The POSIX installer supports macOS, Linux and WSL2. The server can run in the foreground on all three systems. The packaged Linux service and the Docker image have separate installation instructions. - Local inference. Ollama and OpenAI-compatible runtimes can run on the gateway host or on an operator-configured endpoint. Actual model, runtime, context and request capabilities determine eligibility. The gateway discovers the models on its configured endpoints. It never downloads weights in response to ordinary inference traffic.
- Application protocols. Model listing, chat, streamed chat, tool-result continuity, embeddings with verified identities, and the documented subsets of Responses and Messages use the request and response shapes described in the protocol guide. Unsupported operations return an explicit error. Backend capabilities and optional features are listed in the acceptance matrix.
- Privacy and operation. The default is local-only with an authenticated inference endpoint. The operator chooses whether to enable extra state, hosted tools, downloads, placement, or experimental routing policies. These features keep their documented input, capability and resource restrictions.
- Compatibility. The 1.x line preserves the documented public request formats, configuration version and CLI entry points. Model selection can change with observed performance, live capacity, model inventory or policy settings. Consumers should use the decision record for individual requests. The default installation keeps the existing keys and configuration on upgrade.
What the tests establish
Native operating-system checks exercise the packaged gateway. A separate native CPU check uses a pinned llama.cpp binary and a real SmolLM2 model to generate text and stream it on Windows, macOS and Linux. The project also has real Ollama and vLLM runs on specific deployments. The matrix gives the version and evidence for each claim. A GPU, model or backend release can add or remove a capability independently of the gateway.
On an ARM64 GX10, candidate commit 8ae087660a88 discovered a real vLLM deployment’s 2,048-token served context for Qwen2.5-0.5B-Instruct. Its chat-template counts of 32, 684 and 722 matched the backend’s reported prompt usage on three English and Chinese inputs. The router recorded three completed latency observations for that deployment.
The built-in evaluator isolation check passed all five checks on the Apple silicon Mac with the native backend explicitly enabled. It verified the evaluator runner, file read and write restrictions, network isolation and the wall-clock timeout.
OpenCode, OpenClaw and Hermes each read a synthetic file through their own tools and returned the retrieved value through ModelSaar. Those sessions used a macOS client and the GX10 as the Ollama host. See the client record. Historical routing-quality studies report mixed results over 32 tasks. No published study establishes a universal best router.
The output-budget follow-up repeated 19 model/task pairs previously flagged for short answers. Two passed at 400 output tokens and sixteen at 1,600. This was a targeted study of prior failures on the GX10.
Upgrade and rollback
Install into the existing environment with python -m pip install --upgrade modelsaar==1.0.0, or use the guided installer for installations managed by that installer. Keep a private backup of the configuration, keys and state database and use the same home when changing environments. The release procedure describes the Linux service upgrade and rollback. The previous production version was 0.3.0.
Verified distributions: PyPI and Linux amd64/arm64 container.