fix(delegate-task): category built-in model takes precedence over inherited model

Previously, when using categories like 'quick', the parent session's model
(e.g., Opus 4.5) would override the category's built-in model (e.g., Haiku).

Fixed priority: userConfig.model → category built-in → systemDefault

The inherited model from parent session no longer affects category-based
delegation - categories have their own explicit models.
This commit is contained in:
justsisyphus
2026-01-20 17:05:17 +09:00
parent 3e5265700b
commit 3d3d3e493b
4 changed files with 45 additions and 48 deletions
+8 -9
View File
@@ -10,10 +10,10 @@ describe("Prometheus category config resolution", () => {
// #when
const config = resolveCategoryConfig(categoryName)
// #then - DEFAULT_CATEGORIES only has temperature, not model
// #then
expect(config).toBeDefined()
expect(config?.model).toBeUndefined()
expect(config?.temperature).toBe(0.1)
expect(config?.model).toBe("openai/gpt-5.2-codex")
expect(config?.variant).toBe("xhigh")
})
test("resolves visual-engineering category config", () => {
@@ -23,10 +23,9 @@ describe("Prometheus category config resolution", () => {
// #when
const config = resolveCategoryConfig(categoryName)
// #then - DEFAULT_CATEGORIES only has temperature, not model
// #then
expect(config).toBeDefined()
expect(config?.model).toBeUndefined()
expect(config?.temperature).toBe(0.7)
expect(config?.model).toBe("google/gemini-3-pro-preview")
})
test("user categories override default categories", () => {
@@ -71,10 +70,10 @@ describe("Prometheus category config resolution", () => {
// #when
const config = resolveCategoryConfig(categoryName, userCategories)
// #then - falls back to DEFAULT_CATEGORIES which has no model
// #then - falls back to DEFAULT_CATEGORIES
expect(config).toBeDefined()
expect(config?.model).toBeUndefined()
expect(config?.temperature).toBe(0.1)
expect(config?.model).toBe("openai/gpt-5.2-codex")
expect(config?.variant).toBe("xhigh")
})
test("preserves all category properties (temperature, top_p, tools, etc.)", () => {