openalice-ml
Rust/Axum HTTP service that runs local ONNX ML inference for the OpenAlice platform — providing dense text embeddings (BGE-M3, 1024-dim, 100+ languages), cross-encoder reranking (BGE-Reranker-Base), and a lightweight pattern-based NER fallback. All three capabilities are exposed on a single service listening on port 8103 and are consumed by `openalice-ml-gateway` (auth / rate-limit / usage metering) before reaching upstream callers.
Architecture rating
Strong substrate adoption: manifest 100/valid, drift 90, zero circular deps and zero dead imports, single typed axum service cleanly fronted by the gateway — uniform with OpenAlice conventions, only minor env drift (PORT declared-unused).
Solid README (models, dims, ports, consumer described) plus AGENTS.md and valid manifest with 6 @feature annotations, but roadmap weak (30/100) and 20 missing in-code docstrings leave architecture notes thin.
Rust/axum with working /health (200, 3ms) and 100% 24h uptime, but no evidence of request timeouts, retries, or graceful SIGTERM shutdown; 1 god module and max cyclomatic complexity 18 concentrate risk in the inference path.
Stateless ONNX inference service that delegates ALL authn/rate-limit/usage metering to openalice-ml-gateway — no in-repo auth, headers, or input-size guards visible; exposed publicly at ml.blal.pro relying entirely on the gateway as the trust boundary.
No owned tables, migrations, or persistence (manifest_owns_tables=[]); stateless by design so a data layer is genuinely absent — no schema/FK/RLS/GDPR surface to grade, scored conservatively for lack of any data-tier signal.
Only a GET /health liveness probe plus GET /v1/models; no metrics endpoint, tracing, or structured-log evidence in Atlas signals — health is externally monitored (uptime 100%) but in-service instrumentation appears absent.
No tests directory and no test signal from the inspector (migrations/tests presence empty) — critical paths (embed/rerank/NER tokenization, ONNX I/O) are entirely unverified by automated tests.
source · auto-grader-2026-06-16
Ecosystem manifest
.atlas-deps.ymlRust axum ML inference service — embeddings (BGE-M3), reranking (BGE-Reranker-Base), and pattern-based NER; delegates full GLiNER NER to openalice-ner.
- via NER_SERVICE_URLDelegate GLiNER zero-shot NER requests to the sibling service on port 8104; this service provides pattern-based NER as a lightweight local fallback.
- ML_API_KEY
- PORT
- http_endpoint: POST /v1/embed
- http_endpoint: POST /v1/rerank
- http_endpoint: POST /v1/ner
- http_endpoint: GET /v1/models
- http_endpoint: GET /health
- docker_image: openalice-ml
Atlas grepped the repo's source for env reads (rust env::var · ts process.env · py os.environ · shell $VAR) and diffed against the manifest's consumes_env. Two lists below: stale declarations and undeclared reads.
- PORT
Code composition
tokei · loc- Rust95.8%
- TOML2.3%
- Dockerfile2.0%
- Rust95.8%
- TOML2.3%
- Dockerfile2.0%
- Rust95.8%· 633
- TOML2.3%· 15
- Dockerfile2.0%· 13
| Language | % code | code | comments | blanks | files |
|---|---|---|---|---|---|
| Rust | 95.8% | 633 | 83 | 100 | 1 |
| TOML | 2.3% | 15 | 6 | 5 | 1 |
| Dockerfile | 2.0% | 13 | 3 | 7 | 1 |
| Markdown | 0.0% | 0 | 59 | 23 | 2 |
Telemetry ribbon · last 90 days
1 eventml/embeddings
1 feature- ml.embed.generatesrc/main.rs:366>POST /v1/embedsince 0.1.0
ml/health
1 feature- ml.health.checksrc/main.rs:264>GET /healthsince 0.1.0
ml/models
1 feature- ml.models.listsrc/main.rs:328>GET /v1/modelssince 0.1.0
ml/ner
1 feature- ml.ner.extractsrc/main.rs:627>POST /v1/nersince 0.1.0
ml/reranking
1 feature- ml.rerank.scoresrc/main.rs:500>POST /v1/reranksince 0.1.0
ml/service
1 feature- ml.service.cratesrc/main.rs:15>POST /v1/embedPOST /v1/rerankPOST /v1/nerGET /v1/modelsGET /healthsince 0.1.0