feat: intent-based routing with effort tiers and escalation#4
Merged
Conversation
Classify requests by complexity using the local MLX model and route to the appropriate model tier (local MLX, Claude Sonnet, or Claude Opus). Smart defaults based on local model capability — Qwen3-Coder-Next users get local for medium tasks since it benchmarks near Sonnet. "Try again" escalates through tiers: local → sonnet → opus. New files: router, claude-client, setup-router (with tests). Modified: config (tier types), proxy (routing logic), index (--setup flag). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mallex --setupto reconfigure routing at any timeNew files
src/router.tssrc/claude-client.tssrc/setup-router.tssrc/*test.ts(×3)Modified files
src/config.tsTierModel,RoutingConfigtypes,defaultTierModels()smart defaultssrc/proxy.tssrc/index.ts--setupflag, first-run routing setupREADME.mdTest plan
npm run build && npm test— 171 tests pass, 0 failuresmallex --setup— verify questionnaire displays tiers with model namesmallexfresh (delete~/.mallex/config.json) — verify first-run includes routing setup🤖 Generated with Claude Code