Files
openchamber/packages/ui
Adrian EckardtandBohdan Triapitsyn 5cde9ca88c fix: switch model when selecting an agent (#1362)
* fix: switch model when selecting an agent

The early return in setAgent() checked if the current model was valid
and returned immediately without ever falling through to the agent's
configured model. This meant selecting an agent never updated the
model dropdown to match the agent's preferred model.

Removing the early return allows the fallback chain to work correctly:
1. Persisted session-specific agent-model selection
2. Settings default model
3. Agent's own model (previously unreachable)
4. No change (current model stays)

* fix: prefer agent model over saved selection

* fix: preserve restored model on agent hydration

---------
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
2026-05-26 02:19:54 +03:00
..
2026-05-25 19:32:26 +03:00