From 136a54f4672204b9a2b4968c7c7a19b07a62c8b5 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 27 Apr 2026 15:31:48 +0900 Subject: [PATCH] fix(doctor): avoid warnings for resolved model capabilities Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .../doctor/checks/model-resolution.test.ts | 24 ++++++++++++++++++- src/cli/doctor/checks/model-resolution.ts | 2 +- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/cli/doctor/checks/model-resolution.test.ts b/src/cli/doctor/checks/model-resolution.test.ts index 2d1c09919..49d308f3c 100644 --- a/src/cli/doctor/checks/model-resolution.test.ts +++ b/src/cli/doctor/checks/model-resolution.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, beforeEach, afterEach, spyOn, mock } from "bun:test" +import { describe, it, expect } from "bun:test" describe("model-resolution check", () => { describe("getModelResolutionInfo", () => { @@ -235,6 +235,28 @@ describe("model-resolution check", () => { expect(issues[0]?.title).toContain("compatibility fallback") expect(issues[0]?.description).toContain("oracle=custom/unknown-llm") }) + + it("does not warn for known provider aliases used by current recommended models", async () => { + const { collectCapabilityResolutionIssues, getModelResolutionInfoWithOverrides } = await import("./model-resolution") + + // #given current recommended provider aliases from user configuration + const info = getModelResolutionInfoWithOverrides({ + agents: { + sisyphus: { model: "kimi-for-coding/k2pb" }, + metis: { model: "github-copilot/claude-opus-4.7" }, + }, + categories: { + "visual-engineering": { model: "github-copilot/claude-opus-4.7" }, + artistry: { model: "github-copilot/claude-opus-4.7" }, + }, + }) + + // #when collecting doctor capability issues + const issues = collectCapabilityResolutionIssues(info) + + // #then these known aliases do not create compatibility fallback warnings + expect(issues).toHaveLength(0) + }) }) }) diff --git a/src/cli/doctor/checks/model-resolution.ts b/src/cli/doctor/checks/model-resolution.ts index ea7d538e6..ccc697845 100644 --- a/src/cli/doctor/checks/model-resolution.ts +++ b/src/cli/doctor/checks/model-resolution.ts @@ -95,7 +95,7 @@ export function collectCapabilityResolutionIssues(info: ModelResolutionInfo): Do const allEntries = [...info.agents, ...info.categories] const fallbackEntries = allEntries.filter((entry) => { const mode = entry.capabilityDiagnostics?.resolutionMode - return mode === "alias-backed" || mode === "heuristic-backed" || mode === "unknown" + return mode === "unknown" }) if (fallbackEntries.length === 0) {