def44338ff
Updates the canonical Anthropic Opus model in every fallback chain (sisyphus, oracle, prometheus, metis, momus, visual-engineering, ultrabrain, deep, artistry, unspecified-high), the unspecified-high category default, the think-mode HIGH_VARIANT_MAP, the Claude Code alias map, the claude-thinking legacy alias, the context-limit GA regex, and event.ts fallback strings. Widens supportsCachedAnthropicLimit to accept both claude-*-4-6 and claude-*-4-7 so the 1M context cache still applies across the bump. Regenerates the bundled model-capabilities snapshot from models.dev and the model-fallback snapshot to match the new source output.
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { describe, expect, spyOn, test } from "bun:test"
|
|
import { createBuiltinAgents } from "./builtin-agents"
|
|
import * as shared from "../shared"
|
|
|
|
const TEST_DEFAULT_MODEL = "anthropic/claude-opus-4-7"
|
|
|
|
describe("createBuiltinAgents custom agent visibility", () => {
|
|
test("#given runtime custom agents #when orchestrator prompts are built #then custom agents are not advertised for automatic delegation", async () => {
|
|
//#given
|
|
const fetchSpy = spyOn(shared, "fetchAvailableModels").mockResolvedValue(
|
|
new Set(["anthropic/claude-opus-4-7", "openai/gpt-5.4"])
|
|
)
|
|
|
|
try {
|
|
//#when
|
|
const agents = await createBuiltinAgents(
|
|
[],
|
|
{},
|
|
undefined,
|
|
TEST_DEFAULT_MODEL,
|
|
undefined,
|
|
undefined,
|
|
[],
|
|
[
|
|
{
|
|
name: "backend-engineer",
|
|
description: "Custom backend specialist",
|
|
},
|
|
]
|
|
)
|
|
|
|
//#then
|
|
expect(agents.sisyphus.prompt).not.toContain("backend-engineer")
|
|
expect(agents.hephaestus.prompt).not.toContain("backend-engineer")
|
|
expect(agents.atlas.prompt).not.toContain("backend-engineer")
|
|
} finally {
|
|
fetchSpy.mockRestore()
|
|
}
|
|
})
|
|
})
|