mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-01 01:51:19 +08:00
问题: - 编辑交易员并修改系统提示词模板时,保存失败 - 错误提示:AI模型配置不存在或未启用 根本原因: 1. 后端 API 返回的 ai_model 被截断(admin_deepseek → deepseek) 2. 前端验证时找不到对应的模型 ID(enabledModels 存的是完整 ID) 3. API 缺少 system_prompt_template 字段 修复内容: - api/server.go: 移除 AI model ID 截断逻辑,返回完整 ID - api/server.go: 在 handleGetTraderConfig 中添加 system_prompt_template 字段 - web/src/types.ts: TraderConfigData 接口添加 system_prompt_template 字段 - web/src/components/AITradersPage.tsx: 添加 fallback 机制和详细日志 测试: - 编辑交易员 → 修改系统提示词模板 → 保存成功 - Console 输出验证日志,不再报错