yams/plugins/glint
trvon cf02477125
fix(glint): load ONNX Runtime at runtime instead of linking it
On Linux the Glint plugin always built in mock mode: meson found the ONNX
Runtime headers but its find_library('onnxruntime') looked in a libdir
taken from the already-normalized dependency, found nothing, and dropped
YAMS_USE_ONNX_RUNTIME, so GLiNER never ran (the v0.20.3 deb's glint has
no ONNX Runtime dependency either). On macOS it linked Homebrew's copy
directly.

Glint now uses the shared ONNX Runtime loader like the ONNX plugin: it
compiles against the headers only (ORT_API_MANUAL_INIT through
ort_cxx_api_wrapper.h), and before creating the session it resolves a
runtime with the same system-first, bundled-fallback policy. If none is
available the session reports "ONNX Runtime unavailable: ..." and entity
extraction is disabled instead of silently running the mock. Plugin
health gains an onnx_runtime object (available, source, version, path or
error), and [plugins.glint] runtime_library pins a copy.

Verified on grim (Linux, release, staged tree in a clean debian:testing
container): "Glint plugin: ONNX Runtime enabled (loaded at runtime)" at
configure, "[Glint] Loaded ONNX model with 6 inputs, 5 outputs" at run
time, and the daemon's title+NL stage extracts entities ("nl=5" for a
document naming people, companies, a place and a date).

Signed-off-by: trvon <me@trevon.dev>
2026-10-01 22:42:15 -06:00
..
gliner_session.cpp fix(glint): load ONNX Runtime at runtime instead of linking it 2026-10-01 22:42:15 -06:00
gliner_session.h cleaning up gliner pipeline and limit to a signal thread so onnx can consume the rest of the pool for embeddings 2026-01-19 19:35:34 -05:00
meson.build fix(glint): load ONNX Runtime at runtime instead of linking it 2026-10-01 22:42:15 -06:00
plugin.cpp fix(glint): load ONNX Runtime at runtime instead of linking it 2026-10-01 22:42:15 -06:00
README.md build: standardize the Debug build dir on build/debug (#248) 2026-10-01 08:45:20 -06:00

Glint Plugin

GLiNER-based natural language entity extraction for YAMS.

Interface

entity_extractor_v2 (v2) - see include/yams/plugins/entity_extractor_v2.h

Supported Content

  • text/plain
  • text/markdown
  • application/json

Entity Types

person, organization, location, date, event, product, technology, concept

Build

meson compile -C build/debug
# Output: build/debug/plugins/glint/yams_glint.{dylib,so,dll}

Environment

  • YAMS_GLINT_MODEL_PATH - ONNX model directory
  • YAMS_GLINT_THRESHOLD - Confidence threshold (default: 0.5)