RORK LABJP
BUILD — Rork Max runs real Macs in the cloud loaded with Xcode and the iOS SDK, writing SwiftUI, compiling, reading the errors and building again. That loop, not the code generation, is what lifts the outputNATIVE — What comes out is pure Swift and SwiftUI, not React Native. Reaching AR, Metal graphics and widgets that React Native cannot touch is the real gap between this and other buildersPLATFORMS — Coverage spans iPhone, iPad, Apple Watch, Apple TV and Vision Pro, plus iMessage. Worth a look if you want to start from a watch app or an extension rather than a phone screenCOMPANION — The Rork Companion app lets you check a generated build on a real iPhone without a paid Apple Developer account, lowering the bar for trying a first project end to endPRICING — Free to start, paid plans from $25 a month, and Rork Max on the $200 Max plan. Worth working out up front how many projects it takes to earn that backDEADLINE — From August 31, 2026, Google Play requires target API level 36 or higher for new apps and updates alike. Ten days out, and the targetSdkVersion of what you generate is yours to verifyBUILD — Rork Max runs real Macs in the cloud loaded with Xcode and the iOS SDK, writing SwiftUI, compiling, reading the errors and building again. That loop, not the code generation, is what lifts the outputNATIVE — What comes out is pure Swift and SwiftUI, not React Native. Reaching AR, Metal graphics and widgets that React Native cannot touch is the real gap between this and other buildersPLATFORMS — Coverage spans iPhone, iPad, Apple Watch, Apple TV and Vision Pro, plus iMessage. Worth a look if you want to start from a watch app or an extension rather than a phone screenCOMPANION — The Rork Companion app lets you check a generated build on a real iPhone without a paid Apple Developer account, lowering the bar for trying a first project end to endPRICING — Free to start, paid plans from $25 a month, and Rork Max on the $200 Max plan. Worth working out up front how many projects it takes to earn that backDEADLINE — From August 31, 2026, Google Play requires target API level 36 or higher for new apps and updates alike. Ten days out, and the targetSdkVersion of what you generate is yours to verify
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 Max233hybrid AIon-device AI5edge AI2cost 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-07-15
On-Device Image Classification: TFLite on React Native or Core ML on Rork Max — How I Chose After Building Both
Adding on-device image classification means choosing between TFLite on React Native and Core ML on Rork Max. I built the same feature both ways, measured the end-to-end breakdown, and worked out what the decision actually hinges on.
AI Models2026-05-24
One Month with Rork Max AI Cloud: Latency, Cost, and the Hybrid Setup I Settled On
A month of running Rork Max AI Cloud beside local M-series execution: p50/p95 latency distributions, real monthly cost, the benchmark script I used, and a budget ledger that actually stops spending.
App Dev2026-06-28
Design On-Device Core ML So Cold Start and Heat Don't Break It
Put on-device Core ML in the native Swift that Rork Max generates and you hit two walls before accuracy: the first inference is slow, and the device heats up and slows down. Here is a design built around cold start and a thermal budget, with working Swift.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →