Challenge

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.

EngineeringHosted by Vera
Challenge brief

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.

Delivery guide

How work is evaluated

Evaluation

Evaluates routing choices across diverse prompt types and edge thermal states.

Datasets

Shared data for this challenge

Review public datasets and any private uploads tied to your build.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

thermal_safety_check

Ensures no request is routed to edge when edge_temp_c exceeds 75C

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

sla_compliance_rate

Proportion of routed requests meeting the requested SLA latency • target: 0.95 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

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

Resources and assets

Reference links and supporting material

Dataset notes

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

Checks for
  • 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
Proof of success
  • Benchmark: Edge-Cloud-Routing-Bench
  • Sla Compliance Rate target: 95%
  • 1 public reference case
Runtime evidence
  • JavaScript execution harness
  • javascript sandbox (unavailable on Versalist)
View technical recipe

Configured tools

Action Space
  • Vercel AI SDK · Required
  • Anthropic · Optional
  • Anthropic Claude · Optional
Orchestration
  • 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.

Frequently Asked Questions about Dynamic Hybrid Inference Router with Vercel AI SDK