LM Studio's OpenAI-compat endpoint silently ignores chat_template_kwargs
(probed live); reasoning_effort "none" verifiably removes reasoning tokens
on both streaming and blocking paths. Pass it through the existing
LLMClient extra_body channel for translate/polish first and correction
requests only; all other callers keep their default policy.
Co-authored-by: multica-agent <github@multica.ai>
leefer
merged commit 344fede198 into leefer/hel-731-studio-project2026-10-25 22:04:29 +08:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
基线
leefer/hel-731-studio-project@410eade(PR #16 已合并,另开本 PR)。改动(最小,仅 2 文件)
calliope-backend/src/calliope/routers/prompt_tools.py:新增NO_THINKING_BODY = {"reasoning_effort": "none"};_run透传extra_body到client.chat;translate/polish 的初次请求与校验失败后的唯一纠正请求均携带(两轮共用同一调用点)。流式与阻塞回退经 LLMClient 既有extra_body通路(chat_stream / _chat_blocking 的_merge_extra_body)自动保留。calliope-backend/tests/test_prompt_tools.py:+4 回归(两动作初次+纠正均带开关、阻塞回退保留开关、普通 LLMClient 调用不受影响)。开关选用依据(实际服务证据,非按模型名猜测)
qwen3.5-4b-uncensored-hauhaucs-aggressive声明reasoning.allowed_options=["off","on"], default="on"—— 思考默认开启。chat_template_kwargs.enable_thinking=false被静默忽略(仍 96 reasoning tokens、无正文);reasoning="off"顶层同样被忽略;reasoning_effort:"none"流式与阻塞均 0 reasoning tokens、直接出正文。故采用后者,不采用伪成功的 chat_template_kwargs。保留不变
温度(0.2/0.6)、取消/总超时/块超时、语法映射与还原、一次纠正后 502、预览/替换/撤销、用户所选档案、LLMClient 默认策略与智能体/工作流调用、h3_rewrite 通路。
测试与构建
pytest tests/test_prompt_tools.py→ 64 passed(含 4 新增)。ruff check(0.16.8)本卡两文件通过;其余文件 393 条存量 lint 未触碰。