feat(thinkingControl): implement thinking mode configuration in model editor

- Added a new thinking mode control field in the ModelEditorDialog, allowing users to specify how the agent's thinking mode is formatted for API requests.
- Introduced localization strings for thinking mode labels and descriptions in English, Korean, Russian, and Chinese, enhancing user experience across multiple languages.
- Updated the model form data structure to include thinking control settings, ensuring proper handling during model edits and saves.
- Implemented utility functions for resolving and defaulting thinking control values based on provider and model, improving backend integration.
- Added tests for the new thinking control functionality to ensure reliability and correctness in handling user configurations.
This commit is contained in:
wizardchen
2026-06-05 14:42:08 +08:00
committed by lyingbug
parent 063809896a
commit e2a41ecf0a
26 changed files with 2075 additions and 1206 deletions
+21
View File
@@ -2259,6 +2259,27 @@ export default {
remoteDimensionDetected: 'Обнаружена размерность: {value}',
supportsVisionLabel: 'Поддержка визуального / мультимодального ввода',
supportsVisionDesc: 'Поддерживает ли модель изображения и другой мультимодальный ввод',
thinkingControlLabel: 'Формат параметров режима размышления',
thinkingControlDesc:
'Определяет, как переключатель «Режим размышления» агента записывается в API. При возможности выбирается по поставщику/модели; при несоответствии измените по документации API. При выборе «Не отправлять» переключатель «Режим размышления» агента не действует.',
thinkingControl: {
none: {
label: 'Не отправлять параметры размышления',
hint: 'Переключатель «Режим размышления» агента не действует; параметры размышления не отправляются в запросе',
},
chatTemplateKwargs: {
label: 'chat_template_kwargs',
hint: 'Пользовательские OpenAI-совместимые шлюзы, NVIDIA NIM, vLLM / локальный Qwen',
},
enableThinking: {
label: 'enable_thinking',
hint: 'Alibaba DashScope: qwen3, qwen-plus, qwen-max, qwen-turbo',
},
thinkingType: {
label: 'thinking.type',
hint: 'Volcengine Ark; Tencent LKEAP (DeepSeek V3 и др.; по умолчанию для LKEAP; для R1 — «Не отправлять»)',
},
},
dimensionHint: 'Модель выбрана. Нажмите «Определить размерность», чтобы автоматически получить значение.',
loadModelListFailed: 'Не удалось загрузить список моделей',
listRefreshed: 'Список обновлён',