AppGitHub
Context API

ctx.capabilities

ctx.capabilities exposes the final model capability flags resolved for the current turn.

Overview

ctx.capabilities contains the final capability flags for the model selected on the current turn.

These flags describe what the active model is able to do so strategies can adjust their behavior accordingly.

Shape

interface Capabilities {
  vision: boolean
  structuredOutput: boolean
  tools: boolean
}

Fields

The runtime currently exposes:

  • vision
  • structuredOutput
  • tools

Field Meanings

vision

Indicates whether the current model supports image understanding.

When vision is true, strategies may include image attachments in prompts and expect the model to process them.

structuredOutput

Indicates whether the model supports structured output constraints such as JSON schema enforcement.

When enabled, strategies may rely on structured response formats instead of prompt-based JSON instructions.

tools

Indicates whether the model supports tool/function calling.

This flag describes model capability only. It does not guarantee that tool execution is available in the main conversation flow.

Source of Truth

Capability values are resolved by the host from the selected model configuration.

Strategies should treat these flags as read-only indicators of the model’s available features.

Tool execution is not yet available in the main conversation flow.

Usage

Strategies may branch behavior based on the active model capabilities:

if (ctx.capabilities.vision) {
  // include image attachments
}

const supportsTools = ctx.capabilities.tools
// Capability flag only. Main conversation tool execution is not available in v0.1.

On this page