晴天
|
90df159d5e
|
chore(release): prepare v0.18.6
|
2026-07-14 23:25:42 -07:00 |
|
晴天
|
f514761d59
|
fix(release): harden pre-release stability gates
|
2026-07-12 12:50:38 -07:00 |
|
晴天
|
bc55cf4829
|
fix(channels): 同步契约按内核源码逐条核对并修正
对照 OpenClaw(zod-schema.core.ts / model-ref-shared.ts)与 Hermes
(config.py / auth.py / model_normalize.py)内核源码验证同步写入契约,
修正三处不一致:
- OpenClaw 模型条目恒写含 id/name 的完整对象(内核 strict schema
两字段必填,裸字符串有被拒风险),name 缺省回退为模型 ID;
模型引用按第一个 / 切分已确认正确,含斜杠模型 ID 无需处理
- Hermes model.default 改写纯模型 ID:内核不解析 "provider/model"
前缀(provider 由 model.provider 单独指定),原先拼接前缀会写出
内核不认识的模型名
- Hermes 回退 provider 按注册表真实 id 匹配:OpenAI 兼容 → 'custom'
(注册表无独立 'openai' API-Key id),Gemini → 'gemini'(内核经
OpenAI 兼容端点接入,按 transport 匹配会误判为不支持);
自定义 Base URL 仅对 OpenAI 兼容渠道写入,避免破坏 anthropic/gemini
的专用端点格式
另:渠道编辑器新增「可同步到」实时适配提示(切换 API 类型即显示
OpenClaw / Hermes / 助手的支持情况);测试断言更新为核对后的契约
(428 通过)。发现的存量问题已记录:最新内核 api 枚举中
openai-codex-responses 已改名,共享 API_TYPES 需对照推荐稳定版处理。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-05 12:44:41 -07:00 |
|
晴天
|
dba69ee0fc
|
feat(channels): 统一模型渠道——一处配置,同步 OpenClaw / Hermes / 晴辰助手
新增「模型渠道」页面(通用分组):用户只维护一份渠道配置
(服务商预设 / Base URL / API Key / 模型列表 / 默认模型),
通过显式同步推送到三个消费方,消灭重复配置。
实现要点:
- 渠道存储 src-tauri/src/commands/model_channels.rs:
读取只回掩码(apiKeySaved/apiKeyMask),写入支持 __KEEP__ 哨兵保留旧 Key,
明文 Key 仅经 reveal_model_channel_key 在同步时取出;
文件位于 openclaw 数据目录下,便携迁移自动带走;含 6 个单元测试
- 同步逻辑 src/lib/model-channels.js 组合现有命令完成(各自带自动备份):
OpenClaw 只 upsert 对应 provider 保留未知字段;
Hermes 写 provider 环境变量 + 可选默认模型(仅 OpenAI/Anthropic/Gemini
兼容 API Key 型,OAuth/SDK 型仍走 Hermes 向导);
助手为一次性拷贝到 localStorage
- 页面 src/pages/model-channels.js:渠道卡片 + 三目标同步状态徽标
(已同步/有未同步变更/未同步)+ 编辑弹窗(预设自动填充、在线拉取模型、
默认模型联动)+ 从 OpenClaw 现有配置一键导入 + 全部操作确认弹窗
- Web 模式 dev-api.js 同构 handler + ALWAYS_LOCAL;i18n 简/繁/英 +
侧栏 11 语言;tests/model-channels.test.js 锁定注册链与安全约束
验证:npm build / cargo fmt+check+clippy -D warnings / cargo test --lib
314 通过 / node --test 全部 427 通过
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-05 11:48:24 -07:00 |
|