Agent Zero AI framework
fix: prevent stale OAuth model provider selection
Alessandroda505de50af8
diff --git a/plugins/_oauth/webui/config.html b/plugins/_oauth/webui/config.htmlindex c6153d7be..72177d99d 100644--- a/plugins/_oauth/webui/config.html+++ b/plugins/_oauth/webui/config.html@@ -217,7 +217,7 @@<label class="oauth-model-provider-field"><span>Provider</span><select- :value="$store.oauthConfig.modelSlot(slot.key).provider"+ :value="$store.oauthConfig.slotCanUseModels(slot.key) ? $store.oauthConfig.modelSlot(slot.key).provider : ''"@change="$store.oauthConfig.useProviderForSlot(slot.key, $event.target.value)":disabled="!$store.oauthConfig.connectedProviderCards().length">diff --git a/tests/test_oauth_static.py b/tests/test_oauth_static.pyindex b45803a64..4dac3b18f 100644--- a/tests/test_oauth_static.py+++ b/tests/test_oauth_static.py@@ -23,6 +23,7 @@ def test_oauth_settings_exposes_provider_cards_and_model_slots():assert "slotProviderChoices(slot.key)" in config_htmlassert "connectedProviderCards().length" in config_htmlassert "useProviderForSlot(slot.key, $event.target.value)" in config_html+ assert ":value=\"$store.oauthConfig.slotCanUseModels(slot.key) ? $store.oauthConfig.modelSlot(slot.key).provider : ''\"" in config_htmlassert "slotCanUseModels(slot.key)" in config_htmlassert "<span>Account</span>" not in config_htmlassert "oauth-connected-panel" not in config_html