User-supplied OpenAI-compatible provider configuration. All fields are
optional — when matching a built-in registry entry, only the supplied
fields override; the rest fall back to the registry defaults. For
fully custom providers, base_url and api_key_env are required.
Like load_config but never fails: if a config file exists yet is
malformed, warn on stderr and fall back to defaults — instead of silently
swallowing the error (#111). An absent file is not an error (load_config
returns defaults for it), so the warning fires only for a genuine
read/parse failure the user should know about.
Persist the user’s default reasoning level to config file. Mirrors
persist_last_model — used by the /reasoning slash command and the
Alt+T cycle handler so the choice survives across sessions.
Persist the last used model to config file. On a malformed config it
propagates the error (the caller drops it) rather than clobbering the file
with defaults — the three persist_* helpers all do this (#111).
Persist a reasoning level for a specific model ID
(e.g. anthropic/claude-sonnet-4-6). The TUI calls this from Alt+T,
/reasoning <level>, and the does-not-support-thinking auto-snap so
the choice sticks per-model rather than bleeding into other models on
next session start.