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
@@ -3325,6 +3325,27 @@ export default {
remoteDimensionDetected: 'Detected vector dimension: {value}',
supportsVisionLabel: 'Supports Vision / Multimodal',
supportsVisionDesc: 'Whether the model accepts image and multimodal input',
thinkingControlLabel: 'Thinking mode request format',
thinkingControlDesc:
'Controls how the agent’s “Thinking mode” on/off switch is written to the API. We pre-select based on vendor/model when possible; change it to match your API docs. With “Do not send”, the agent Thinking mode switch has no effect.',
thinkingControl: {
none: {
label: 'Do not send thinking fields',
hint: 'Agent “Thinking mode” switch has no effect; thinking parameters are not sent in requests',
},
chatTemplateKwargs: {
label: 'chat_template_kwargs',
hint: 'Custom OpenAI-compatible gateways, NVIDIA NIM, vLLM / local 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, etc.; default for LKEAP; use “Do not send” for R1)',
},
},
dimensionHint: 'Model selected. Click "Detect Dimension" to fetch the vector dimension automatically.',
loadModelListFailed: 'Failed to load model list',
listRefreshed: 'List refreshed',