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

Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #75.
This commit is contained in:
2026-03-13 03:13:50 +00:00
committed by jason.woltje
parent 95f95f54cf
commit 7485f32e69
5 changed files with 208 additions and 4 deletions

View File

@@ -3,3 +3,4 @@ export const VERSION = '0.0.0';
export * from './chat/index.js';
export * from './agent/index.js';
export * from './provider/index.js';
export * from './routing/index.js';

View File

@@ -0,0 +1,25 @@
/** Cost tier for model selection */
export type CostTier = 'cheap' | 'standard' | 'premium';
/** Task type hint for routing */
export type TaskType = 'chat' | 'coding' | 'analysis' | 'summarization' | 'general';
/** Routing criteria for model selection */
export interface RoutingCriteria {
taskType?: TaskType;
costTier?: CostTier;
requireReasoning?: boolean;
requireImageInput?: boolean;
minContextWindow?: number;
preferredProvider?: string;
preferredModel?: string;
}
/** Result of a routing decision */
export interface RoutingResult {
provider: string;
modelId: string;
modelName: string;
score: number;
reasoning: string;
}