fix: address PR review comments

This commit is contained in:
zhangyangrui 2026-01-23 10:00:09 +08:00
parent 401150886d
commit bb2a080916
3 changed files with 4 additions and 5 deletions

View File

@ -203,4 +203,4 @@ pnpm run --filter desktop electron-forge:make --arch=x64 --platform=win32
* [Sarah Hussein](https://github.com/Sarah-Hussein) 应用图标设计
* [nriver](https://github.com/nriver) 国际化贡献
* [Thomas Frei](https://github.com/thfrei) Canvas 初始实现
* [antoniotejada](https://github.com/nriver) 语法高亮小组件初始实现
* [antoniotejada](https://github.com/antoniotejada) 语法高亮小组件初始实现

View File

@ -38,8 +38,6 @@ import { PROVIDER_CONSTANTS } from '../../services/llm/constants/provider_consta
*/
async function listModels(req: Request, res: Response) {
try {
const { baseUrl } = req.query;
const apiKey = await options.getOption('minimaxApiKey');
if (!apiKey) {

View File

@ -74,11 +74,12 @@ export class MiniMaxService extends BaseAIService {
// Add tool instructions to system prompt if tools are enabled
const willUseTools = opts.tools && opts.tools.length > 0;
let finalSystemPrompt: string;
if (willUseTools && PROVIDER_PROMPTS.MINIMAX.TOOL_INSTRUCTIONS) {
log.info('Adding tool instructions to system prompt for MiniMax');
var finalSystemPrompt = `${systemPrompt}\n\n${PROVIDER_PROMPTS.MINIMAX.TOOL_INSTRUCTIONS}`;
finalSystemPrompt = `${systemPrompt}\n\n${PROVIDER_PROMPTS.MINIMAX.TOOL_INSTRUCTIONS}`;
} else {
var finalSystemPrompt = systemPrompt;
finalSystemPrompt = systemPrompt;
}
// Format messages for MiniMax API (Anthropic-compatible format)