fix: normalize /provider multi-model selection and semicolon parsing (#841)

* fix provider multi-model selection

* fix provider manager multi-model save path
This commit is contained in:
JATMN
2026-04-24 11:28:14 -07:00
committed by GitHub
parent b5f7047358
commit c4cb98a4f0
8 changed files with 439 additions and 59 deletions

View File

@@ -125,8 +125,8 @@ const FORM_STEPS: Array<{
{
key: 'model',
label: 'Default model',
placeholder: 'e.g. llama3.1:8b or glm-4.7, glm-4.7-flash',
helpText: 'Model name(s) to use. Separate multiple with commas; first is default.',
placeholder: 'e.g. llama3.1:8b or glm-4.7; glm-4.7-flash',
helpText: 'Model name(s) to use. Separate multiple with ";" or ","; first is default.',
},
{
key: 'apiKey',
@@ -780,19 +780,14 @@ export function ProviderManager({ mode, onDone }: Props): React.ReactNode {
// Update the session model to the new provider's first model.
// persistActiveProviderProfileModel (called by onChangeAppState) will
// not overwrite the multi-model list because it checks if the model
// is already in the profile's comma-separated model list.
// is already in the provider's configured model list.
const newModel = getPrimaryModel(active.model)
setAppState(prev => ({
...prev,
mainLoopModel: newModel,
}))
providerLabel = active.name
setAppState(prev => ({
...prev,
mainLoopModel: active.model,
mainLoopModelForSession: null,
}))
providerLabel = active.name
const settingsOverrideError =
clearStartupProviderOverrideFromUserSettings()
const isActiveCodexOAuth = isCodexOAuthProfile(
@@ -996,7 +991,7 @@ export function ProviderManager({ mode, onDone }: Props): React.ReactNode {
if (isActiveSavedProfile) {
setAppState(prev => ({
...prev,
mainLoopModel: saved.model,
mainLoopModel: getPrimaryModel(saved.model),
mainLoopModelForSession: null,
}))
}