adaptive-memory-multi-model-router 2.14.48 → 2.14.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -625,7 +625,7 @@ function routeQuery(prompt, available_models, budget_multiplier = 1.0) {
625
625
  p75: allCosts[Math.floor(allCosts.length * 0.75)] || 1.0,
626
626
  };
627
627
  const features = extractQueryFeatures(prompt);
628
- const candidate_names = available_models || Object.keys(profiles);
628
+ const candidate_names = (Array.isArray(available_models) && available_models.length > 0) ? available_models : Object.keys(profiles);
629
629
  // Filter to available models
630
630
  const candidates = candidate_names
631
631
  .filter(name => profiles[name])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adaptive-memory-multi-model-router",
3
- "version": "2.14.48",
3
+ "version": "2.14.49",
4
4
  "shortName": "A3M Router",
5
5
  "displayName": "A3M Router - Adaptive Memory Multi-Model Router",
6
6
  "description": "🥇 Cheapest LLM router on RouterArena ($0.05/1K) · 15K+ downloads in 2 weeks · Open-source AI gateway with parallel multi-LLM execution across 47+ providers, ensemble voting, semantic cache, and budget enforcement",
@@ -693,7 +693,7 @@ export function routeQuery(prompt: string, available_models?: string[], budget_m
693
693
  };
694
694
 
695
695
  const features = extractQueryFeatures(prompt);
696
- const candidate_names = available_models || Object.keys(profiles);
696
+ const candidate_names = (Array.isArray(available_models) && available_models.length > 0) ? available_models : Object.keys(profiles);
697
697
 
698
698
  // Filter to available models
699
699
  const candidates = candidate_names