1.3 KiB
1.3 KiB
Model Gateway
Gateway for routing OpenAI-compatible API requests to local llama-server instances.
Architecture
Client / Hermes | v model-gateway :8090 | v modelctl | v llama-server | v GPU
Components
- gateway.py — OpenAI-compatible HTTP gateway
- modelctl — model lifecycle manager
- models.json — model configuration
- llama-server — llama.cpp inference backend
Gateway
Default listen address: 0.0.0.0:8090
Endpoints
GET /health GET /v1/models GET /props GET /props?model=
POST /v1/chat/completions POST /v1/completions
Model management
modelctl list modelctl list --json modelctl status modelctl load modelctl stop
Diagnostics
modelctl status nvidia-smi ps aux | grep '[l]lama-server' curl http://127.0.0.1:8090/health curl http://127.0.0.1:8090/v1/models curl http://127.0.0.1:8090/props
Deployment
Machine-specific settings such as llama.cpp path, GGUF paths, GPU parameters and ports should be kept in configuration.
Current status
Baseline repository for the local model gateway.
Further work:
- reliable model switching
- clean model shutdown
- model logging
- installation/deployment script
- systemd integration
- complete model configuration documentation
- troubleshooting guide