◉RORK LABJP
●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…
Articles/AI Models
◉ AI Models/2026-06-30Advanced

When Your Rork Hybrid AI Quietly Drifts to the Cloud and the Bill Creeps Up — Field Notes on Instrumenting Routing Decisions

A router that splits work across on-device, edge, and cloud layers will quietly drift toward the cloud when no one logs its decisions — flat traffic, rising bill. These are field notes on instrumenting routing to isolate the cause.

Rork Max236hybrid AIon-device AI5edge AIcost optimization3observability4Core ML6Cloudflare Workers AI

✦ Premium Article

I Only Noticed It on the Invoice

An app with a hybrid AI stack came in at 1.7x the previous month's API bill. The frustrating part: active users and total request count were essentially flat. Traffic wasn't up, but cost was. My first guess was a price change on the model side. The per-token price hadn't moved.

It took a while to find the cause because nothing recorded where the router actually sent each request. The design split work cleanly across three layers — on-device, edge, cloud — but nobody was watching how it split in practice. We had a blueprint and no flight log.

These notes are the record of bolting on that flight log after the fact and isolating why the bill grew. The code is written to drop into an app generated by Rork Max (a React Native + Expo project) without a rewrite.

After years of running apps as an indie developer, I keep meeting this class of bug — nothing is broken, yet the cost just climbs. In my own work the quiet degradations that no one complains about have always been harder to catch than loud crashes, and how fast I can respond comes down to whether I instrumented the thing beforehand. This was one more case of exactly that.

Why It Drifts "Quietly"

Hybrid routing usually starts as a small heuristic. Personal data goes on-device, anything needing fresh information or complex reasoning goes to the cloud, everything else goes to the edge.

// src/ai/AIRouter.ts — a common first version that records nothing
export type AILayer = 'on-device' | 'edge' | 'cloud';
 
export function determineAILayer(req: AIRequest): AILayer {
  const c = req.context ?? {};
  if (c.offlineMode || c.containsPersonalInfo) return 'on-device';
  if (c.requiresLatestInfo || c.complexReasoning) return 'cloud';
  if (req.message.length <= 50) return 'on-device';
  return 'edge';
}

The real question is who sets requiresLatestInfo or complexReasoning. In most apps a lightweight upstream classifier or some keyword check in the prompt layer sets them, loosely. Loosen that judgment by a hair and the share routed to the cloud quietly grows. Total traffic is unchanged, so none of the dashboards flag anything. The only place it shows up is the invoice.

In my experience, silent cloud drift came down to one of three causes.

CauseWhat happensWhy it hides
Over-eager flagsUpstream classifier sets complexReasoning too often, sending more to cloudEvery request still answers fine, so error rates stay clean
Implicit fallbackOn-device model fails to init and silently routes to cloudUser experience holds, so no one complains
Growing historyLong conversation history exceeds the edge limit and escalates to cloudOnly happens late in a session, hard to reproduce

What the three share is that nothing looks broken from the user's side. That's exactly why they stay invisible without measurement.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Instrumentation code that records every routing decision and aggregates cost and latency by layer and by reason
✦Three typical causes of silent cloud drift when traffic is flat but the bill rises, each with a concrete isolation step
✦A budget guard that watches cloud share and fallback rate so the drift surfaces weeks before the invoice does
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

◉ AI Models2026-09-12
Ask Rork for an iOS 27 feature and you may get last year's code back, with no error at all
iOS 27 ships on September 14. When a model is asked for an API it has never seen, there are two kinds of failure: the kind that stops your build, and the kind that does not. Here is why standard Rork and Rork Max differ, and the order I check generated code in.
◉ AI Models2026-06-24
Pushing Rork Max's AI Beyond Vibe Coding — Patterns That Actually Improve Implementation Quality
A deep-dive on using Rork Max as an implementation partner: prompt patterns, context management, choosing between plain Rork and Rork Max, building without burning credits, and verifying AI-written native code before App Store submission — drawn from solo indie experience.
◉ AI Models2026-05-05
Build an AI Interview Coach App with Rork Max: Voice Recording, Claude Evaluation & Progress Tracking
How I built a production-ready AI interview coach app with Rork Max — expo-audio recording, Whisper transcription, Claude evaluation, a JSON extractor measured against six response shapes, and a free tier that is counted on the server.