A hybrid edge-cloud AI architecture keeps selected tasks on the endpoint and routes other tasks to remote infrastructure. The hard part is not supporting two model paths. It is writing an explicit rule for which path handles each task, what data crosses the boundary, what consent applies, and what the product does when the remote path fails.
Decompose the feature into tasks
Do not route an entire product under one label. Break the feature into operations:
- capture and preprocessing;
- transcription or OCR;
- classification or intent selection;
- retrieval;
- generation;
- function proposal;
- action execution;
- sync and collaboration.
Each operation can have a different privacy sensitivity, latency target, resource need, and offline requirement. A voice-note product might record and transcribe locally, enhance a note locally, and use a remote service only when the user explicitly requests team collaboration. A document assistant might retrieve locally but offer an optional remote reasoning path for a selected excerpt.
Write the routing table before writing router code
On-device inference executes on the user’s endpoint; cloud inference sends input to remote infrastructure. A hybrid system combines those boundaries. Make the combination visible in a routing table.
| Task | Default route | Remote trigger | Data transmitted | Offline behavior | Consent |
|---|---|---|---|---|---|
| Example: intent classification | Local | None | None | Works | Covered by feature action |
| Example: optional deep analysis | Local first | User selects remote analysis | Selected content only | Local result remains available | Explicit before transfer |
| Example: collaboration sync | Remote | User enables workspace | Saved artifact | Local editing remains available | Account and workspace consent |
Replace examples with the product’s real tasks. The table should be reviewed by engineering, product, and privacy owners. If a route cannot state what data it transmits, it is not ready to ship.
Use measurable escalation rules
Avoid asking a language model whether a request is “too hard” and then allowing it to upload content. Escalation should be application policy based on observable conditions, such as:
- the user explicitly requested the remote mode;
- the local runtime could not initialize;
- a required capability is not present in the local path;
- the request exceeds a declared local limit;
- a validator rejected the local output and policy allows a remote retry.
The trigger must not silently expand transmitted data. If only a selected passage is necessary, do not send the full document. If remote processing is optional, local failure should not become hidden consent.
Design the privacy boundary per route
Local inference removes the need to send user content to a remote inference server, but it does not prove the application makes no other network requests. Hybrid architecture makes this distinction even more important because some tasks intentionally cross the boundary.
For every remote route, document:
- destination and service owner;
- exact fields transmitted;
- whether original content or derived content is sent;
- retention and logging controls where applicable;
- account or regional requirements;
- cancellation behavior;
- what remains on the device afterward.
Cove’s public boundary separates user-content processing from model download, purchase verification, optional newsletter signup, and optional anonymous crash reporting. A hybrid feature would need an additional disclosure for the remote inference route rather than hiding it inside those operational calls.
Keep one product contract across both paths
Google’s Gemma run guide documents LiteRT-LM as an on-device path for Android and iOS. A hybrid product can place such a local runtime behind the same application contract used by a remote path, while keeping routing and disclosure outside the model.
Local and remote outputs may differ in format, tone, or supported fields. Normalize them behind an application-owned contract. The UI should not parse vendor-specific response text.
sealed interface AnalysisResult {
data class Completed(
val content: String,
val route: Route,
val evidence: List<EvidenceRef>
) : AnalysisResult
data class NeedsConsent(val disclosure: Disclosure) : AnalysisResult
data class Unavailable(val reason: UnavailableReason) : AnalysisResult
}
Including the route in the result supports transparent UI and diagnostics. It also prevents analytics from combining local and remote outcomes as if they were the same experiment.
Failure states are part of routing
Design these cases before release:
- local model not downloaded;
- local model fails to load;
- local output fails validation;
- network unavailable;
- remote timeout;
- remote service rejects the request;
- user denies transfer;
- cancellation occurs after transfer begins;
- app restarts with work in progress.
Do not replace a local failure with a remote request unless policy and consent permit it. Do not present a partial remote response as though the full task completed. A useful failure message states which route failed and what the user can do next.
Evaluate routes separately and together
Create one acceptance suite and execute it through each route that claims to support the task. Record route identity, model artifact or remote model identifier, input policy, output validation, and failure.
Then test the router itself:
- route selected under every trigger;
- no remote transfer before required consent;
- minimum data sent;
- offline path remains available;
- cancellation stops downstream work;
- retry does not duplicate external action;
- diagnostics identify the selected route without logging content.
A strong local result and a strong cloud result do not guarantee a safe hybrid product. The router is a third system with its own failures.
Observability without collecting user content
Track route, operation, outcome category, elapsed phase, artifact or service revision, fallback, and cancellation. Avoid raw prompts, audio, images, documents, and generated content in default telemetry.
Use local debugging exports when detailed investigation is necessary. Let the user review and send the diagnostic artifact explicitly. Redaction should happen before the share boundary.
Rollout strategy
Begin with a static routing table and few routes. Feature flags can change availability, but they should not change the privacy meaning of an existing action without a visible product update.
Roll out route changes separately from model changes when possible. If both change together, a quality or reliability regression becomes harder to attribute. Preserve the previous route configuration for rollback.
Release checklist
- Decompose the feature into operations.
- Assign a default route to each operation.
- Define measurable escalation triggers.
- Document exact transmitted data.
- Require explicit consent where policy demands it.
- Normalize local and remote outputs behind one contract.
- Include route identity in results and diagnostics.
- Test local, remote, and router behavior separately.
- Keep offline behavior useful and honest.
- Avoid user content in default observability.
- Preserve rollback for route changes.
Read on-device AI vs cloud AI for the base comparison, local AI privacy is not automatic for the audit boundary, and on-device RAG for a pipeline-level example.
Last reviewed: 2026-09-16.