fix(delegate-task): build categoryModel with variant for categories without fallback chain
When a category has no CATEGORY_MODEL_REQUIREMENTS entry (e.g. user-defined categories like solana-re), the !requirement branch set actualModel but never built categoryModel with variant from the user config. The bottom fallback then created categoryModel via parseModelString alone, silently dropping the variant. Mirror the requirement branch logic: read variant from userCategories and resolved.config, and build categoryModel with it. Fixes #2538
This commit is contained in:
@@ -98,6 +98,11 @@ Available categories: ${allCategoryNames}`,
|
||||
modelInfo = explicitCategoryModel || overrideModel
|
||||
? { model: actualModel, type: "user-defined", source: "override" }
|
||||
: { model: actualModel, type: "system-default", source: "system-default" }
|
||||
const parsedModel = parseModelString(actualModel)
|
||||
const variantToUse = userCategories?.[args.category!]?.variant ?? resolved.config.variant
|
||||
categoryModel = parsedModel
|
||||
? (variantToUse ? { ...parsedModel, variant: variantToUse } : parsedModel)
|
||||
: undefined
|
||||
}
|
||||
} else {
|
||||
const resolution = resolveModelForDelegateTask({
|
||||
|
||||
Reference in New Issue
Block a user