1. Size-Based Model Tiering as a Routing Primitive

Before you build a clever routing engine, you need to accept that model size is the single most predictive variable you have — and design your tier ladder around that fact first, then layer task-specific signals on top.

  • Model size explains the majority of capability variance across dimensions like recall, reasoning depth, and reliability — meaning a well-designed tier ladder (small → medium → large) captures most of the routing value before you add any task-specific signals.
  • Cost and latency move in lockstep with size, so your routing logic isn't just optimizing for quality — it's solving a three-way tension between accuracy, spend, and response time that changes with every pipeline stage.
  • Esoteric fact recall degrades disproportionately in smaller models, which means routing decisions for knowledge-intensive agent steps (tool selection, entity resolution, compliance lookups) carry higher stakes than routing for summarization or extraction tasks.
TECHNICAL DEEP DIVE & CODE ARTIFACTS Expand [+]

Ted Sanders' framing is unusually clean for a routing engineer to work with: a single dominant variable (size) with three measurable consequences (performance, cost, esoteric recall) that you can instrument and threshold. The practical implication is that your routing config should have a default tier assignment per task type — not a flat 'use the cheapest model that passes eval' rule — because task class predicts which of those three variables will dominate. A pipeline step doing tool-call selection in a domain-specific agent is primarily recall-constrained; a step doing intent classification on short user inputs is primarily latency-constrained. Those two steps should have different default tiers and different fallback triggers. Source: Quoting Ted Sanders — Simon Willison (https://simonwillison.net/2026/Oct/28/ted-sanders/)

Scaling laws add a structural constraint here that routing engineers often ignore: model capability doesn't scale linearly with size — it follows a power-law curve, which means the gap between your medium and large tier is predictably larger than the gap between your small and medium. That asymmetry matters when you're setting fallback thresholds. If you trigger an upward fallback from medium to large on a 10% accuracy drop, you're paying a large cost increase for a capability jump that may dwarf what you actually needed. The right threshold calibration requires knowing where you sit on that curve for your specific task distribution. Source: Scaling Laws, Carefully — Lilian Weng (https://lilianweng.github.io/posts/2026-06-24-scaling-laws/)

Reference Architecture
// TypeScript — model tier config with per-task routing rules
type TaskClass = 'knowledge_intensive' | 'latency_sensitive' | 'balanced';
type ModelTier = 'small' | 'medium' | 'large' | 'xl';

interface RoutingThresholds {
  minAccuracy: number;   // 0.0 - 1.0, from eval harness
  maxLatencyMs: number;
  fallbackTier: ModelTier;
}

const ROUTING_CONFIG: Record<TaskClass, { defaultTier: ModelTier; thresholds: RoutingThresholds }> = {
  knowledge_intensive: {
    defaultTier: 'large',
    thresholds: { minAccuracy: 0.88, maxLatencyMs: 4000, fallbackTier: 'xl' },
  },
  latency_sensitive: {
    defaultTier: 'small',
    thresholds: { minAccuracy: 0.75, maxLatencyMs: 800, fallbackTier: 'medium' },
  },
  balanced: {
    defaultTier: 'medium',
    thresholds: { minAccuracy: 0.82, maxLatencyMs: 2000, fallbackTier: 'large' },
  },
};

export function resolveModelTier(
  taskClass: TaskClass,
  realtimeMetrics: { p95LatencyMs: number; rollingAccuracy: number }
): ModelTier {
  const { defaultTier, thresholds } = ROUTING_CONFIG[taskClass];
  const { p95LatencyMs, rollingAccuracy } = realtimeMetrics;

  if (rollingAccuracy < thresholds.minAccuracy) return thresholds.fallbackTier;
  if (p95LatencyMs > thresholds.maxLatencyMs && taskClass === 'latency_sensitive') {
    return defaultTier === 'small' ? 'medium' : defaultTier; // step up, don't jump
  }
  return defaultTier;
}
State Interaction Chart
flowchart TD A[Incoming Agent Task] --> B{Task Class Classifier} B -->|Knowledge-Intensive| C[Default: Large Tier] B -->|Latency-Sensitive| D[Default: Small Tier] B -->|Balanced| E[Default: Medium Tier] C --> F{Accuracy >= threshold?} D --> G{Latency <= threshold?} E --> H{Both thresholds met?} F -->|No| I[Escalate to XL Tier] F -->|Yes| J[Complete Step] G -->|No| K[Fallback to Cached Response] G -->|Yes| J H -->|No| L{Which threshold breached?} L -->|Accuracy| I L -->|Latency| D H -->|Yes| J

2. Task-Specific Accuracy Benchmarks as Live Routing Signals

A domain-specific benchmark like o11y-bench — which tests functional correctness on real observability tasks rather than general capability — gives you the kind of accuracy signal that's actually worth routing on, because it measures what the model does in your problem space, not on a standardized leaderboard.

  • General leaderboard scores are dangerously misleading for routing decisions in narrow-domain pipelines — a model that tops MMLU may still hallucinate PromQL syntax or misread a telemetry trace, which only a domain-scoped eval catches.
  • Functional correctness checks — verifying that generated queries actually execute and that dashboard changes produce valid outputs — represent a higher bar than semantic similarity scores and should be the accuracy signal that feeds your routing rules.
  • Rolling accuracy from live evals fed into your routing layer transforms a static benchmark into a dynamic fallback trigger — when model performance on your task class drifts below threshold in production, the system reroutes without waiting for an offline eval cycle.
TECHNICAL DEEP DIVE & CODE ARTIFACTS Expand [+]

Grafana's o11y-bench approach — checking whether an agent's conclusions are supported by actual telemetry and whether generated queries work correctly — is the right model for building routing signals in any domain-specific pipeline. The key architectural move is treating benchmark results not as a one-time model selection gate but as a continuously updated scoring surface that your routing layer can read from. If you're running an agentic pipeline over customer support tickets, log data, or compliance documents, you want a task-specific eval harness producing rolling accuracy scores on a representative slice of live traffic, not just a quarterly offline eval. Source: Evaluate AI models for observability: o11y-bench — Grafana Labs (https://grafana.com/blog/evaluate-ai-models-for-observability-o11y-bench-joins-fireworks-specialized-intelligence-index-and-reaches-v1-1/)

AIThe inclusion of o11y-bench in Fireworks' Specialized Intelligence Index signals a broader structural shift: routing decisions in production pipelines will increasingly be informed by specialized, task-scoped indices rather than a single general-purpose leaderboard position. For a platform engineer building routing infrastructure, this means the data contract between your eval harness and your routing config needs to support multiple named accuracy dimensions — not just a single scalar — so that different pipeline stages can route on the dimension that actually governs their task class.

Reference Architecture
// TypeScript — accuracy dimension contract for multi-signal routing
interface AccuracyProfile {
  taskType: string;
  dimensions: {
    functionalCorrectness: number;  // does the output actually work?
    groundingScore: number;         // is it supported by source data?
    consistencyP95: number;         // stable across repeated runs?
  };
  sampleSize: number;
  windowMinutes: number;
  evaluatedAt: Date;
}

async function fetchAccuracyProfile(
  taskType: string,
  metricsStore: MetricsStore
): Promise<AccuracyProfile> {
  return metricsStore.query({
    taskType,
    windowMinutes: 60,
    minSampleSize: 30,
  });
}

function routingDecisionFromProfile(
  profile: AccuracyProfile,
  thresholds: { functionalCorrectness: number; groundingScore: number }
): { tier: ModelTier; reason: string } {
  if (profile.dimensions.functionalCorrectness < thresholds.functionalCorrectness) {
    return { tier: 'large', reason: 'functional_correctness_below_threshold' };
  }
  if (profile.dimensions.groundingScore < thresholds.groundingScore) {
    return { tier: 'large', reason: 'grounding_score_below_threshold' };
  }
  return { tier: 'medium', reason: 'all_dimensions_within_threshold' };
}
State Interaction Chart
sequenceDiagram participant Pipeline as Agent Pipeline participant Router as Model Router participant Eval as Eval Harness participant MetricsDB as Metrics Store participant Models as Model Tier Registry Pipeline->>Router: Route task(type=observability_query) Router->>MetricsDB: Fetch rolling accuracy[task_type] MetricsDB-->>Router: {accuracy: 0.79, p95_latency_ms: 1200} Router->>Router: Compare against thresholds Note over Router: accuracy < 0.85 threshold Router->>Models: Select fallback tier (large) Models-->>Router: model=sol-large-v2 Router-->>Pipeline: Dispatch to sol-large-v2 Pipeline->>Eval: Submit response for functional check Eval->>MetricsDB: Update rolling accuracy score

3. AI SRE Escalation Patterns as a Template for Fallback Circuit Breakers

The AI SRE pattern — automated remediation with a human escalation trigger on confidence breach — is structurally identical to a model fallback circuit breaker, and you can borrow its escalation ladder design directly for your routing layer.

  • Automated remediation with a confidence gate before human escalation maps directly to a model routing architecture: attempt resolution at the cheapest tier, verify output quality, escalate to a higher-capability model or a human reviewer when the gate fails.
  • Circuit breaker state — closed (routing normally), open (falling back), half-open (probing recovery) — is the right mental model for routing fallback logic, because it prevents cascade failures when a primary model tier degrades and avoids thrashing between tiers during transient spikes.
  • Incident-driven routing adjustments made by data science teams need an audit trail for the same reasons incident remediation actions do — who changed the threshold, what triggered it, and whether it was reverted — otherwise your routing config becomes ungoverned configuration drift.
TECHNICAL DEEP DIVE & CODE ARTIFACTS Expand [+]

Microsoft's AI SRE reveal at BUILD 2025 surfaced something important for routing engineers: the hardest design problem isn't the automation, it's knowing when to stop automating and hand off. In routing terms, that translates directly to the question of when a fallback should be a silent model swap versus when it should surface a signal to a human operator — a data scientist reviewing threshold configs, or a platform engineer examining model tier health. The answer isn't a single latency or accuracy number; it's a composite condition that includes how long the degradation has persisted, how much of the pipeline is affected, and whether the fallback model itself is showing strain. Source: AI SRE: what is it, how could it change on-call – and does it work? — Pragmatic Engineer (https://newsletter.pragmaticengineer.com/p/ai-sre)

AIThe circuit breaker metaphor is worth taking seriously as an implementation pattern, not just an analogy. A half-open state in your routing layer — where you're routing a small percentage of traffic to the primary model to probe whether it's recovered — mirrors the probe traffic patterns used in distributed systems load balancers. This connects directly to last week's emerging pattern around incident-driven rollback: your routing fallback should be reversible, observable, and leave a clear event log so that the human reviewing the incident can see exactly what the routing layer did and why.

Reference Architecture
// TypeScript — circuit breaker for model tier routing
type CircuitState = 'closed' | 'open' | 'half_open';

interface CircuitBreakerConfig {
  failureThreshold: number;     // consecutive failures to open
  recoveryProbePercent: number; // traffic to primary in half-open
  halfOpenAfterMs: number;      // how long before probing recovery
  successThresholdToClose: number;
}

class ModelTierCircuitBreaker {
  private state: CircuitState = 'closed';
  private consecutiveFailures = 0;
  private consecutiveSuccesses = 0;
  private openedAt?: Date;

  constructor(
    private readonly config: CircuitBreakerConfig,
    private readonly onEscalate: (reason: string) => void
  ) {}

  shouldUsePrimary(): boolean {
    if (this.state === 'closed') return true;
    if (this.state === 'open') {
      const elapsed = Date.now() - (this.openedAt?.getTime() ?? 0);
      if (elapsed >= this.config.halfOpenAfterMs) {
        this.state = 'half_open';
        return Math.random() < this.config.recoveryProbePercent / 100;
      }
      return false;
    }
    return Math.random() < this.config.recoveryProbePercent / 100;
  }

  recordOutcome(success: boolean, isFallback: boolean): void {
    if (!success && isFallback) {
      this.onEscalate('both_tiers_degraded');
      return;
    }
    if (!success) {
      this.consecutiveFailures++;
      this.consecutiveSuccesses = 0;
      if (this.consecutiveFailures >= this.config.failureThreshold) {
        this.state = 'open';
        this.openedAt = new Date();
      }
    } else if (this.state === 'half_open') {
      this.consecutiveSuccesses++;
      if (this.consecutiveSuccesses >= this.config.successThresholdToClose) {
        this.state = 'closed';
        this.consecutiveFailures = 0;
      }
    }
  }
}
State Interaction Chart
flowchart TD A[Model Tier Request] --> B{Circuit State?} B -->|Closed| C[Route to Primary Tier] B -->|Open| D[Route to Fallback Tier] B -->|Half-Open| E[Route 10pct to Primary] C --> F{Quality Gate Passes?} F -->|Yes| G[Return Response] F -->|No - consecutive failures >= N| H[Open Circuit] H --> D E --> I{Primary Healthy?} I -->|Yes - N consecutive| J[Close Circuit] I -->|No| H D --> K{Fallback Also Degraded?} K -->|Yes| L[Escalate to Human Operator] K -->|No| G

4. Dynamic Routing Config as a Data Science Team Interface

The routing layer isn't just infrastructure — it's the surface where data science teams need write access to threshold values, fallback assignments, and accuracy dimensions without touching pipeline code or triggering a deployment.

  • Config-driven threshold management — routing rules stored as versioned records in a database rather than hardcoded in pipeline logic — lets data scientists adjust fallback triggers in response to model drift without requiring an engineer to cut a release.
  • End-to-end business process continuity depends on routing rules that understand which pipeline steps are blocking versus best-effort, because a fallback that's acceptable for a recommendation step may be catastrophic for a compliance classification step.
  • Auditability of threshold changes is a governance requirement, not a nice-to-have — every change to a fallback rule should carry who made it, what metric triggered the change, and what the previous value was, stored alongside the routing event log.
TECHNICAL DEEP DIVE & CODE ARTIFACTS Expand [+]

The framing from the end-to-end business process article is relevant here: AI in production pipelines only delivers value when the coordination layer — routing, fallback, escalation — is designed around business outcomes, not just technical health metrics. A data science team adjusting a fallback accuracy threshold isn't doing infrastructure work; they're making a business decision about acceptable output quality for a specific workflow step, and the interface they use to make that change should reflect that. A PostgreSQL-backed routing config table with row-level versioning, a lightweight API for threshold updates, and a read path from the routing layer that caches with a short TTL gives you the responsiveness and auditability you need without rebuilding your pipeline on every config change. Source: How to Make AI Work for End-to-End Business Processes — Towards Data Science (https://towardsdatascience.com/how-to-make-ai-work-for-end-to-end-business-processes/)

AIThis connects directly to the platform observability pattern surfaced in the Amazon EKS developer experience article: teams that don't measure their platforms can't show whether they're improving. The same failure mode applies to routing configs — if you don't log every routing decision with its triggering condition and the config version that produced it, you can't attribute output quality improvements to threshold changes, and your data science team is flying blind when they try to tune fallback rules. Routing decision logs are the feedback loop that makes dynamic config adjustment a discipline rather than a guess.

Reference Architecture
-- PostgreSQL: routing rules table with full version history
CREATE TABLE routing_rules (
  id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  task_type       TEXT NOT NULL,
  default_tier    TEXT NOT NULL,
  fallback_tier   TEXT NOT NULL,
  min_accuracy    NUMERIC(4,3) NOT NULL,
  max_latency_ms  INTEGER NOT NULL,
  accuracy_dim    TEXT NOT NULL DEFAULT 'functionalCorrectness',
  is_active       BOOLEAN NOT NULL DEFAULT TRUE,
  created_by      TEXT NOT NULL,
  change_reason   TEXT,
  created_at      TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

-- Always insert, never update — full version history
CREATE INDEX ON routing_rules (task_type, is_active, created_at DESC);

-- Fetch active rule for a task type
SELECT *
FROM routing_rules
WHERE task_type = $1
  AND is_active = TRUE
ORDER BY created_at DESC
LIMIT 1;

-- Routing event log — one row per routed request
CREATE TABLE routing_events (
  id               UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  task_type        TEXT NOT NULL,
  rule_id          UUID REFERENCES routing_rules(id),
  selected_tier    TEXT NOT NULL,
  trigger_reason   TEXT,          -- 'default' | 'accuracy_breach' | 'latency_breach'
  accuracy_at_route NUMERIC(4,3),
  latency_ms_at_route INTEGER,
  routed_at        TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
State Interaction Chart
flowchart TD A[Data Science Team] -->|Update threshold via API| B[Routing Config Service] B -->|Versioned write| C[(PostgreSQL: routing_rules)] B -->|Invalidate cache| D[Config Cache TTL=30s] D -->|Read on route| E[Model Router] E -->|Route decision + config_version_id| F[(PostgreSQL: routing_events)] F -->|Audit query| G[Governance Dashboard] E --> H{Apply Rule} H -->|Primary| I[Primary Model Tier] H -->|Fallback| J[Fallback Model Tier] I -->|Outcome metric| K[Metrics Aggregator] J -->|Outcome metric| K K -->|Rolling accuracy update| L[Metrics Store] L -->|Signal drift| A

5. Developer Experience Metrics as a Proxy for Routing Infrastructure Health

If your model routing layer isn't surfacing pipeline-level health signals to the teams who operate it — in the same way a platform team measures deployment frequency and rollback rates — you're governing a black box and calling it infrastructure.

  • Platform teams without metrics can't demonstrate improvement or diagnose regression — the same principle applies directly to routing infrastructure, where teams that don't track fallback activation rates, tier distribution, and accuracy drift can't tell if their thresholds are correctly calibrated.
  • Fallback activation rate is the routing equivalent of rollback frequency on a deployment platform — a rising rate signals model degradation or threshold miscalibration, and a flat rate near zero may mean your thresholds are set too loose to catch real drift.
  • EKS platform observability patterns — capturing every deployment, rollback, and incident as a structured event — translate cleanly to routing event logging, where every tier selection, fallback trigger, and escalation needs to be a queryable record, not just a log line.
TECHNICAL DEEP DIVE & CODE ARTIFACTS Expand [+]

The Amazon EKS developer experience article surfaces a finding that applies directly to routing infrastructure governance: nearly 54% of platform teams either aren't measuring their platforms at all or are doing it inconsistently. In a routing context, that failure mode looks like a team that deployed dynamic fallback logic but only checks whether the pipeline is returning responses — not whether the tier distribution has shifted, whether fallback activation is trending upward, or whether the fallback model itself is degrading. Those are distinct signals that require distinct instrumentation. Source: Measuring developer experience on an Amazon EKS developer platform — AWS (https://aws.amazon.com/blogs/containers/measuring-developer-experience-on-an-amazon-eks-developer-platform/)

AIThe connection between platform observability and agentic routing is more structural than it might appear. Both systems are intermediary layers — between the business logic above and the infrastructure below — and both share the same failure mode: invisible, gradual degradation that doesn't trigger an alert but slowly erodes output quality or developer throughput. The discipline of measuring platform health with structured metrics, tracked over time, with clear ownership, is exactly the discipline that model routing infrastructure needs to be governed well. The signal from Gemini 4 Carbon topping leaderboards in specialized domains also reinforces this: as frontier models proliferate across specialized capability domains, routing decisions will increasingly require domain-specific health metrics rather than a single capability score.

Reference Architecture
// TypeScript — routing health metrics aggregation for observability
interface RoutingHealthSnapshot {
  windowMinutes: number;
  taskType: string;
  totalRequests: number;
  tierDistribution: Record<string, number>;  // tier -> request count
  fallbackActivationRate: number;            // 0.0 - 1.0
  p95LatencyByTier: Record<string, number>;  // tier -> ms
  rollingAccuracyByTier: Record<string, number>; // tier -> 0.0-1.0
  snapshotAt: Date;
}

async function buildHealthSnapshot(
  taskType: string,
  windowMinutes: number,
  eventsRepo: RoutingEventsRepository
): Promise<RoutingHealthSnapshot> {
  const events = await eventsRepo.fetchWindow(taskType, windowMinutes);

  const tierCounts = events.reduce<Record<string, number>>((acc, e) => {
    acc[e.selectedTier] = (acc[e.selectedTier] ?? 0) + 1;
    return acc;
  }, {});

  const fallbackCount = events.filter(
    (e) => e.triggerReason !== 'default'
  ).length;

  return {
    windowMinutes,
    taskType,
    totalRequests: events.length,
    tierDistribution: tierCounts,
    fallbackActivationRate: events.length > 0 ? fallbackCount / events.length : 0,
    p95LatencyByTier: computeP95ByTier(events),
    rollingAccuracyByTier: computeAccuracyByTier(events),
    snapshotAt: new Date(),
  };
}

function computeP95ByTier(
  events: RoutingEvent[]
): Record<string, number> {
  const byTier = events.reduce<Record<string, number[]>>((acc, e) => {
    if (e.latencyMsAtRoute != null) {
      (acc[e.selectedTier] ??= []).push(e.latencyMsAtRoute);
    }
    return acc;
  }, {});
  return Object.fromEntries(
    Object.entries(byTier).map(([tier, latencies]) => [
      tier,
      latencies.sort((a, b) => a - b)[Math.floor(latencies.length * 0.95)] ?? 0,
    ])
  );
}
State Interaction Chart
flowchart TD A[Routing Events Stream] --> B[Metrics Aggregator] B --> C[Fallback Activation Rate] B --> D[Tier Distribution pct per task] B --> E[P95 Latency per Tier] B --> F[Rolling Accuracy per Tier] C --> G{Activation Rate Trending Up?} D --> H{Primary Tier Share Dropping?} E --> I{Latency SLO Breached?} F --> J{Accuracy Below Floor?} G -->|Yes| K[Alert: Threshold Recalibration Review] H -->|Yes| K I -->|Yes| L[Alert: Latency-Sensitive Tasks at Risk] J -->|Yes| M[Alert: Model Degradation - Escalate to DS Team] K --> N[Data Science Team Review] L --> N M --> N