Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
/**
* 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<{
type?: string;
function?: { name: string; description?: string; parameters?: unknown };
}>;
model?: string;
}
export interface RuleMatch {
score: number;
evidence: string;
}
export type SpecificityLevel = "trivial" | "simple" | "moderate" | "complex" | "expert";