fix: synchronize chat model configuration (#17717)

This commit is contained in:
buua436
2026-08-03 16:43:53 +08:00
committed by GitHub
parent a12dee5524
commit 8ac047d11a
6 changed files with 126 additions and 78 deletions

View File

@@ -87,6 +87,10 @@ export function ChatSettings({ hasSingleChatBox }: ChatSettingsProps) {
// Add model_type to llm_setting based on the selected llm_id
if (nextValues.llm_id) {
// The model selector returns the tenant model ID. Keep the legacy
// llm_id and the tenant-scoped ID synchronized; the backend gives
// tenant_llm_id precedence when resolving the chat model.
nextValues.tenant_llm_id = nextValues.llm_id;
nextValues.llm_setting = {
...nextValues.llm_setting,
model_type: findLlmByUuid(nextValues.llm_id)?.model_type || 'chat',

View File

@@ -39,6 +39,7 @@ export const useCreateChatDialog = () => {
toc_enhance: false,
},
llm_id: defaultModelDictionary?.llm_id,
tenant_llm_id: defaultModelDictionary?.llm_id,
llm_setting: {},
similarity_threshold: 0.2,
vector_similarity_weight: 0.3,