mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-07 05:39:05 +08:00
parent
56c7a7f066
commit
1103449a4f
@ -2797,9 +2797,21 @@ const migrateConfig = {
|
||||
},
|
||||
'171': (state: RootState) => {
|
||||
try {
|
||||
addProvider(state, 'sophnet')
|
||||
state.llm.providers = moveProvider(state.llm.providers, 'sophnet', 17)
|
||||
state.settings.defaultPaintingProvider = 'cherryin'
|
||||
// Ensure aws-bedrock provider exists
|
||||
addProvider(state, 'aws-bedrock')
|
||||
|
||||
// Ensure awsBedrock settings exist and have all required fields
|
||||
if (!state.llm.settings.awsBedrock) {
|
||||
state.llm.settings.awsBedrock = llmInitialState.settings.awsBedrock
|
||||
} else {
|
||||
// For users who have awsBedrock but missing new fields (authType and apiKey)
|
||||
if (!state.llm.settings.awsBedrock.authType) {
|
||||
state.llm.settings.awsBedrock.authType = 'iam'
|
||||
}
|
||||
if (state.llm.settings.awsBedrock.apiKey === undefined) {
|
||||
state.llm.settings.awsBedrock.apiKey = ''
|
||||
}
|
||||
}
|
||||
return state
|
||||
} catch (error) {
|
||||
logger.error('migrate 171 error', error as Error)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user