feat(adapters): OpenClaw 适配器(第二批 Harness 收官) - #6
Merged
Conversation
…安全降级)
- models.providers.apiflux 写入 openclaw.json(openai-completions + /v1 + 最小 {id,name} 模型条目,运行时补元数据——官方文档口径)
- apiKey 字面量落盘(与 Control UI 存法一致;${VAR} 缺变量会拒载不采用)
- --model 时置 agents.defaults.model.primary,保留已有 fallbacks;不写 models.mode(默认即 merge)
- JSON5 容读;注释将被抹时提示(同官方 writer 行为,检测逻辑移植自 json5-comments.ts);$include 或不可解析时不动文件、打印手动 snippet
- 路径尊重 OPENCLAW_STATE_DIR / OPENCLAW_CONFIG_PATH;Docker 隔离冒烟通过;issue 06 闭环
BubblePtr
added a commit
that referenced
this pull request
Jul 29, 2026
- OpenClaw 适配器(PR #6)随本版发布,第二批 Harness 收官
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.
第二批 Harness(.scratch issue 03/06)最后一发:OpenClaw。无本机安装,验证走 Docker 隔离冒烟(已通过)。
设计(读源码定案)
models.providers.apiflux写入~/.openclaw/openclaw.json:openai-completions + /v1 + 全量模型最小{id, name}条目(运行时补元数据,官方 Moonshot 文档同款写法)apiKey字面量落盘——与 OpenClaw Control UI 的存法一致;${VAR}引用缺变量会拒绝加载,不采用--model时置agents.defaults.model.primary,保留已有 fallbacks;不写models.mode(默认即 merge,避免覆盖用户的 replace)OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH验证
bun test120 pass(openclaw 适配器 16 例 + init 接线 1 例)openclaw agent --local默认模型与--model apiflux/claude-haiku-4-5两发 SMOKE-OK,日志确认请求打到 apiflux.ai /v1/chat/completions 且 200;含 key 的冒烟目录已删发版
合并后 bump 0.7.0 + tag(薄壳 dependencies 同步)——第二批 Harness 全部收官。