Skip to content

v0.13.2: an explicit flag now beats the environment variable

Choose a tag to compare

@Helldez Helldez released this 20 Jul 05:58

Internal cleanup found by a file-by-file audit. No engine or streaming behaviour changed.

An explicit flag now really does beat the environment variable

bmoe-cli documents, twice, that a flag always wins over the matching BMOE_* override. It
decided whether a flag had been passed by asking whether the field still held its default —
a different question for any flag whose default is a value someone might deliberately pass.

invocation before after
BMOE_IO_THREADS=8 --io-threads 4 8 4
BMOE_CACHE_MB=2000 --cache-mb 0 (cache off) 2000 0
BMOE_CACHE_MB=2000 (no flag) 2000 2000
--cache-mb auto with the variable set auto auto

--prefetch 0 and --n-expert-used 0 had the same shape. The app passes --io-threads <n> on
every run and --cache-mb 0 in its cache-off branch, so it was exposed to this.

The parse loop now records which flags it was given and the overrides consult that set. The last
two rows are the no-regression cases: an environment variable on its own still applies, and
--cache-mb auto still computes its budget. Resolution still sits between parsing and
validation, so values arriving from the environment are validated exactly as before.

The app's unused gguf architecture probe is gone

GgufHeader.arch() existed "to pick the right chat turn format" and had no callers. That job is
not the app's: --chatml initialises the chat templates from the model itself, so the format
comes from the gguf that declares it, and the one architecture-dependent decision the UI acts on
— whether thinking can be switched off — is measured by the engine at load and reported as
think_ctl. Wiring the probe up would have meant selecting behaviour from a model name. Removed
along with the two helpers only it reached; MoE detection is untouched.

Verification

All host gates green, byte-identity included. The precedence table above is measured end to end
against the tiny gate model, reading io_threads and cache_mb back out of the CSV preamble;
the "before" column follows from the previous guards. No on-device A/B is owed — no engine path
changed.

Install: app-dev-release.apk (signed with the project's stable key, so it updates any
earlier sideloaded build in place).