[P1/优化] MiMo Adapter thinking 模式下 max_completion_tokens 未传默认兜底 #41

Open
opened 2026-07-21 21:56:05 +08:00 by thzxx · 0 comments
Owner

问题类型

优化 / 高 / LLM 适配器

文件位置

electron/harness/adapters/mimo.adapter.ts

问题描述

MiMo Adapter 在 thinking 模式下使用 max_completion_tokens 字段限制总 token 数(包括思考 + 输出)。
当用户未配置 maxTokens 时:

  • 未传该字段,MiMo API 使用默认值(可能很小)
  • thinking 占用大部分 token,实际输出被截断
  • 用户感知为"模型输出不完整"

影响

  • thinking 模式下输出截断
  • 用户体验差

建议修复

const params: any = {
  // ...
};

if (this.config.thinkingEnabled) {
  params.max_completion_tokens = this.config.maxTokens
    ?? 63488; // 兜底默认值,参考 DeepSeek
}

并提示用户在设置中调整 maxTokens。

## 问题类型 优化 / 高 / LLM 适配器 ## 文件位置 `electron/harness/adapters/mimo.adapter.ts` ## 问题描述 MiMo Adapter 在 thinking 模式下使用 `max_completion_tokens` 字段限制总 token 数(包括思考 + 输出)。 当用户未配置 maxTokens 时: - 未传该字段,MiMo API 使用默认值(可能很小) - thinking 占用大部分 token,实际输出被截断 - 用户感知为"模型输出不完整" ## 影响 - thinking 模式下输出截断 - 用户体验差 ## 建议修复 ```ts const params: any = { // ... }; if (this.config.thinkingEnabled) { params.max_completion_tokens = this.config.maxTokens ?? 63488; // 兜底默认值,参考 DeepSeek } ``` 并提示用户在设置中调整 maxTokens。
thzxx added the LLM?????? labels 2026-07-21 21:56:05 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MetonaTeam/metona-ai-desktop#41