[bug or limits] bug 400: {"message":"Unexpected message role.","type":"BadRequestError","param":null,"code":400} while try reasoning with llm-pi-ai #5008
drscrewdriver
started this conversation in
Show Your Plugins!
Replies: 3 comments 1 reply
|
你的根因描述与我们录过请求体的测量一致,补已验证的声明级修法(不用 workaround 到别处): 给这条路由的模型声明加 你说的触发条件(配了 reasoningEfforts 就被当推理模型走 developer)正是 #3789 的提案要改的默认值(非原生 OpenAI 端点默认 false + UI 开关)——vLLM/SGLang/Qwen 一族撞这个的频率足够高(今天同池子里 #4937 也是它),建议去那边 +1 合流。 |
0 replies
|
是的 已经转为报错到官方pi-ai配置的路线 我看一些新版似乎是默认可以使用本地局域网思考模型 不知道最近界面是否有改动 supportsDeveloperRole: false 会在官方面板里设置可调吗 |
1 reply
|
核实结论:机制属实、可精确复现,但触发条件是双重的,报告漏了半个。
补充信息请求:请提供触发时请求体的实际 role 与网关地址,以确认是否落在「无法识别 URL 默认 true」分支。 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
前沿问题

当模型配置了 reasoningEfforts 后(只要认为模型是推理模型并用pi-ai方式处理),pi-ai 会将系统消息发送为 developer role;部分 vLLM、SGLang、Qwen 或其他 OpenAI-compatible 网关只接受 system而不认developer role,因此返回 Unexpected message role。
目前workaround 方法之一
dsh-thinking-levels 族 +dsh-llm-openai-completions
设置 标记 让dsh读取配置后绕过pi-ai 改用我的实现 不会在reasoningEfforts 强制要求使用developer role
希望更深度定制pi-ai插件避免类似问题
相关项目 本人项目
https://github.com/drscrewdriver/dsh-llm-openai-completions
https://github.com/drscrewdriver/dsh-thinking-levels
相似类别 开发者友情项目issue讨论
hytime/dsh-thinking-effort#4
All reactions