agentscope-ai / agentscope-ai/QwenPaw

The Right Model for Every Message: Automatic Model Routing

Aberta
#6,436 4 comentários 1 reação 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
Python
Estrelas
34.9k
Forks
3.1k
Merge médio
1d 15h
PRs com merge (30d)
225

Descrição

Summary
Route each request to the most suitable model automatically — small/fast local model for simple turns, vision model when an image arrives, big model for hard reasoning — instead of pinning every agent to a single fixed model.

Component(s) Affected
done
Core / Backend (app, agents, config, providers, utils, local_models)
done
Console (frontend web UI)
not done
Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
not done
Skills
not done
CLI
done
Documentation (website)
not done
Tests
not done
CI/CD
not done
Scripts / Deploy
Problem / Motivation
Each agent is bound to one model. Users who run several local models (a fast 4B, a strong 9B, a vision model, an OCR model) must manually switch, or create duplicate agents per model. On 8 GB consumer GPUs this is painful: the heavy model burns time and VRAM on trivial messages, and image messages fail outright when the pinned model is text-only (the multimodal probe system already detects this — it just can't act on it).

Proposed Solution
Optional "Auto" model choice per agent with a rules engine:
By content: message contains image → vision-capable model; long document → large-context model.
By difficulty: heuristic or tiny-classifier routing between fast/strong text models.
By availability: prefer local; fall back to a configured cloud model if the local endpoint is down.
User-visible and editable rules (no black box), per-agent overrides, and a "why this model" note in the reply metadata.
Reuses the capability data QwenPaw already stores per model (supports_image, max context, probe results).
Alternatives Considered
Multiple agents, one per model: clutters the agent list and loses shared memory/history.
Manual switching: fine for one chat, unusable across 18 always-on channels where nobody is watching.
Additional Context
The provider system already tracks per-model capabilities and context sizes — routing is a decision layer on top of data that exists today.

Willing to Contribute
not done
I am willing to open a PR for this feature (after discussion).

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.