Intelligence · interface

LocalProviderConfig

A provider running on this device, accepted by running it.

Explained in Agents and behaviour.

interface LocalProviderConfig
import type { LocalProviderConfig } from '@driftengine/ai';

In depth

The engine's 2.7.0 rule for devices: probeDevice compiles what it is given and reads back a known pixel, because a device that reports support and then draws nothing is a device that lied. A local model is the same shape of question — whether it works here is a property of this machine, not of the configuration — so it is asked by doing rather than by reading a capability flag.

A failed probe never falls back to a remote provider. That would move where a user's data goes, quietly, and make every privacy notice written against this wrong. The result carries no provider and a sentence saying why; choosing a second option is the caller's, having read the first refusal.

Properties

NameTypeDescription
idreadonlystring
modelreadonlystring
capabilitiesreadonlyOmit<AiProviderCapabilities, 'local'>

Methods

probe

probe(): Promise<boolean>

Run the model once and report whether it worked.

More

Resolving false, or throwing, are the same answer with different words. Both refuse; neither substitutes anything.

createSession

createSession(options: AiSessionOptions): AiSession
ParameterTypeDescription
optionsAiSessionOptions