feat: agent routing engine — cost/capability matrix (P2-003) #75

Merged
jason.woltje merged 1 commits from feat/p2-003-routing-engine into main 2026-03-13 03:13:51 +00:00
Owner

Summary

  • Added RoutingService with scoring algorithm for model selection
  • Routes based on task type, cost tier, capabilities (reasoning/image/context), provider preference
  • REST endpoints: POST /api/providers/route and /api/providers/rank
  • New routing types in @mosaic/types

Test plan

  • typecheck, lint, format:check all pass

Closes #21

## Summary - Added RoutingService with scoring algorithm for model selection - Routes based on task type, cost tier, capabilities (reasoning/image/context), provider preference - REST endpoints: POST /api/providers/route and /api/providers/rank - New routing types in @mosaic/types ## Test plan - [x] typecheck, lint, format:check all pass Closes #21
jason.woltje added 1 commit 2026-03-13 03:13:49 +00:00
Add RoutingService that selects optimal LLM model based on task type,
cost tier, capability requirements (reasoning, image, context window),
and provider preference. Scoring algorithm ranks all available models.

- RoutingService: route() for best match, rank() for scored list
- POST /api/providers/route and /api/providers/rank endpoints
- Routing types in @mosaic/types (CostTier, TaskType, RoutingCriteria)
- Cost tier classification: cheap (<$1/M), standard (<$10/M), premium

Closes #21

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 7485f32e69 into main 2026-03-13 03:13:51 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#75