refactor(delegate-task): restructure category system for unbiased model selection
- Remove temperature from all categories - Consolidate CATEGORY_MODEL_CATALOG into DEFAULT_CATEGORIES - Replace 'general' and 'most-capable' with 'unspecified-low' and 'unspecified-high' - Add Selection_Gate to unspecified categories to force deliberate selection - Update quick category to use claude-haiku-4-5 - Update all references and tests across codebase
This commit is contained in:
@@ -325,7 +325,7 @@ describe("migrateAgentConfigToCategory", () => {
|
||||
{ model: "anthropic/claude-sonnet-4-5" },
|
||||
]
|
||||
|
||||
const expectedCategories = ["visual-engineering", "ultrabrain", "quick", "most-capable", "general"]
|
||||
const expectedCategories = ["visual-engineering", "ultrabrain", "quick", "unspecified-high", "unspecified-low"]
|
||||
|
||||
// #when: Migrate each config
|
||||
const results = configs.map(migrateAgentConfigToCategory)
|
||||
@@ -385,10 +385,9 @@ describe("shouldDeleteAgentConfig", () => {
|
||||
|
||||
test("returns true when all fields match category defaults", () => {
|
||||
// #given: Config with fields matching category defaults
|
||||
// Note: DEFAULT_CATEGORIES only has temperature, not model
|
||||
const config = {
|
||||
category: "visual-engineering",
|
||||
temperature: 0.7,
|
||||
model: "google/gemini-3-pro-preview",
|
||||
}
|
||||
|
||||
// #when: Check if config should be deleted
|
||||
@@ -399,10 +398,10 @@ describe("shouldDeleteAgentConfig", () => {
|
||||
})
|
||||
|
||||
test("returns false when fields differ from category defaults", () => {
|
||||
// #given: Config with custom temperature override
|
||||
// #given: Config with custom model override
|
||||
const config = {
|
||||
category: "visual-engineering",
|
||||
temperature: 0.9, // Different from default (0.7)
|
||||
model: "anthropic/claude-opus-4-5",
|
||||
}
|
||||
|
||||
// #when: Check if config should be deleted
|
||||
@@ -415,10 +414,10 @@ describe("shouldDeleteAgentConfig", () => {
|
||||
test("handles different categories with their defaults", () => {
|
||||
// #given: Configs for different categories
|
||||
const configs = [
|
||||
{ category: "ultrabrain", temperature: 0.1 },
|
||||
{ category: "quick", temperature: 0.3 },
|
||||
{ category: "most-capable", temperature: 0.1 },
|
||||
{ category: "general", temperature: 0.3 },
|
||||
{ category: "ultrabrain" },
|
||||
{ category: "quick" },
|
||||
{ category: "unspecified-high" },
|
||||
{ category: "unspecified-low" },
|
||||
]
|
||||
|
||||
// #when: Check each config
|
||||
|
||||
Reference in New Issue
Block a user