fix(model-resolver): use connected providers cache when model cache is empty (#1227)

- Remove resolved.model from userModel in tools.ts (was bypassing fallback chain)
- Use connected providers cache in model-resolver when availableModels is empty
- Allows proper provider selection (e.g., github-copilot instead of google)
This commit is contained in:
Peïo Thibault
2026-01-29 01:30:19 +01:00
committed by GitHub
parent cfe037782c
commit 2246f13d5a
3 changed files with 51 additions and 19 deletions
+1 -1
View File
@@ -537,7 +537,7 @@ To continue this session: session_id="${args.session_id}"`
}
} else {
const resolution = resolveModelWithFallback({
userModel: userCategories?.[args.category]?.model ?? resolved.model ?? sisyphusJuniorModel,
userModel: userCategories?.[args.category]?.model ?? sisyphusJuniorModel,
fallbackChain: requirement.fallbackChain,
availableModels,
systemDefaultModel,