Files
hermes-webui/api
Kim Pedersen 0f7f3b6740 fix: match picker's sticky-before-plural ordering for provider card
The model picker (api/config.py:7308-7314) places the singular ``model``
field first, then appends unique IDs from the ``models`` catalog with
dedup. The Providers card was doing the opposite — dropping the singular
model entirely when a non-empty catalog existed.

This caused a silent disagreement: the picker showed the sticky default
model first, while the Providers card omitted it. Verified empirically
with ``model: sticky-default, models: {Best, Fast}`` — picker returned
the sticky model, card did not.

Now the card uses the same sticky-before-plural ordering as the picker:
singular model first (stripped), then _configured_model_ids appended
with dedup.

Updated tests:
- test_singular_model_appears_first_before_dict_models (was
  test_dict_models_ignore_legacy_model_field): now asserts sticky-first
  ordering instead of exclusion
- test_whitespace_and_duplicate_keys_normalized: updated for sticky-first
  prepend
2026-08-07 22:36:19 +00:00
..
2026-07-22 18:45:24 +00:00