Repository navigation
Conversation
- 请求侧:历史轮 reasoning_content → Anthropic thinking 块(signature 空串可过); reasoning_effort low/high/max 透传上游,其余值不带(上游不支持关思考) - 响应侧:thinking 块聚合为 message.reasoning_content(DeepSeek/pi-ai 风格) - 流式:thinking_delta → reasoning_content 增量 chunk
- start.sh / start.bat:启动/停止/重启语义对齐——停旧实例(serve.pid, 优雅→强杀)、 端口占用检测、依赖自动安装、后台运行+日志、/meta 健康检查 - .gitattributes:*.bat/*.cmd 强制 CRLF(cmd 对 LF 的 goto/label 有解析怪癖) - Dockerfile + compose + .dockerignore:多阶段镜像(python3.11-slim + node22 + Debian chromium + tini + CJK 字体),数据卷 ./data,.env 不入镜像 - .gitignore:排除 serve.log/pid、.trae_*、.sg_* 等本地运行产物
jk-uzi
force-pushed
the
feat/openai-reasoning
branch
from
October 4, 2026 02:58
b62f034 to
b87963f
Compare
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.
概述
OpenAI 兼容层补齐思考文本(thinking / reasoning_content)双向透传与 reasoning_effort 参数,使 Chatbox / pi-ai / DeepSeek 风格客户端能正确看到并回传思考过程。
改动要点
openai_to_anthropic):多轮重放时历史轮reasoning_content→ Anthropicthinking块(上游不校验 signature,空串可过);reasoning_effort为low/high/max时透传上游,其余值(off/none)不带——上游不支持关闭思考anthropic_to_openai+ 流式StreamConverter):thinking块/thinking_delta聚合为message.reasoning_content与流式增量 chunk(DeepSeek/pi-ai 通用约定)测试
tests/unit/test_openai_compat.py(13 例,双向 + 流式)附带杂项(独立提交,可按需 cherry-pick 或单独处理)
本分支同时携带 3 个与网关功能无关的仓库杂项提交,为省 PR 往返一并提交:
docs:README 补充 Docker 部署说明(与下面 Docker 文件配套)chore:前端版本号对齐 + captcha_node lockfile 同步(puppeteer-core)chore:Linux/Windows 启动脚本(stop/restart 语义对齐、健康检查、依赖自装)+ Dockerfile/compose/.dockerignore(多阶段镜像:python3.11-slim + node22 + Debian chromium + tini + CJK 字体;.env/data 不入镜像)+ .gitattributes 的 *.bat CRLF 规则 + 本地杂物 gitignore