fix(ci): restore main follow-up checks

This commit is contained in:
Vincent Koc
2026-04-04 22:50:54 +09:00
parent aa32f74fe6
commit 9cc300be78
10 changed files with 104 additions and 43 deletions

View File

@@ -704,6 +704,27 @@ describe("model-selection", () => {
});
describe("resolveConfiguredModelRef", () => {
it("should infer the unique provider from configured models for bare defaults", () => {
const cfg = {
agents: {
defaults: {
model: { primary: "claude-opus-4-6" },
models: {
"anthropic/claude-opus-4-6": {},
},
},
},
} as OpenClawConfig;
const result = resolveConfiguredModelRef({
cfg,
defaultProvider: "openai",
defaultModel: "gpt-5.4",
});
expect(result).toEqual({ provider: "anthropic", model: "claude-opus-4-6" });
});
it("should fall back to the configured default provider and warn if provider is missing for non-alias", () => {
setLoggerOverride({ level: "silent", consoleLevel: "warn" });
const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {});