Conversation
SDK 2.8.1 起 model 仅表示具体模型名,任务名须通过 task_name 传递; 旧写法 model=<任务名> 会被宿主当作具体模型名查找并报错。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
升级到 MaiBot 1.2.5(plugin SDK 2.8.1)后,插件所有 LLM 调用失败:
受影响链路:每日日程生成(00:30 定时)、启动补生成、次日推断、角色裁判。本地日志中定时生成连续多日全部失败(
fail_schedule_generation_*),插件核心功能不可用。根因
plugin SDK 2.8.1 起,
LLMCapability.generate()新增task_name参数(默认"utils")并始终随请求发送(maibot_sdk/capabilities/llm.py)。而宿主 MaiBot 1.2.5 的src/plugin_runtime/capabilities/core.py::_resolve_llm_capability_route()逻辑是:请求带task_name键时,model/model_name一律视为具体模型名。插件将任务名(
memory等)传给model参数,于是被当作具体模型名查找,模型列表中不存在,故全部失败。修复
任务名改由
task_name传递(4 处):planner/schedule_generator.pyplanner/auto_scheduler.pyplanner/role_judge.pyplanner/generator/base_generator.py(文档字符串同步)兼容性
task_name参数;MaiBot 1.2.4 宿主不读取该字段验证
修复后本地实测:日程生成成功(12 个活动,质量分 0.88);环境 MaiBot 1.2.5 + SDK 2.8.1。