This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/bigtop-manager.git
The following commit(s) were added to refs/heads/main by this push:
new d560510a fix: ensure model options update correctly when adding LLM
config (#292)
d560510a is described below
commit d560510aa2e64b1b6d356772e2ed72bef62224c2
Author: Fdefined <[email protected]>
AuthorDate: Mon Dec 22 17:03:24 2025 +0800
fix: ensure model options update correctly when adding LLM config (#292)
---
.../system-manage/llm-config/components/add-llm-item.vue | 13 ++++++++++---
bigtop-manager-ui/src/store/llm-config/index.ts | 3 +--
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git
a/bigtop-manager-ui/src/pages/system-manage/llm-config/components/add-llm-item.vue
b/bigtop-manager-ui/src/pages/system-manage/llm-config/components/add-llm-item.vue
index 2bab5961..4dcb83d5 100644
---
a/bigtop-manager-ui/src/pages/system-manage/llm-config/components/add-llm-item.vue
+++
b/bigtop-manager-ui/src/pages/system-manage/llm-config/components/add-llm-item.vue
@@ -174,12 +174,19 @@
>
<template #platformId="{ item }">
<a-select
- v-model:value="item[item.field]"
- :options="item.props?.options"
- :placeholder="t('common.select_error',
[t('llmConfig.model').toLowerCase()])"
+ v-model:value="currPlatform[item.field]"
+ :options="item?.props?.options"
+ :placeholder="t('common.select_error',
[t('llmConfig.platform_name').toLowerCase()])"
@change="onPlatformChange"
></a-select>
</template>
+ <template #model="{ item }">
+ <a-select
+ v-model:value="currPlatform[item.field]"
+ :options="item?.props?.options"
+ :placeholder="t('common.select_error',
[t('llmConfig.model').toLowerCase()])"
+ ></a-select>
+ </template>
</form-builder>
<template #footer>
<footer>
diff --git a/bigtop-manager-ui/src/store/llm-config/index.ts
b/bigtop-manager-ui/src/store/llm-config/index.ts
index 2ecb3c7e..e1d763c8 100644
--- a/bigtop-manager-ui/src/store/llm-config/index.ts
+++ b/bigtop-manager-ui/src/store/llm-config/index.ts
@@ -50,8 +50,7 @@ export const useLlmConfigStore = defineStore(
const formKeys = computed(() => formCredentials.value.map((v) => v.name))
const isDisabled = computed(() => loading.value || loadingTest.value)
const supportModels = computed(() => {
- const { platformId } = currPlatform.value
- return platforms.value.find((item) => item.id ===
platformId)?.supportModels
+ return platforms.value.find((item) => item.id ===
currPlatform.value.platformId)?.supportModels
})
const authCredentials = computed(() =>
formCredentials.value.map((v) => ({