fix: model format normalization and explicit config cache bypass
- Add normalizeModelFormat() utility for string/object model handling - Update subagent-resolver to handle both model formats - Add explicitUserConfig flag to ModelResolutionResult - Set explicitUserConfig: true when user model is found in pipeline This fixes the issue where plugin-provided models fail cache validation and fall through to random fallback models.
This commit is contained in:
@@ -33,6 +33,7 @@ export type ModelResolutionResult = {
|
||||
variant?: string
|
||||
attempted?: string[]
|
||||
reason?: string
|
||||
explicitUserConfig?: boolean
|
||||
}
|
||||
|
||||
function normalizeModel(model?: string): string | undefined {
|
||||
@@ -58,7 +59,7 @@ export function resolveModelPipeline(
|
||||
const normalizedUserModel = normalizeModel(intent?.userModel)
|
||||
if (normalizedUserModel) {
|
||||
log("Model resolved via config override", { model: normalizedUserModel })
|
||||
return { model: normalizedUserModel, provenance: "override" }
|
||||
return { model: normalizedUserModel, provenance: "override", explicitUserConfig: true }
|
||||
}
|
||||
|
||||
const normalizedCategoryDefault = normalizeModel(intent?.categoryDefaultModel)
|
||||
|
||||
Reference in New Issue
Block a user