Keystone (KTMS) is an open-source LLM gateway written in Go that allows organizations to integrate local GPU hardware alongside cloud providers. Users can register local machines as nodes, which the gateway prioritizes for requests to reduce cloud costs. The system supports Ollama, vLLM, TGI, and llama.cpp, with nodes providing heartbeat metrics every 5 seconds.

The gateway employs a weighted round-robin algorithm for load balancing, factoring in node speed and queue depth. If a local node's estimated wait time exceeds a defined threshold, the request is automatically routed to a cloud provider. The system is designed to handle dependency failures in Postgres, Redis, and accounting services without requiring restarts.

Security features include AES-256-GCM encryption for vendor keys, with versioned keyrings managed via environment variables. Since version 0.14.0, release images are signed using cosign in a keyless mode tied to GitHub Actions OIDC identities. The software includes SBOM and SLSA-provenance to ensure supply chain integrity.

Updates are performed via rolling deployments, with database migrations applied automatically at startup. The system supports a stable public API within the 1.x release cycle. Keystone is distributed under the Apache 2.0 license, providing production-ready features such as distributed tracing, structured logging, and detailed cost tracking.