Skip to content

Commit 261bb1e

Browse files
committed
fix: ensure model options update correctly when adding LLM config
1 parent c0d667d commit 261bb1e

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

bigtop-manager-ui/src/pages/system-manage/llm-config/components/add-llm-item.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,19 @@
174174
>
175175
<template #platformId="{ item }">
176176
<a-select
177-
v-model:value="item[item.field]"
178-
:options="item.props?.options"
179-
:placeholder="t('common.select_error', [t('llmConfig.model').toLowerCase()])"
177+
v-model:value="currPlatform[item.field]"
178+
:options="item?.props?.options"
179+
:placeholder="t('common.select_error', [t('llmConfig.platform_name').toLowerCase()])"
180180
@change="onPlatformChange"
181181
></a-select>
182182
</template>
183+
<template #model="{ item }">
184+
<a-select
185+
v-model:value="currPlatform[item.field]"
186+
:options="item?.props?.options"
187+
:placeholder="t('common.select_error', [t('llmConfig.model').toLowerCase()])"
188+
></a-select>
189+
</template>
183190
</form-builder>
184191
<template #footer>
185192
<footer>

bigtop-manager-ui/src/store/llm-config/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ export const useLlmConfigStore = defineStore(
5050
const formKeys = computed(() => formCredentials.value.map((v) => v.name))
5151
const isDisabled = computed(() => loading.value || loadingTest.value)
5252
const supportModels = computed(() => {
53-
const { platformId } = currPlatform.value
54-
return platforms.value.find((item) => item.id === platformId)?.supportModels
53+
return platforms.value.find((item) => item.id === currPlatform.value.platformId)?.supportModels
5554
})
5655
const authCredentials = computed(() =>
5756
formCredentials.value.map((v) => ({

0 commit comments

Comments
 (0)