Skip to content

ProviderDescriptor

ProviderDescriptor = object

A provider’s static capability declaration: identity, placement, transport, supported interaction modes and tasks, cancellation guarantee, resource limits and privacy posture. It does not change while the provider is registered. The route planner, checkCapabilities() and execution provenance all read this one shape.

[property: string]: unknown

cancel: CancelSemantics

Cancellation guarantee: ‘hard’ stops processing including remote work, ‘soft’ stops reading locally while remote work may continue, ‘none’ means cancellation is unsupported. Independently of this value, the engine delivers no event after a cancel.


id: string

Unique identifier of the provider instance (a target), e.g. ‘apple_foundation_models’ or ‘openai_compatible_cloud:gpt-5-mini’. Model profiles list targets by this id.


optional limits?: ProviderLimits

Optional input and output resource limits.


optional model?: string

The model this provider instance is bound to, when it can name one. Cloud providers report the model id they send; platform-managed models report an opaque platform alias rather than a guessed weight name. Absent means the provider cannot name its model.


optional privacy?: ProviderDescriptorPrivacy

Data-egress posture, used to enforce local and cloud routing rules. Absent means a local or edge provider is treated as keeping data on the device and a cloud provider as sending it off.


optional streamingStyle?: StreamingStyle

How a streaming provider delivers incremental output: individual tokens, larger chunks, or whole snapshots. Absent for providers that do not stream.


supports: ProviderSupports

Interaction modes and features the provider statically declares.


optional taskCapabilities?: ProviderTaskCapability[]

What the provider can do for each task: accepted inputs, interaction modes, output deliveries and formats, cancellation, locales and privacy. When present it is authoritative for routing and must list every task the provider serves. When absent (a legacy descriptor), routing infers exactly one entry — ‘text_to_text’ with text input, inline output, run/stream from supports and cancel from cancel — if tasks contains ‘text_to_text’, and nothing for any other task: a legacy descriptor is never treated as capable of a non-text task.


tasks: string[]

Task kinds the provider supports, e.g. ‘text_to_text’. When taskCapabilities is present it must describe the same kinds and is what routing reads; without it, routing infers capabilities for ‘text_to_text’ alone (see taskCapabilities).


transport: ProviderTransport

How the engine reaches the provider: in-process runtime, operating-system service, buffered HTTP, server-sent events, or a realtime connection.


type: ProviderType

Execution placement: ‘local’ (on the device), ‘edge’, or ‘cloud’.