diff --git a/router/router.py b/router/router.py index 238d7ff..e7f9aa7 100644 --- a/router/router.py +++ b/router/router.py @@ -172,16 +172,16 @@ def route(rd, tier): result = select_best_gpu(fallback, "lightweight_fallback") if result: return result - # TIER 2: Simple conversations — low token, short context → VLM preferred - if not sys and t <= 1000 and turns <= 4 and "qwen3.5-9b-vlm" in avail: + # TIER 2: Simple conversations — short context, any prompt → VLM preferred + if t <= 1000 and turns <= 4 and "qwen3.5-9b-vlm" in avail: if not is_gpu_busy("qwen3.5-9b-vlm"): return {"model":"qwen3.5-9b-vlm","reason":"simple_conv"} # VLM busy — try Dense if "qwen3.6-27B-code" in avail and not is_gpu_busy("qwen3.6-27B-code"): return {"model":"qwen3.6-27B-code","reason":"simple_conv_fallback"} - # TIER 3: Heavy reasoning — large context, system prompts, long conversations - if t > 4000 or sys or turns > 8: + # TIER 3: Heavy reasoning — large context or very long conversations + if t > 4000 or turns > 8: candidates = [m for m in ["qwen3.6-27B-code","qwen3.6-35B-A3B","qwen3.5-9b-vlm"] if m in avail] result = select_best_gpu(candidates, "heavy_reasoning") if result: return result