Sitelet https://github.com/ChatLab/ChatLab/pull/485
Skip to content

fix(ai): 修复 Qwen Anthropic 接口话题总结失败 - #485

Merged
hellodigua merged 1 commit into
mainfrom
feat-fix-qwen-topic-thinking
Sep 22, 2026
Merged

hellodigua merged 1 commit into
mainfrom
feat-fix-qwen-topic-thinking

Conversation

@hellodigua

Copy link
Copy Markdown
Member

概要

Closes #483

  • 对 Qwen 的 Anthropic 兼容接口明确发送 thinking: { type: 'disabled' },仅作用于话题总结,不改变普通 AI 对话的思考设置。
  • 将输出截断与 JSON 格式错误区分,提供简体中文、繁体中文、英文和日文提示。
  • 截断后记录已发生的模型用量并结束任务,不进行无效的 JSON 修复重试,也不覆盖已有成功话题。
  • 不新增设置项,不调整 token 上限,不修改依赖或数据库结构。

验证

  • 新增回归在修复前有 6 项失败,修复后通过。
  • 话题模块、LLM builder、Pi runtime 共 76 项相关测试通过:
    node scripts/run-tests.mjs packages/node-runtime/src/services/topics/*.test.ts packages/node-runtime/src/ai/__tests__/llm-builder.test.ts packages/node-runtime/src/ai/__tests__/pi-runtime.test.ts
  • Node/桌面主进程及前端类型检查通过(使用已安装的 tsc/vue-tsc 执行对应配置)。
  • 修改文件的 ESLint、Prettier、workspace 依赖检查及 git diff --check 通过。
  • 请求参数经过真实 Pi SDK 序列化验证,在发送网络请求前截获;尚未进行阿里云端点真实模型调用。

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-22T10:35:50.526531Z 91f6d3a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hellodigua
hellodigua merged commit b50c495 into main Sep 22, 2026
1 check passed
@hellodigua
hellodigua deleted the feat-fix-qwen-topic-thinking branch September 22, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Anthropic-format endpoint on Qwen/DashScope: thinking consumes all max_tokens, empty text surfaces as "Model did not return a JSON object"

1 participant