Technology Deep Dive — Section 10 of 20

Intelligent Model Routing

The right model capability for each job: reasoning, code, vision, voice, embeddings, or managed model deployment. Keith can guide the choice, while the router keeps providers healthy.

Model capability routingProvider health monitoredFallback paths

The Problem With Hardcoded Models

Outages bring you down

If your single provider has an outage, your whole product stops. No fallback, no warning, no recovery. Just downtime.

Price hikes are mandatory

Provider raises prices? You pay it. No alternatives, no negotiation. Your cost structure is outside your control.

Better models require rewrites

A better model launches from a competitor. Your hardcoded provider means months of migration work to adopt it.

Kaidera abstracts providers behind a single routing layer. Swap, fallback, and route without rebuilding the worker.

Keith Recommends The Model Path

Users should not need to memorise model names. Keith can ask what outcome matters, classify the work, and suggest the right capability path. The underlying list is dynamic: admins enable providers and models, and Kaidera routes within that live catalogue.

Reasoning and strategy

Architecture choices, product trade-offs, risk analysis, and work that needs deeper judgement.

Code and build work

Implementation, refactoring, code review, tests, and engineering tasks where coding performance matters.

Vision and documents

Screenshots, diagrams, invoices, forms, design review, and visual product feedback.

Voice and realtime

Calls, dictated requests, audio review, transcription, and conversational workflows.

Embeddings and search

Memory recall, document matching, knowledge retrieval, and similarity search.

Managed and fine-tuned

Dedicated, geographically controlled, fine-tuned, or self-hosted model programs for unique use cases.

Route a Request

Waiting for request...
1
Health Check
2
Rate Limit
3
Strategy (Priority)
4
Access Gate

Routing Strategies

Choose how work is distributed across model sources. Change strategy per worker, per task type, or globally.

Priority

Routes to the highest-priority model source in your list. Predictable and consistent — always your first choice unless it fails.

Best for

Regulated environments, model source lock-in preferences, audit trails requiring consistent model use.

Price

Routes to the cheapest model source that meets the task's quality requirements. Cost savings without sacrificing output quality.

Best for

High-volume workloads, documentation generation, bulk processing, cost-sensitive environments.

Quality

Routes to the model source with the highest model fit score for this specific task type. Model fit scores updated from real usage data.

Best for

Architecture decisions, complex reasoning, code review, security analysis, critical business logic.

Latency

Routes to the model source with the lowest current response time. Continuously tracked. Adapts as model source performance changes.

Best for

Real-time interactions, streaming responses, time-sensitive tasks, user-facing completions.

Custom

Define your own routing logic with weighted combinations. Example: 60% priority, 30% price, 10% latency. Route specific task types to specific model sources. Override routing for individual workers.

priority_weight: 0.6price_weight: 0.3latency_weight: 0.1

Provider Health Monitoring

Watch it live. Simulate a model source failure and see traffic shift automatically. Real-time latency, uptime, and circuit breaker state for every connected source.

OpenAI

GPT-5.2

ACTIVE ROUTE
healthy

Latency: 3.2s

Uptime: 99.8%

Anthropic

Claude Opus 4.1

healthy

Latency: 2.4s

Uptime: 99.6%

Google

Gemini 2.5 Pro

degraded

Latency: 6.8s

Uptime: 97.2%

Fireworks

DeepSeek V3.1

healthy

Latency: 1.8s

Uptime: 99.1%

Self-hosted

Qwen3 Coder

down

Latency: N/A

Last seen: 4m ago

Active Route:OpenAI — GPT-5.2

Fallback Chains

Every request has a fallback chain. Primary → Secondary → Tertiary. If all fail, the circuit breaker opens and the user gets a clean error — not a silent stall.

INCOMING REQUEST

AI worker task requires a model response

PRIMARYGPT-5.2 reasoning
healthy
p50: 3.5suptime: 99.8%cb: CLOSED
if unhealthy / rate-limited
SECONDARYClaude Opus 4.1 reasoning
healthy
p50: 2.1suptime: 99.7%cb: CLOSED
if unhealthy / rate-limited
TERTIARYDeepSeek V3.1 coding
healthy
p50: 2.8suptime: 99.6%cb: CLOSED
if all sources fail

ERROR: No model sources available

Clean error returned to user. No silent hang. Circuit breakers remain OPEN until recovery.

CLOSED

Normal operation. Requests flow through. Failures counted but not yet triggering.

OPEN

Source taken offline after N consecutive failures. Cooldown period begins (60s default).

HALF-OPEN

Single test request allowed. Success = CLOSED again. Failure = OPEN again.

Performance Comparison

Not all model sources respond at the same speed. With latency-based routing, Kaidera can select the fastest healthy source for the task.

p50 latency in seconds — illustrative benchmark

Efficient model source
0.9s
Realtime voice source
1.1s
Coding model source
1.8s
Vision model source
2.4s
Frontier reasoning source
3.4s
Private dedicated source
4.0s

Kaidera routes to the fastest healthy source when speed matters.For higher-judgement tasks, it can prefer quality or a private deployment instead. The strategy is chosen by task need, not by a static website list.

Circuit Breaker Pattern

Prevents cascade failures. When a model source fails repeatedly, the circuit opens automatically. No thundering herd. No resource exhaustion. Clean recovery.

C

CLOSED

Normal operation

Requests flow through normally. Failures are counted but don't yet block the provider. Default state after recovery.

O

OPEN

Source halted

After repeated failures, the circuit opens. Requests skip this source immediately while cooldown begins.

H-O

HALF-OPEN

Testing recovery

After cooldown, a single test request is allowed through. Success: CLOSED. Failure: OPEN with extended cooldown.

Circuit breakers operate per model source and tenant. One customer's provider issue does not affect other tenants. State transitions are logged and visible in the observability dashboard.

Rate Limiting

Every provider enforces rate limits. Kaidera tracks them proactively with sliding-window counters — requests per minute (RPM) and tokens per minute (TPM) — so your workers never hit a 429 error.

RPM Window
60s

Sliding window tracks requests per minute per source. When usage gets high, the router shifts new requests to an alternate source before hitting the limit.

TPM Window
60s

Token throughput tracked separately. Large prompts can consume the token budget even when request count is low. Both counters must be green to route.

!
Capacity-Aware Penalty

When a source exceeds 90% of its rate limit window, it receives a routing penalty — effectively deprioritised until capacity frees up. This prevents clustering requests on a nearly-full source.

Model Capability Catalogue

The model list changes as providers release new capabilities. Kaidera should read from the admin catalogue, then explain choices by capability instead of asking business users to remember model IDs.

Efficient

Fast models for routine summaries, extraction, classification, and low-risk support work.

Specialist

Reasoning, coding, vision, voice, embeddings, and document models for specific work types.

Managed

Fine-tuned, dedicated, geographically controlled, or self-hosted model programs for specialised use cases.

Access and recommendations are enforced at the routing decision point. If a worker asks for a capability that is not enabled, the router substitutes the best approved option and records the decision for review.

<100ms

failover time

From failure detection to traffic shift

5

capability groups

Reasoning, code, vision, voice, embeddings

4

routing strategies

Priority, Price, Quality, Latency + Custom

Next: Managed Model Programs

Routing picks the right capability. Managed model programs explain what happens when a business needs dedicated, fine-tuned, geographically controlled, or reserved-capacity models.