mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-25 20:21:12 +00:00
Summary: - Merged feat(tencent): add Tencent Hy3 provider (TokenHub and TokenPlan) after ClawSweeper review. Automerge notes: - Ran the ClawSweeper repair loop before final review. - Included post-review commit in the final squash: fix(tencent): preserve TokenHub auth compatibility - Included post-review commit in the final squash: refactor(tencent): unify TokenPlan env/flag naming with TokenHub - Included post-review commit in the final squash: docs: refresh Tencent provider docs metadata - Included post-review commit in the final squash: fix: allow TokenPlan provider config overlays - Included post-review commit in the final squash: docs: dedupe Tencent provider glossary labels - Included post-review commit in the final squash: fix(tencent): repair TokenHub model defaults Validation: - ClawSweeper review passed for head30c9fc130f. - Required merge gates passed before the squash merge. Prepared head SHA:30c9fc130fReview: https://github.com/openclaw/openclaw/pull/99076#issuecomment-4888527271 Co-authored-by: leisang <leisang@tencent.com> Co-authored-by: Mason Huang <masonxhuang@tencent.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: hxy91819
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
// Covers Tencent setup config migration registration in the plugin setup registry.
|
|
import path from "node:path";
|
|
import { describe, expect, test } from "vitest";
|
|
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
|
import { runPluginSetupConfigMigrations } from "./setup-registry.js";
|
|
|
|
describe("Tencent setup config migration", () => {
|
|
test("repairs TokenHub model defaults through setup registry", () => {
|
|
const result = runPluginSetupConfigMigrations({
|
|
env: {
|
|
...process.env,
|
|
OPENCLAW_BUNDLED_PLUGINS_DIR: path.resolve("extensions"),
|
|
},
|
|
config: {
|
|
agents: {
|
|
defaults: {
|
|
model: { primary: "tencent-tokenhub/hy3-preview" },
|
|
models: {
|
|
"tencent-tokenhub/hy3-preview": {},
|
|
},
|
|
},
|
|
},
|
|
} as OpenClawConfig,
|
|
});
|
|
|
|
expect(result.changes).toEqual([
|
|
"Updated Tencent TokenHub agent model defaults to include tencent-tokenhub/hy3 and tencent-tokenhub/hy3-preview.",
|
|
"Changed Tencent TokenHub primary default from tencent-tokenhub/hy3-preview to tencent-tokenhub/hy3.",
|
|
]);
|
|
expect(result.config.agents?.defaults?.model).toEqual({
|
|
primary: "tencent-tokenhub/hy3",
|
|
});
|
|
expect(Object.keys(result.config.agents?.defaults?.models ?? {}).toSorted()).toEqual([
|
|
"tencent-tokenhub/hy3",
|
|
"tencent-tokenhub/hy3-preview",
|
|
]);
|
|
});
|
|
});
|