Skip to content

@camera.ui/sdk / plugin / AssistantModelSpec

Interface: AssistantModelSpec ​

Defined in: plugin/assistant-models.ts:19

One model a plugin offers to the assistant. The user picks it under Settings, Assistant like any other model; the host never sees a key or an endpoint of it.

Example ​

ts
const onDevice: AssistantModelSpec = {
  id: 'apple-on-device',
  name: 'Apple on-device',
  contextTokens: 8192,
  vision: true,
  toolCalling: true,
  structuredOutput: true,
  note: 'Runs on this Mac, nothing leaves the house.',
};

Properties ​

contextTokens ​

contextTokens: number

Defined in: plugin/assistant-models.ts:25

Hard context limit of the model in tokens. The host plans prompt, tools and history with it.


id ​

id: string

Defined in: plugin/assistant-models.ts:21

Model id, unique within the plugin and stable across restarts: the settings store it.


name ​

name: string

Defined in: plugin/assistant-models.ts:23

Name shown in the model list.


note? ​

optional note?: string

Defined in: plugin/assistant-models.ts:38

One line shown next to the model, for example where it runs or what it costs.


structuredOutput ​

structuredOutput: boolean

Defined in: plugin/assistant-models.ts:31

The model honors a JSON schema. Without it the host asks for free text and parses defensively.


toolCalling ​

toolCalling: boolean

Defined in: plugin/assistant-models.ts:29

The model calls tools. Without it the assistant answers from the conversation alone.


toolRouting? ​

optional toolRouting?: boolean

Defined in: plugin/assistant-models.ts:36

The host picks the tools for a question with a short call of its own and puts only those in front of the model. For a small model that calls the tools it sees but does not work through a catalog of fifty.


vision ​

vision: boolean

Defined in: plugin/assistant-models.ts:27

The model reads images. Without it the host sends text only.