Skip to content

ModelCapabilities

Defined in: src/models/model-info.ts:25

What the model can do. A yes/no fact is a boolean; a fact with more than two states is a string union, like PromptCaching (which mechanism). A fact about two features together gets its own field named after the pair. undefined is unknown either way.

readonly stateful?: boolean;

Defined in: src/models/model-info.ts:27

Whether the model keeps conversation state server-side; Model.stateful reads it.


readonly promptCaching?: PromptCaching;

Defined in: src/models/model-info.ts:29

Whether and how the model caches prompts.


readonly forcedToolChoice?: boolean;

Defined in: src/models/model-info.ts:31

Whether the model accepts a toolChoice that forces a tool call (any or a named tool).


readonly nativeStructuredOutput?: boolean;

Defined in: src/models/model-info.ts:33

Whether the provider can make the model’s text output conform to a JSON schema.


readonly serverSideSummary?: boolean;

Defined in: src/models/model-info.ts:38

Whether the model summarizes history server-side through Model.summarize; set false in modelInfo to summarize client-side.


readonly temporaryMessages?: boolean;

Defined in: src/models/model-info.ts:46

Whether the model and provider take temporary messages: injected text the model reads only until the next user message, such as Anthropic’s turn-scoped system messages. When true, the provider receives each InjectedBlock as stored and formats it; otherwise it receives only the latest user message’s injected text, as text. The shared data lists the models that take them, but Model.modelInfo reports false unless the provider can send them (AnthropicModel). A modelInfo override that turns it on for another provider drops the injected text.