修复当前项目没法接入openclaw 做api 异常问题#100
Open
TomYule wants to merge 2 commits into
Open
Conversation
added 2 commits
May 10, 2026 18:59
src/backend/registry.js:304 的 getModelType() 收到 "chatgpt_text/gpt-instant" 时没有切割斜杠,直接去匹配适配器里 ID 为 "gpt-instant" 的模型,永远找不到,返回 'image',导致所有文本模型走了图像生成分支。
日志对比:
- 修复前:解析模式: 图像生成 (仅取最后一条) ❌
- 修复后:解析模式: 文本对话 (虚拟上下文构建) ✅
正常行为:Sender (untrusted metadata)
OpenClaw 设计如此——在每次请求前注入发送者元数据(label/id),让模型知道消息来源。你的原始消息 您好 我发送了个消息 你收得到吗 在元数据块后面,表格只显示了前 100 字符截断。
还需处理:ChatGPT 返回空回复
容器重启后(17:44),浏览器会话失效,ChatGPT 需要重新登录。浏览器在 Docker 内以非无头模式运行,你需要:
1. 通过 WebUI 登录:访问 http://127.0.0.1:18080/admin/vnc(WebSocket VNC 代理),在 ChatGPT 页面重新登录
2. 或使用登录模式:停止容器后执行 docker compose run -e EXTRA_ARGS="-login" webai-2api,登录完成后重启
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.
修复当前项目没法接入openclaw 做api 异常问题

定义默认文本类型 可以成功接入openclaw 调用deepseek