Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/presenter/configPresenter/providerModelSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,7 @@ export const providerModelSettings: Record<string, { models: ProviderModelSettin
match: ['deepseek-ai/deepseek-v3.1', 'deepseek-v3.1'],
vision: false,
functionCall: true,
reasoning: true
reasoning: false
},
{
id: 'Pro/deepseek-ai/DeepSeek-V3.1',
Expand All @@ -1893,7 +1893,7 @@ export const providerModelSettings: Record<string, { models: ProviderModelSettin
match: ['pro/deepseek-ai/deepseek-v3.1'],
vision: false,
functionCall: true,
reasoning: true
reasoning: false
},
{
id: 'Pro/deepseek-ai/DeepSeek-V3',
Expand Down
106 changes: 104 additions & 2 deletions src/renderer/src/components/settings/ModelConfigDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,12 @@
<p class="text-xs text-muted-foreground">
{{ t('settings.model.modelConfig.functionCall.description') }}
</p>
<!-- DeepSeek-V3.1 互斥提示 -->
<p v-if="isDeepSeekV31Model" class="text-xs text-orange-600">
{{ t('dialog.mutualExclusive.warningText.functionCall') }}
</p>
</div>
<Switch v-model:checked="config.functionCall" />
<Switch :checked="config.functionCall" @update:checked="handleFunctionCallToggle" />
</div>

<!-- 推理能力 -->
Expand All @@ -129,8 +133,12 @@
<p class="text-xs text-muted-foreground">
{{ t('settings.model.modelConfig.reasoning.description') }}
</p>
<!-- DeepSeek-V3.1 互斥提示 -->
<p v-if="isDeepSeekV31Model" class="text-xs text-orange-600">
{{ t('dialog.mutualExclusive.warningText.reasoning') }}
</p>
</div>
<Switch v-model:checked="config.reasoning" />
<Switch :checked="config.reasoning" @update:checked="handleReasoningToggle" />
</div>

<!-- 推理努力程度 (支持推理努力程度的模型显示) -->
Expand Down Expand Up @@ -285,6 +293,26 @@
</DialogFooter>
</DialogContent>
</Dialog>

<!-- DeepSeek-V3.1 互斥确认对话框 -->
<AlertDialog :open="showMutualExclusiveAlert" @update:open="showMutualExclusiveAlert = $event">
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>{{ getConfirmTitle }}</AlertDialogTitle>
<AlertDialogDescription>
{{ getConfirmMessage }}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel @click="cancelMutualExclusiveToggle">
{{ t('dialog.cancel') }}
</AlertDialogCancel>
<AlertDialogAction @click="confirmMutualExclusiveToggle">
{{ t('dialog.mutualExclusive.confirmEnable') }}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</template>

<script setup lang="ts">
Expand All @@ -311,6 +339,16 @@ import {
SelectTrigger,
SelectValue
} from '@/components/ui/select'
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle
} from '@/components/ui/alert-dialog'

interface Props {
open: boolean
Expand Down Expand Up @@ -345,6 +383,13 @@ const config = ref<ModelConfig>({
// 重置确认对话框
const showResetConfirm = ref(false)

// DeepSeek-V3.1 互斥确认对话框
const showMutualExclusiveAlert = ref(false)
const mutualExclusiveAction = ref<{
from: 'reasoning' | 'functionCall'
to: 'reasoning' | 'functionCall'
} | null>(null)

// 错误信息
const errors = ref<Record<string, string>>({})

Expand Down Expand Up @@ -494,6 +539,11 @@ const isGPT5Model = computed(() => {
return modelId.includes('gpt-5')
})

const isDeepSeekV31Model = computed(() => {
const modelId = props.modelId.toLowerCase()
return modelId.includes('deepseek-v3.1') || modelId.includes('deepseek-v3-1')
})

const supportsReasoningEffort = computed(() => {
return config.value.reasoningEffort !== undefined && config.value.reasoningEffort !== null
})
Expand Down Expand Up @@ -585,6 +635,58 @@ const getDisableHint = () => {
}
}

const handleMutualExclusiveToggle = (feature: 'reasoning' | 'functionCall', enabled: boolean) => {
if (!enabled) {
config.value[feature] = false
return
}

const oppositeFeature = feature === 'reasoning' ? 'functionCall' : 'reasoning'

if (isDeepSeekV31Model.value && config.value[oppositeFeature]) {
mutualExclusiveAction.value = { from: feature, to: oppositeFeature }
showMutualExclusiveAlert.value = true
} else {
config.value[feature] = true
}
}

const handleReasoningToggle = (enabled: boolean) => {
handleMutualExclusiveToggle('reasoning', enabled)
}

const handleFunctionCallToggle = (enabled: boolean) => {
handleMutualExclusiveToggle('functionCall', enabled)
}

const cancelMutualExclusiveToggle = () => {
mutualExclusiveAction.value = null
showMutualExclusiveAlert.value = false
}

const confirmMutualExclusiveToggle = () => {
if (mutualExclusiveAction.value) {
const { from, to } = mutualExclusiveAction.value
config.value[from] = true
config.value[to] = false

mutualExclusiveAction.value = null
showMutualExclusiveAlert.value = false
}
}

const getConfirmMessage = computed(() => {
if (!mutualExclusiveAction.value) return ''
const { from } = mutualExclusiveAction.value
return t(`dialog.mutualExclusive.message.${from}`)
})

const getConfirmTitle = computed(() => {
if (!mutualExclusiveAction.value) return ''
const { from } = mutualExclusiveAction.value
return t(`dialog.mutualExclusive.title.${from}`)
})

onMounted(() => {
if (props.open) {
loadConfig()
Expand Down
15 changes: 15 additions & 0 deletions src/renderer/src/i18n/en-US/dialog.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
},
"error": {
"title": "Error"
},
"mutualExclusive": {
"title": {
"reasoning": "Confirm Enable Reasoning",
"functionCall": "Confirm Enable Function Calling"
},
"message": {
"reasoning": "Enabling reasoning will automatically disable function calling. This is a limitation of DeepSeek-V3.1 models, and both features cannot be used simultaneously. Continue?",
"functionCall": "Enabling function calling will automatically disable reasoning. This is a limitation of DeepSeek-V3.1 models, and both features cannot be used simultaneously. Continue?"
},
"warningText": {
"reasoning": "Note: Enabling reasoning will automatically disable function calling, which is a requirement of DeepSeek-V3.1 models.",
"functionCall": "Note: Enabling function calling will automatically disable reasoning, which is a requirement of DeepSeek-V3.1 models."
},
"confirmEnable": "Confirm Enable"
}
}
15 changes: 15 additions & 0 deletions src/renderer/src/i18n/fa-IR/dialog.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
},
"error": {
"title": "خطا"
},
"mutualExclusive": {
"title": {
"reasoning": "تأیید فعال‌سازی قابلیت استدلال",
"functionCall": "تأیید فعال‌سازی فراخوانی تابع"
},
"message": {
"reasoning": "فعال‌سازی قابلیت استدلال به طور خودکار فراخوانی تابع را غیرفعال خواهد کرد. این محدودیت مدل‌های DeepSeek-V3.1 است و هر دو قابلیت نمی‌توانند همزمان استفاده شوند. ادامه می‌دهید؟",
"functionCall": "فعال‌سازی فراخوانی تابع به طور خودکار قابلیت استدلال را غیرفعال خواهد کرد. این محدودیت مدل‌های DeepSeek-V3.1 است و هر دو قابلیت نمی‌توانند همزمان استفاده شوند. ادامه می‌دهید؟"
},
"warningText": {
"reasoning": "توجه: فعال‌سازی قابلیت استدلال به طور خودکار فراخوانی تابع را غیرفعال می‌کند، که این الزام مدل‌های DeepSeek-V3.1 است.",
"functionCall": "توجه: فعال‌سازی فراخوانی تابع به طور خودکار قابلیت استدلال را غیرفعال می‌کند، که این الزام مدل‌های DeepSeek-V3.1 است."
},
"confirmEnable": "تأیید فعال‌سازی"
}
}
17 changes: 16 additions & 1 deletion src/renderer/src/i18n/fr-FR/dialog.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,22 @@
"fork": {
"tag": "Branche",
"confirm": "Créer une branche",
"description": "Copier les messages du début jusquau message actuel dans une nouvelle conversation.",
"description": "Copier les messages du début jusqu'au message actuel dans une nouvelle conversation.",
"title": "Créer une branche"
},
"mutualExclusive": {
"title": {
"reasoning": "Confirmer l'activation du raisonnement",
"functionCall": "Confirmer l'activation des appels de fonction"
},
"message": {
"reasoning": "L'activation du raisonnement désactivera automatiquement les appels de fonction. Il s'agit d'une limitation des modèles DeepSeek-V3.1, et les deux fonctionnalités ne peuvent pas être utilisées simultanément. Continuer ?",
"functionCall": "L'activation des appels de fonction désactivera automatiquement le raisonnement. Il s'agit d'une limitation des modèles DeepSeek-V3.1, et les deux fonctionnalités ne peuvent pas être utilisées simultanément. Continuer ?"
},
"warningText": {
"reasoning": "Attention : L'activation du raisonnement désactivera automatiquement les appels de fonction, ce qui est une exigence des modèles DeepSeek-V3.1.",
"functionCall": "Attention : L'activation des appels de fonction désactivera automatiquement le raisonnement, ce qui est une exigence des modèles DeepSeek-V3.1."
},
"confirmEnable": "Confirmer l'activation"
}
}
15 changes: 15 additions & 0 deletions src/renderer/src/i18n/ja-JP/dialog.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
"confirm": "ブランチ作成",
"description": "最初のメッセージから現在のメッセージまでを新しい会話にコピーします。",
"title": "ブランチを作成"
},
"mutualExclusive": {
"title": {
"reasoning": "推論機能の有効化を確認",
"functionCall": "関数呼び出し機能の有効化を確認"
},
"message": {
"reasoning": "推論機能を有効にすると、関数呼び出し機能が自動的に無効になります。これはDeepSeek-V3.1モデルの制限要件であり、両機能を同時に使用することはできません。続行しますか?",
"functionCall": "関数呼び出し機能を有効にすると、推論機能が自動的に無効になります。これはDeepSeek-V3.1モデルの制限要件であり、両機能を同時に使用することはできません。続行しますか?"
},
"warningText": {
"reasoning": "注意:推論機能を有効にすると関数呼び出し機能が自動的に無効になります。これはDeepSeek-V3.1モデルの制限要件です。",
"functionCall": "注意:関数呼び出し機能を有効にすると推論機能が自動的に無効になります。これはDeepSeek-V3.1モデルの制限要件です。"
},
"confirmEnable": "有効化を確認"
}
}
15 changes: 15 additions & 0 deletions src/renderer/src/i18n/ko-KR/dialog.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
"confirm": "분기 생성",
"description": "첫 번째 메시지부터 현재 선택한 메시지까지를 새 채팅으로 복사하여 대화를 계속할 수 있습니다.",
"title": "채팅 분기 생성"
},
"mutualExclusive": {
"title": {
"reasoning": "추론 기능 활성화 확인",
"functionCall": "함수 호출 기능 활성화 확인"
},
"message": {
"reasoning": "추론 기능을 활성화하면 함수 호출 기능이 자동으로 비활성화됩니다. 이는 DeepSeek-V3.1 모델의 제한 요구사항으로, 두 기능을 동시에 사용할 수 없습니다. 계속하시겠습니까?",
"functionCall": "함수 호출 기능을 활성화하면 추론 기능이 자동으로 비활성화됩니다. 이는 DeepSeek-V3.1 모델의 제한 요구사항으로, 두 기능을 동시에 사용할 수 없습니다. 계속하시겠습니까?"
},
"warningText": {
"reasoning": "주의: 추론 기능을 활성화하면 함수 호출 기능이 자동으로 비활성화됩니다. 이는 DeepSeek-V3.1 모델의 제한 요구사항입니다.",
"functionCall": "주의: 함수 호출 기능을 활성화하면 추론 기능이 자동으로 비활성화됩니다. 이는 DeepSeek-V3.1 모델의 제한 요구사항입니다."
},
"confirmEnable": "활성화 확인"
}
}
15 changes: 15 additions & 0 deletions src/renderer/src/i18n/ru-RU/dialog.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
"confirm": "Создать ветку",
"description": "Скопировать сообщения с начала до текущего в новый разговор.",
"title": "Создать ветку"
},
"mutualExclusive": {
"title": {
"reasoning": "Подтвердить включение рассуждений",
"functionCall": "Подтвердить включение вызовов функций"
},
"message": {
"reasoning": "Включение рассуждений автоматически отключит вызовы функций. Это ограничение моделей DeepSeek-V3.1, и обе функции не могут использоваться одновременно. Продолжить?",
"functionCall": "Включение вызовов функций автоматически отключит рассуждения. Это ограничение моделей DeepSeek-V3.1, и обе функции не могут использоваться одновременно. Продолжить?"
},
"warningText": {
"reasoning": "Внимание: Включение рассуждений автоматически отключит вызовы функций, что является требованием моделей DeepSeek-V3.1.",
"functionCall": "Внимание: Включение вызовов функций автоматически отключит рассуждения, что является требованием моделей DeepSeek-V3.1."
},
"confirmEnable": "Подтвердить включение"
}
}
15 changes: 15 additions & 0 deletions src/renderer/src/i18n/zh-CN/dialog.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
},
"error": {
"title": "错误"
},
"mutualExclusive": {
"title": {
"reasoning": "确认开启推理能力",
"functionCall": "确认开启函数调用"
},
"message": {
"reasoning": "开启推理能力将自动关闭函数调用功能。这是 DeepSeek-V3.1 模型的限制要求,两个功能无法同时使用。是否继续?",
"functionCall": "开启函数调用将自动关闭推理能力功能。这是 DeepSeek-V3.1 模型的限制要求,两个功能无法同时使用。是否继续?"
},
"warningText": {
"reasoning": "注意:开启推理能力将自动关闭函数调用功能,这是 DeepSeek-V3.1 模型的限制要求。",
"functionCall": "注意:开启函数调用将自动关闭推理能力,这是 DeepSeek-V3.1 模型的限制要求。"
},
"confirmEnable": "确认开启"
}
}
15 changes: 15 additions & 0 deletions src/renderer/src/i18n/zh-HK/dialog.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
"confirm": "創建分支",
"description": "將從第一條消息到當前選中的消息複製到一個新會話中,您可以在新會話中繼續對話。",
"title": "創建會話分支"
},
"mutualExclusive": {
"title": {
"reasoning": "確認開啟推理能力",
"functionCall": "確認開啟函數調用"
},
"message": {
"reasoning": "開啟推理能力將自動關閉函數調用功能。這是 DeepSeek-V3.1 模型的限制要求,兩個功能無法同時使用。是否繼續?",
"functionCall": "開啟函數調用將自動關閉推理能力功能。這是 DeepSeek-V3.1 模型的限制要求,兩個功能無法同時使用。是否繼續?"
},
"warningText": {
"reasoning": "注意:開啟推理能力將自動關閉函數調用功能,這是 DeepSeek-V3.1 模型的限制要求。",
"functionCall": "注意:開啟函數調用將自動關閉推理能力,這是 DeepSeek-V3.1 模型的限制要求。"
},
"confirmEnable": "確認開啟"
}
}
15 changes: 15 additions & 0 deletions src/renderer/src/i18n/zh-TW/dialog.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
"confirm": "創建分支",
"description": "將從第一條消息到當前選中的消息複製到一個新會話中,您可以在新會話中繼續對話。",
"title": "創建會話分支"
},
"mutualExclusive": {
"title": {
"reasoning": "確認開啟推理能力",
"functionCall": "確認開啟函數調用"
},
"message": {
"reasoning": "開啟推理能力將自動關閉函數調用功能。這是 DeepSeek-V3.1 模型的限制要求,兩個功能無法同時使用。是否繼續?",
"functionCall": "開啟函數調用將自動關閉推理能力功能。這是 DeepSeek-V3.1 模型的限制要求,兩個功能無法同時使用。是否繼續?"
},
"warningText": {
"reasoning": "注意:開啟推理能力將自動關閉函數調用功能,這是 DeepSeek-V3.1 模型的限制要求。",
"functionCall": "注意:開啟函數調用將自動關閉推理能力,這是 DeepSeek-V3.1 模型的限制要求。"
},
"confirmEnable": "確認開啟"
}
}