优化 / 高 / LLM 适配器
electron/harness/adapters/mimo.adapter.ts
MiMo Adapter 在 thinking 模式下使用 max_completion_tokens 字段限制总 token 数(包括思考 + 输出)。 当用户未配置 maxTokens 时:
max_completion_tokens
const params: any = { // ... }; if (this.config.thinkingEnabled) { params.max_completion_tokens = this.config.maxTokens ?? 63488; // 兜底默认值,参考 DeepSeek }
并提示用户在设置中调整 maxTokens。
文件: electron/harness/adapters/mimo.adapter.ts
修复: thinking 模式下 max_completion_tokens 未配置时兜底 63488:request.params.maxTokens ?? (request.params.thinkingEnabled !== false ? 63488 : undefined)。
request.params.maxTokens ?? (request.params.thinkingEnabled !== false ? 63488 : undefined)
验证: tsc --noEmit 类型检查通过。
tsc --noEmit
No dependencies set.
The note is not visible to the blocked user.
问题类型
优化 / 高 / LLM 适配器
文件位置
electron/harness/adapters/mimo.adapter.ts问题描述
MiMo Adapter 在 thinking 模式下使用
max_completion_tokens字段限制总 token 数(包括思考 + 输出)。当用户未配置 maxTokens 时:
影响
建议修复
并提示用户在设置中调整 maxTokens。
修复说明
文件:
electron/harness/adapters/mimo.adapter.ts修复: thinking 模式下
max_completion_tokens未配置时兜底 63488:request.params.maxTokens ?? (request.params.thinkingEnabled !== false ? 63488 : undefined)。验证:
tsc --noEmit类型检查通过。