Cross-provider fallbacks
Some task families must always keep a fallback on a different provider than the primary, so a provider outage cannot take out the whole family:query_reasonrequiresQUERY_REASON_FALLBACK_MODEL.- Every extraction family (
extraction,extraction_*, and*_extraction) requiresCOVERAGE_CLEANUP_MODEL.
requiredCrossProviderFallback(taskFamily)returns the required route, orundefinedwhen the family has no requirement.safetyFallbackRoutes(taskFamily)returns the required route plus the sharedFALLBACK_MODELwhen they differ.findCrossProviderFallback(primary, candidates)picks the first candidate on a different provider than the primary.
Challengers
recommendedChallengerRoutes(taskFamily) returns the reviewed static challenger set for a family:
query_reasonevaluates OpenAIgpt-5.6-terra, Fireworks Muse Glimmer 30B, and Fireworks Inkling against the active primary.- Extraction families keep a separate OpenAI
gpt-5.4challenger. - All other families return an empty set.
Rating-based promotion
DEFAULT_RATING_ROUTING_CONFIG holds the promotion defaults the router applies to explicit human ratings:
The score is
(thumbs up + 5) / (all ratings + 10). Provider errors, timeouts, schema failures, and tool completion stay availability telemetry; they never become quality labels.
clampExplorationPct(value, maximum?) clamps an exploration fraction to [0, maximum] and returns 0 for non-finite input.
Quality escalation helpers
Two helpers encode which extraction kinds run on the quality route:primaryRouteForCall({ task, taskKind })returnsEXTRACTION_QUALITY_MODELforextraction_source_treeandextraction_operational_profilewhen the call resolves toextraction, otherwisenull.fallbackRouteForCall({ task, taskKind, primaryRoute, allowFallback })returns the fallback route for a call, ornullwhen fallback is disabled, the fallback equals the primary, or the task is in the low-cost no-escalation set (LOW_COST_NO_ESCALATION_TASKS, which includesclassification,extraction, andvoice_transcriptionamong others). Kinds inQUALITY_ESCALATION_TASK_KINDS, such asextraction_review, always keep their fallback.