fix: prevent stale OAuth model provider selection

Render the OAuth model provider select as unchosen when the stored model slot still points at a non-connected or non-OAuth provider. This avoids showing Codex/ChatGPT as selected while the model input remains disabled, keeping account-backed model selection explicit.

Alessandro committed Jul 2, 2026 at 16:53 UTC da505de50af8ea27606d350bc63b634e1c3fb433
2 files changed +2 -1
plugins/_oauth/webui/config.html
+1 -1
@@ -217,7 +217,7 @@
217 <label class="oauth-model-provider-field">
218 <span>Provider</span>
219 <select
220 - :value="$store.oauthConfig.modelSlot(slot.key).provider"
220 + :value="$store.oauthConfig.slotCanUseModels(slot.key) ? $store.oauthConfig.modelSlot(slot.key).provider : ''"
221 @change="$store.oauthConfig.useProviderForSlot(slot.key, $event.target.value)"
222 :disabled="!$store.oauthConfig.connectedProviderCards().length"
223 >
tests/test_oauth_static.py
+1
@@ -23,6 +23,7 @@ def test_oauth_settings_exposes_provider_cards_and_model_slots():
23 assert "slotProviderChoices(slot.key)" in config_html
24 assert "connectedProviderCards().length" in config_html
25 assert "useProviderForSlot(slot.key, $event.target.value)" in config_html
26 + assert ":value=\"$store.oauthConfig.slotCanUseModels(slot.key) ? $store.oauthConfig.modelSlot(slot.key).provider : ''\"" in config_html
27 assert "slotCanUseModels(slot.key)" in config_html
28 assert "<span>Account</span>" not in config_html
29 assert "oauth-connected-panel" not in config_html