Skip to content

b309

Choose a tag to compare

@github-actions github-actions released this 03 Sep 23:16
c112e70

feat(config): merge every config file into one llmman.conf (#396)

Provider API keys could only be supplied as environment variables. That
fits a session you started yourself and not a login shell, a systemd
unit, or a machine with a dozen providers configured, where the
alternative is exporting secrets from a shell rc file.

Add a [providers.<id>] table holding api_key, keyed by the id
llmman providers prints rather than by the variable, which is
models.dev's naming and not llmman's. The environment still wins, as it
does for aws and gh: the file is the standing answer and an export is
the deliberate, this-session-only override. Resolution goes through one
choke point, so the CLI and the daemon pick a key up the same way, and
every "no API key" message now names both places to put one.

Rather than add a third config file, fold shortnames.conf and
verify.conf in as [aliases] and [verify]. One file is parsed once
and shared, but a parse failure still means different things to
different readers: verification refuses to run, because a policy llmman
cannot read must not be mistaken for one that does not exist, while
aliases and keys degrade to none. The error is reported once, centrally.

Search only /etc/llmman/ and ~/.config/llmman/, on every platform, with
no environment variable to move them. The /usr/share, install-tree and
beside-the-binary tiers never had anything shipped to them and are
world-readable, which llmman.conf cannot be.

A file carrying a key must not be readable by group or other, the way
ssh refuses a loose private key. The check gates the keys alone, not the
read, so a world-readable /etc/llmman/llmman.conf still supplies the
aliases and trust policy that are not secrets.