picoclaw/pkg/routing
xiaoen b84adacc2f fix(routing): address review feedback on CJK estimation and observability
1. CJK token estimation: replace flat rune_count/3 with script-aware
   counting — CJK runes (U+2E80–U+9FFF, U+F900–U+FAFF, U+AC00–U+D7AF)
   count as 1 token each, non-CJK runes at /4. This fixes a 3x
   underestimate for Chinese/Japanese/Korean text that could incorrectly
   route complex CJK messages to the light model.

2. Routing observability: SelectModel now returns the computed score as
   a third value. selectCandidates logs the score on both paths — Info
   level for light model selection, Debug level for primary model
   selection.

3. Added tests: TestExtractFeatures_TokenEstimate_Mixed (CJK+ASCII mix),
   TestRouter_SelectModel_ReturnsScore.

Addresses review feedback from @mingmxren.
2026-03-06 13:10:20 +08:00
..
agent_id.go feat: add multi-agent routing with declarative bindings 2026-02-13 12:12:33 -03:00
agent_id_test.go fix(lint): format imports in agent_id_test 2026-02-27 21:20:56 +08:00
classifier.go fix(routing): resolve golines, gosmopolitan and misspell lint failures 2026-03-02 23:11:45 +08:00
features.go fix(routing): address review feedback on CJK estimation and observability 2026-03-06 13:10:20 +08:00
route.go feat: add multi-agent routing with declarative bindings 2026-02-13 12:12:33 -03:00
route_test.go feat: add multi-agent routing with declarative bindings 2026-02-13 12:12:33 -03:00
router.go fix(routing): address review feedback on CJK estimation and observability 2026-03-06 13:10:20 +08:00
router_test.go fix(routing): address review feedback on CJK estimation and observability 2026-03-06 13:10:20 +08:00
session_key.go feat(identity): add unified user identity with canonical platform:id format 2026-02-23 06:56:48 +08:00
session_key_test.go feat(identity): add unified user identity with canonical platform:id format 2026-02-23 06:56:48 +08:00