Files
hermes-agent/hermes_cli
ahisblessed 4ec2e50b3c fix(cli): let persist_switch_by_default cover provider-scoped model picks
resolve_persist_behavior() hard-coded the provider-scoped path as exploratory
(return False before the config default was read), so
model.persist_switch_by_default: true was silently ignored whenever --provider
was passed - which is the exact shape the Desktop picker sends.

For twin provider pairs (two custom_providers entries sharing one base_url with
different keys) that is not exploration of a different backend: it is tenant or
account selection on the same backend. The session-scoped pick is dropped, and
the next chat re-derives the provider from the shared base_url, which
deterministically returns one fixed twin - the request is then served with the
other tenant's key, silently: wrong credentials, quotas and billing, no error.

Read the flag before the explicit_provider bail-out so an opt-in to persistence
covers provider picks too. --session and --once stay the explicit opt-outs and
--global still persists; without the flag provider picks remain exploratory, so
the existing behavior is unchanged for everyone who never set the key.

Fixes #123150
2026-10-02 22:40:31 -05:00
..
…
…
…
…
…