feat(routing): per-task rules on top of complexity tiers; hosted router is the default
The router has always returned two signals — task label and complexity tier — but only the tier picked models. [routing.tasks] adds `label → ordered models`: a matching rule's models lead the candidate chain and the tier chain follows as fallback, so pinning translations to a local model never weakens failover. Requests whose chain was headed by a task rule report route_source "router+task-rule". The Routing page grows a per-task editor built from the account's LIVE taxonomy (GET /v1/taxonomies via the new /admin/api/routing/labels proxy; built-in label set when the router is unreachable), with localized task names, each task's share of 7-day traffic, "by complexity (no rule)" as the explicit empty state, and custom labels for other taxonomies. Deleting a model scrubs it from task rules like it always did from tiers. Also fixes the default config pointing at a placeholder localhost:8080 router with a nonexistent taxonomy — a fresh install now targets the hosted allaigate router (IP endpoint, verify_tls off, data-assistant, 12 s oracle timeout) and degrades gracefully until a key is set. Verified end-to-end against the live router: translation → task-rule model, math → tier path. 16 new strings in all 7 languages.
This commit is contained in:
Vendored
+18
@@ -545,4 +545,22 @@ export default {
|
||||
"bench.running": "测速中……",
|
||||
"bench.failed": "失败",
|
||||
"bench.none": "还没有本地 .cmf 聊天模型。",
|
||||
|
||||
// task-based routing
|
||||
"task.chitchat": "闲聊",
|
||||
"task.code": "代码",
|
||||
"task.creative-writing": "创意写作",
|
||||
"task.extraction": "数据提取",
|
||||
"task.math": "数学",
|
||||
"task.qa": "问答",
|
||||
"task.summarization": "摘要",
|
||||
"task.translation": "翻译",
|
||||
"routing.tasks.title": "按任务路由",
|
||||
"routing.tasks.hint": "规则中的模型对该任务优先;下方的复杂度链仍作为回退。留空 = 仅按复杂度。",
|
||||
"routing.tasks.inherit": "按复杂度(无规则)",
|
||||
"routing.tasks.share": "{p}% 的请求(7 天)",
|
||||
"routing.tasks.fromRouter": "标签实时来自路由器",
|
||||
"routing.tasks.builtin": "路由器不可达 — 使用内置标签集",
|
||||
"routing.tasks.addCustom": "添加任务",
|
||||
"routing.tasks.addPlaceholder": "自定义标签……",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user