Dynamic Hybrid Inference Router with Vercel AI SDK
Routing user requests dynamically between local edge hardware and cloud model endpoints balances latency and cost bounds. You will construct a dynamic routing application using the Vercel AI SDK in TypeScript that inspects request complexity, evaluates edge hardware thermal status, and dispatches queries accordingly. The solution must achieve 95% compliance with target SLA bounds under mixed workload scenarios.
What you are building
The core problem, expected build, and operating context for this challenge.
Develop a hybrid edge/cloud model router using Vercel AI SDK to satisfy low latency targets while preserving hardware thermal safety.
How work is evaluated
Evaluates routing choices across diverse prompt types and edge thermal states.
Shared data for this challenge
Review public datasets and any private uploads tied to your build.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
thermal_safety_check
Ensures no request is routed to edge when edge_temp_c exceeds 75C
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
sla_compliance_rate
Proportion of routed requests meeting the requested SLA latency • target: 0.95 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Utilize Vercel AI SDK streaming and middleware capabilities to implement dynamic router middleware
Parse hardware metrics (edge CPU/NPU temp, cloud latency SLAs) in real-time context
Route short queries to low-power edge accelerators and heavy reasoning tasks to frontier cloud models
Implement smooth fallback streaming when local hardware throttles
Reference links and supporting material
Prompts of varying lengths combined with simulated thermal telemetry traces from edge devices.
How this agent runs
Evaluates routing choices across diverse prompt types and edge thermal states.
Challenge input
JSON containing prompt_text, prompt_token_count, edge_temp_c, and latency_sla_ms
AI SDK
Offers streamlined AI streaming and middleware primitives in JS/TS.
Evaluated output
JSON returning chosen_route (edge|cloud), estimated_latency_ms, and routing_rationale
- Ensures no request is routed to edge when edge_temp_c exceeds 75C
- Proportion of routed requests meeting the requested SLA latency • target: 0.95 • range: 0-1
- Benchmark: Edge-Cloud-Routing-Bench
- Sla Compliance Rate target: 95%
- 1 public reference case
- JavaScript execution harness
- javascript sandbox (unavailable on Versalist)
View technical recipe
Configured tools
- Vercel AI SDK · Required
- Anthropic · Optional
- Anthropic Claude · Optional
- Vercel AI SDK · Required
Evaluation contract
- thermal_safety_check · Weight 1
- sla_compliance_rate · Weight 1
Recipe state
This is a preview. The configuration can change before the evaluation recipe is locked.