fix(doctor): avoid warnings for resolved model capabilities
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -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("model-resolution check", () => {
|
||||||
describe("getModelResolutionInfo", () => {
|
describe("getModelResolutionInfo", () => {
|
||||||
@@ -235,6 +235,28 @@ describe("model-resolution check", () => {
|
|||||||
expect(issues[0]?.title).toContain("compatibility fallback")
|
expect(issues[0]?.title).toContain("compatibility fallback")
|
||||||
expect(issues[0]?.description).toContain("oracle=custom/unknown-llm")
|
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)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export function collectCapabilityResolutionIssues(info: ModelResolutionInfo): Do
|
|||||||
const allEntries = [...info.agents, ...info.categories]
|
const allEntries = [...info.agents, ...info.categories]
|
||||||
const fallbackEntries = allEntries.filter((entry) => {
|
const fallbackEntries = allEntries.filter((entry) => {
|
||||||
const mode = entry.capabilityDiagnostics?.resolutionMode
|
const mode = entry.capabilityDiagnostics?.resolutionMode
|
||||||
return mode === "alias-backed" || mode === "heuristic-backed" || mode === "unknown"
|
return mode === "unknown"
|
||||||
})
|
})
|
||||||
|
|
||||||
if (fallbackEntries.length === 0) {
|
if (fallbackEntries.length === 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user