mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:58:26 +00:00
fix: align opencode-zen provider setup
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
} from "./opencode-zen-model-default.js";
|
||||
|
||||
describe("applyOpencodeZenModelDefault", () => {
|
||||
it("sets opencode-zen default when model is unset", () => {
|
||||
it("sets opencode default when model is unset", () => {
|
||||
const cfg: ClawdbotConfig = { agents: { defaults: {} } };
|
||||
const applied = applyOpencodeZenModelDefault(cfg);
|
||||
expect(applied.changed).toBe(true);
|
||||
@@ -36,6 +36,15 @@ describe("applyOpencodeZenModelDefault", () => {
|
||||
expect(applied.next).toEqual(cfg);
|
||||
});
|
||||
|
||||
it("no-ops when already legacy opencode-zen default", () => {
|
||||
const cfg = {
|
||||
agents: { defaults: { model: "opencode-zen/claude-opus-4-5" } },
|
||||
} as ClawdbotConfig;
|
||||
const applied = applyOpencodeZenModelDefault(cfg);
|
||||
expect(applied.changed).toBe(false);
|
||||
expect(applied.next).toEqual(cfg);
|
||||
});
|
||||
|
||||
it("preserves fallbacks when setting primary", () => {
|
||||
const cfg: ClawdbotConfig = {
|
||||
agents: {
|
||||
|
||||
Reference in New Issue
Block a user