Handoff modes
Control whether LLM execution happens locally, may fall back to the cloud, or is forced local by the user.
Handoff describes how a request is routed between local and cloud execution.
const session = await navigator.napcar.ai.requestSession({
task: "summarization",
handoff: "required",
localOnly: true,
});Modes
off— no local handoff; the website behaves normally.optional— prefer local when available, allow a cloud fallback only if the user/site policy permits it.required— local execution only. If local is unavailable, the request fails withlocal_required_but_unavailable. No cloud fallback.user-forced-local— the user configured this site to use local execution even where it would normally call a cloud provider.user-block-cloud— the user configured Napcar to block known cloud LLM endpoints; calls are blocked and a local substitution may be offered.
The last two are user policies configured in chrome://llm, not something a
site requests. Napcar-native APIs never fall back to the cloud by default.
Failure behavior
If local is unavailable and the mode is required or user-block-cloud, the
request fails closed. If the mode is optional, the original request proceeds
only when cloud fallback is allowed for that origin.