Files
OmniRoute/open-sse/services/specificityTypes.ts
Diego Rodrigues de Sa e Souza 3d75fb3fae Release v3.8.0 (#2073)
Integrated into release/v3.8.0
2026-05-10 00:55:06 -03:00

44 lines
1012 B
TypeScript

/**
* Query specificity / complexity detection types for Manifest routing integration.
*/
export interface SpecificityResult {
score: number;
breakdown: SpecificityBreakdown;
rulesTriggered: string[];
inputTokens: number;
confidence: number;
}
export interface SpecificityBreakdown {
codeComplexity: number;
mathComplexity: number;
reasoningDepth: number;
contextSize: number;
toolCalling: number;
domainSpecificity: number;
}
export interface SpecificityRule {
name: string;
category: keyof SpecificityBreakdown;
weight: number;
detect(input: RuleInput): RuleMatch | null;
}
export interface RuleInput {
messages: Array<{ role?: string; content?: string | unknown }>;
systemPrompt?: string;
tools?: Array<{
function?: { name: string; description?: string; parameters?: unknown };
}>;
model?: string;
}
export interface RuleMatch {
score: number;
evidence: string;
}
export type SpecificityLevel = "trivial" | "simple" | "moderate" | "complex" | "expert";