Scan your whole stack
From OX Research Newsroom
Are you using llama-sync?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.0.6
llama-sync was last scanned on 30 Nov 2026 at version 1.0.6. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.0.6 LATEST | 30 Nov 2026 | No rules fired |
| 1.0.5 | 30 Nov 2026 | No rules fired |
| 1.0.4 | 29 Nov 2026 | No rules fired |
| 1.0.3 | 28 Nov 2026 | Not shown |
| 1.0.1 | 3 Oct 2026 | Not shown |
Findings for v1.0.6. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.0.6; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
OpenCode V2 plugin that keeps a live model inventory for one or more
llama.cpp providers: one entry watches each configured llama-server
(router or single-instance) over its management endpoints and publishes
the models — with correct limits, capabilities, and thinking/reasoning
variants — to OpenCode automatically. Add a preset on the service
and it appears in /models without touching opencode.jsonc.
OpenCode's built-in model discovery covers only Ollama, LM Studio, and vLLM; for any other OpenAI-compatible runtime its documentation prescribes the custom-provider recipe with models listed by hand. This plugin is the llama.cpp version of that recipe, and it stays current while the service changes.
GET /models, fetched at startup and refreshed on service
events (router SSE) and by a periodic safety-net poll. A preset added
or removed on the service appears or disappears in /models within
one refresh cycle — no restart, no config edit.opencode.jsonc — display names, limits,
capabilities, and variants live in versioned plugin options
(overrides / aliases / defaults), not the global config.GET /props, so a model whose chat template supports
reasoning_effort gets a variant per level the service reports it
maps (the structured fields, b11944 and later — older builds simply
get no effort variants).The providers themselves need no opencode.jsonc entry: the plugin
provisions each managed provider — the OpenAI-compatible package, an
enabled activation, and the service settings (url and headers) — the
same way a hand-written config entry would, so the plugin's own requests
and OpenCode's chat requests both reach the service (and carry the
headers). If you keep a providers.<id> entry for a managed provider,
its values win per key over the provisioned ones.
The service URL is the url option. The root form (no trailing
/v1) is canonical — llama.cpp serves /props and /models/sse at the
root — and a trailing /v1 is tolerated and stripped where needed. A
providers.<id> entry's settings.baseURL wins over the option, and
url may be omitted entirely when one exists.
llama-server, recent build) in either mode:
router mode (multiple presets, each a child process) or a plain
single-instance server (one model). The plugin needs a build that
serves GET /props with chat_template_caps and the /models
data[] list (all recent builds); without the caps object it degrades
cleanly (no auto-variants, tools capability falls to the default).
Effort variants additionally need the structured
reasoning_effort_levels field added in b11944 — on older builds the
plugin runs unchanged and simply emits no effort variants.The plugin loads from an explicit plugins entry — never from a
discovery path (a directory under a discovery path would load twice).
Published (npm):
opencode plugin add llama-sync # npm
opencode plugin add llama-sync@latest # npm, auto-updating
opencode plugin add github:mattzink/llama-sync # or from git
opencode plugin add writes a bare entry to your global config (the
command prints which file) — that is all it can express (plugin add
takes only a package spec, there is no options flag). That entry has no
options, so the plugin has no providers to manage and stays inert —
replace it with the object form to configure at least one provider:
{
"plugins": [
{
"package": "llama-sync@latest",
"options": { "local-llama": "http://host:8080" }
}
]
}
The options object maps provider id → service base URL (a bare
string) or provider id → per-provider options (an object; see
Options). One entry manages every provider in the map, and
the plugin provisions each provider for OpenCode — the
OpenAI-compatible package, an enabled activation, and the service
settings — so no providers section is needed.
Existing providers entries keep working. A providers.<id> entry
for a managed provider still supplies that provider's settings — its
values win per key over the provisioned ones — and the url option may
be omitted entirely (the record's settings.baseURL becomes the URL
source). The two forms compose:
{
"providers": {
"local-llama": {
"name": "local-llama",
"package": "aisdk:@ai-sdk/openai-compatible",
"settings": { "baseURL": "http://host:8080/v1" }
}
},
"plugins": [
{
"package": "llama-sync",
"options": { "local-llama": {} }
}
]
}
Pre-map entries keep working. A options object with a top-level
providerID key (the single-provider flat form from before the map) is
still read as one provider's options, named by that key — no migration
needed; the map form above is preferred.
If models never appear, check the log:
no providers configured: options must map each provider id to its options (or a bare base URL); plugin is inert means the entry has no
options at all, and
<id>: no service URL (no url option and no settings.baseURL in the provider record); provider is inert means that provider's url is
missing and no providers.<id> entry supplies one.
Keeping up to date. An entry whose package spec names a moving
target — llama-sync@latest, or a version range such as
llama-sync@^1.0.0 — updates itself on opencode ≥ 2.4.0: the runtime
checks for a newer match at startup and every 24 hours, and installs
and reloads it without a restart; if a new version fails to load, the
previous one keeps running. A bare llama-sync entry (what
opencode plugin add llama-sync writes) is checked and reported, but
not installed — to move it:
opencode plugin update llama-sync
opencode service restart
Pinned entries (e.g. llama-sync@1.0.42) are skipped by updates by
design — change the version in config to move them.
First boot. The plugin re-seeds each provider from the inventory it
stored on its previous run, so the models are present in /models
immediately on restart. On a brand-new install (no stored inventory
yet) the models appear as soon as the first refresh succeeds — usually
within ~1 s: the first refresh runs during plugin setup, and the SSE
catch-up refresh (or, without SSE, the first poll) covers the startup
window.
The options object maps provider id → per-provider options: a bare
string value is shorthand for { "url": "…" }, and one entry manages
every provider in the map. Set options in the options object of your
plugin entry (see Install); if you're running from a
checkout, you can instead keep them in an options.jsonc file next to
src/index.ts — start from
options.example.jsonc, which documents the
full option set, key by key. When both are present they merge per
provider, per key, with the opencode.jsonc value winning. A few of
the important ones (all per provider):
| Key | Default | Description |
|---|---|---|
url |
null |
The service's base URL (http/https). The root form (no trailing /v1) is canonical — llama.cpp serves /props and /models/sse at the root — and a trailing /v1 is tolerated and stripped where needed. A providers.<id> config entry's settings.baseURL wins over the option; with neither present the provider is inert (one log line after a cycle) |
headers |
{} |
Headers sent on the plugin's own requests — and, via the provisioned provider record, on OpenCode's chat requests too. E.g. Authorization for a router behind --api-key |
sse / refreshMs |
true / 30000 |
The trigger pair: with SSE active, router events drive refreshes and the poll is the safety net that bounds staleness; on plain servers (or sse: false) the poll is the sole trigger |
includeUnloaded / disableUnloaded |
true / false |
Policy for router presets with status.value === "unloaded": selectable (a service with on-demand loading can serve them), visible-but-disabled, or hidden. Inert on plain single-instance servers |
excludeModels |
"^models--" |
Discovered model names matching this regex (a JS regex source, .test semantics) are never registered — no props fetches, no props-cache entries, aliases targeting them are skipped. The default hides the models--… names the router assigns to models it discovers in the models directory rather than in the preset file (the Hugging Face cache layout models--<org>--<repo>); null disables the filter |
autoVariants |
true |
Derive thinking/reasoning variants from GET /props — one effort variant per level the service reports (reasoning_effort_levels, b11944 and later) plus no-think when the template supports enable_thinking; variantReasoningEfforts restricts the emitted set, noThinkVariant toggles no-think |
propsForUnloaded |
"never" |
"never" keeps the plugin read-only (props only for running models). "autoload" also fetches props for unloaded models — the router loads them on demand, which can LRU-evict the active model at max_instances: 1. Use only knowingly |
propsCache |
true |
Persist the last-known per-model projection (whitelisted scalars only) so an unloaded model keeps its previously derived values; fresh props always win |
overrides / aliases / defaults |
{} / {} |
Per-model overrides (keyed by model id), extra catalog entries aliasing a discovered model, and the fallback values — see options.example.jsonc |
Router vs plain server. Both work. Router mode additionally reports
status (load state), architecture (input/output modalities), and
serves the SSE event stream; a plain single-instance server has none of
these and the plugin falls back through the derivation chain (props
modalities → defaults; no status → treated as loaded).
/props and the chat_template hazard. The props endpoint returns
the model's raw Jinja chat_template. Some templates embed
media-placeholder tags (__media__) that look like multimodal media
references to the model — letting the template text reach storage,
logs, or an LLM context can poison agent turns. This plugin reads the
template in place for one bounded signal (enable_thinking
presence), takes the effort levels from the structured capability
fields instead, and discards the template: no template text ever
survives the parse boundary into storage, the inventory, logs, or error
messages. The same applies when you probe the service yourself — filter
the response (e.g. a jq whitelist) so the ~10 KB template never enters
your conversation context.
Change notification. Routers broadcast model changes on
GET /models/sse (no keepalive, no history). The stream is treated as a
change detector, never a data source: every event and every (re)connect
triggers a full re-fetch, and the refreshMs poll runs unconditionally
as a safety net that bounds worst-case staleness.
Stream lifetime. The router sends nothing on an idle stream (no
periodic ping), and client HTTP stacks — and some middleboxes — close
idle connections after a few minutes. When that happens the plugin logs
one warning, reconnects with backoff (1 s → 60 s), and immediately runs
a catch-up refresh; any event missed during the gap is picked up by the
next refreshMs poll, so model changes are never stale for more than
one poll interval.
Unloaded models and the props cache. Full props require a running
instance (autoload=false + unloaded → 400 by design; defaulting to
autoload would load models and, on max_instances: 1 routers,
LRU-evict the active one — so the default is "never"). A model that
has ever been loaded keeps its derived values afterwards, because the
last-known props projection is persisted; only never-loaded presets run
on defaults. With --sleep-idle-seconds, a sleeping model still
answers /props, so props stay fresh through the sleep window.
If your selected default model is removed from the service
inventory, OpenCode surfaces Model unavailable; the plugin never
auto-reselects.
Everything below is for people who work on the plugin itself, not for users.
mise install # node + pnpm per mise.toml / package.json
pnpm install
pnpm typecheck
pnpm test # pure modules only — no opencode runtime, network, or filesystem
Live verification (the real plugin in an isolated opencode service
against the router and a mock router) is manual, driven by
scripts/e2e-oc-server.mjs — start/reuse/stop/wipe the isolated
scratch in --provider <id>=<baseURL> or --mock mode —
docs/testing.md §3.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.