0afacfa756
Commit 708891dab fixed most test expectations after the gpt-5.5 model
promotion but missed 13 tests across 6 files that still expected
openai/gpt-5.4 in DEFAULT_CATEGORIES and AGENT_MODEL_REQUIREMENTS.
Updates all remaining stale expectations to openai/gpt-5.5:
- agents/utils.test.ts: atlas/metis resolution, buildAgent category,
override.category expansion (5 tests)
- plugin-handlers/config-handler.test.ts: ultrabrain config resolution
and fallback (2 tests)
- shared/agent-variant.test.ts: sisyphus chain variant and category
fallback (2 tests)
- shared/model-capability-guardrails.test.ts: built-in requirement
model ID assertion (1 test)
- tools/look-at/multimodal-fallback-chain.test.ts: multimodal-looker
hardcoded variant metadata (1 test)
- cli/config-manager/generate-omo-config.test.ts: sisyphus model and
fallback_models expectations (2 tests)
121 lines
3.8 KiB
TypeScript
121 lines
3.8 KiB
TypeScript
import { describe, expect, test } from "bun:test"
|
|
|
|
import type { ModelCapabilitiesSnapshot } from "./model-capabilities"
|
|
import { getBundledModelCapabilitiesSnapshot } from "./model-capabilities"
|
|
import {
|
|
collectModelCapabilityGuardrailIssues,
|
|
getBuiltInRequirementModelIDs,
|
|
} from "./model-capability-guardrails"
|
|
|
|
describe("model-capability-guardrails", () => {
|
|
test("keeps the current alias registry and built-in requirements aligned with the bundled snapshot", () => {
|
|
const issues = collectModelCapabilityGuardrailIssues()
|
|
|
|
expect(issues).toEqual([])
|
|
})
|
|
|
|
test("requires built-in requirement models to stay unique and sorted", () => {
|
|
const modelIDs = getBuiltInRequirementModelIDs()
|
|
|
|
expect(modelIDs).toEqual([...modelIDs].sort())
|
|
expect(new Set(modelIDs).size).toBe(modelIDs.length)
|
|
expect(modelIDs).toContain("claude-opus-4-7")
|
|
expect(modelIDs).toContain("gpt-5.5")
|
|
expect(modelIDs).toContain("kimi-k2.5")
|
|
})
|
|
|
|
test("flags exact aliases whose canonical target disappears from the snapshot", () => {
|
|
const bundledSnapshot = getBundledModelCapabilitiesSnapshot()
|
|
const brokenSnapshot: ModelCapabilitiesSnapshot = {
|
|
...bundledSnapshot,
|
|
models: Object.fromEntries(
|
|
Object.entries(bundledSnapshot.models).filter(([modelID]) => modelID !== "gemini-3-pro-preview"),
|
|
),
|
|
}
|
|
|
|
const issues = collectModelCapabilityGuardrailIssues({
|
|
snapshot: brokenSnapshot,
|
|
requirementModelIDs: [],
|
|
})
|
|
|
|
expect(issues).toContainEqual(
|
|
expect.objectContaining({
|
|
kind: "alias-target-missing-from-snapshot",
|
|
aliasModelID: "gemini-3-pro-high",
|
|
canonicalModelID: "gemini-3-pro-preview",
|
|
}),
|
|
)
|
|
})
|
|
|
|
test("flags pattern aliases when models.dev gains a canonical entry for the alias itself", () => {
|
|
const bundledSnapshot = getBundledModelCapabilitiesSnapshot()
|
|
const aliasCollisionSnapshot: ModelCapabilitiesSnapshot = {
|
|
...bundledSnapshot,
|
|
models: {
|
|
...bundledSnapshot.models,
|
|
"gemini-3.1-pro-high": {
|
|
id: "gemini-3.1-pro-high",
|
|
family: "gemini",
|
|
reasoning: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
const issues = collectModelCapabilityGuardrailIssues({
|
|
snapshot: aliasCollisionSnapshot,
|
|
requirementModelIDs: [],
|
|
})
|
|
|
|
expect(issues).toContainEqual(
|
|
expect.objectContaining({
|
|
kind: "pattern-alias-collides-with-snapshot",
|
|
modelID: "gemini-3.1-pro-high",
|
|
canonicalModelID: "gemini-3.1-pro",
|
|
}),
|
|
)
|
|
})
|
|
|
|
test("flags exact aliases when models.dev gains a canonical entry for the alias itself", () => {
|
|
const bundledSnapshot = getBundledModelCapabilitiesSnapshot()
|
|
const aliasCollisionSnapshot: ModelCapabilitiesSnapshot = {
|
|
...bundledSnapshot,
|
|
models: {
|
|
...bundledSnapshot.models,
|
|
"gemini-3-pro-high": {
|
|
id: "gemini-3-pro-high",
|
|
family: "gemini",
|
|
reasoning: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
const issues = collectModelCapabilityGuardrailIssues({
|
|
snapshot: aliasCollisionSnapshot,
|
|
requirementModelIDs: [],
|
|
})
|
|
|
|
expect(issues).toContainEqual(
|
|
expect.objectContaining({
|
|
kind: "exact-alias-collides-with-snapshot",
|
|
aliasModelID: "gemini-3-pro-high",
|
|
canonicalModelID: "gemini-3-pro-preview",
|
|
}),
|
|
)
|
|
})
|
|
|
|
test("flags built-in requirement models that rely on aliases instead of canonical IDs", () => {
|
|
const issues = collectModelCapabilityGuardrailIssues({
|
|
requirementModelIDs: ["gemini-3.1-pro-high"],
|
|
})
|
|
|
|
expect(issues).toContainEqual(
|
|
expect.objectContaining({
|
|
kind: "built-in-model-relies-on-alias",
|
|
modelID: "gemini-3.1-pro-high",
|
|
canonicalModelID: "gemini-3.1-pro",
|
|
ruleID: "gemini-3.1-pro-tier-alias",
|
|
}),
|
|
)
|
|
})
|
|
})
|