mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
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.
This commit is contained in:
parent
0a9e15be87
commit
da505de50a
2 changed files with 2 additions and 1 deletions
|
|
@ -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"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ def test_oauth_settings_exposes_provider_cards_and_model_slots():
|
|||
assert "slotProviderChoices(slot.key)" in config_html
|
||||
assert "connectedProviderCards().length" in config_html
|
||||
assert "useProviderForSlot(slot.key, $event.target.value)" in config_html
|
||||
assert ":value=\"$store.oauthConfig.slotCanUseModels(slot.key) ? $store.oauthConfig.modelSlot(slot.key).provider : ''\"" in config_html
|
||||
assert "slotCanUseModels(slot.key)" in config_html
|
||||
assert "<span>Account</span>" not in config_html
|
||||
assert "oauth-connected-panel" not in config_html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue