fix: routing — remove turn limit from default tier, no gaps
This commit is contained in:
+7
-7
@@ -172,23 +172,23 @@ 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
|
||||
|
||||
# TIER 4: Default — Dense preferred for medium tasks, MoE as workhorse, VLM as overflow
|
||||
if turns <= 6 and t <= 4000:
|
||||
# Medium complexity — try Dense first, then MoE, then VLM
|
||||
# TIER 4: Default — Dense preferred for medium tasks, MoE as workhorse, VLM overflow
|
||||
if t <= 4000:
|
||||
# Catch everything that isn't heavy (≤4000 tokens, any turn count)
|
||||
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, "medium_task")
|
||||
if result: return result
|
||||
|
||||
Reference in New Issue
Block a user