Interface ModelTargetInfo

Information about the target AI model that affects prompt construction. This guides template selection, token limits, and capability-specific formatting. ModelTargetInfo

interface ModelTargetInfo {
    modelId: string;
    providerId: string;
    maxContextTokens: number;
    optimalContextTokens?: number;
    capabilities: string[];
    promptFormatType: string;
    toolSupport: {
        supported: boolean;
        format: string;
        maxToolsPerCall?: number;
    };
    visionSupport?: {
        supported: boolean;
        maxImages?: number;
        supportedFormats?: string[];
        maxImageResolution?: string;
    };
    audioSupport?: {
        supported: boolean;
        requiresTranscription?: boolean;
    };
    optimizationHints?: {
        preferredSystemPromptLength?: number;
        optimalHistoryMessages?: number;
        tokenBudgetingStrategy?: "aggressive_truncate" | "summarize_old" | "balanced";
    };
}

Properties

modelId: string

Unique identifier of the target model (e.g., "gpt-4o", "ollama/llama3").

providerId: string

Identifier of the provider hosting the model (e.g., "openai", "ollama").

maxContextTokens: number

Maximum context length in tokens supported by the model.

optimalContextTokens?: number

Optional: Optimal context length for best performance/cost-efficiency, if different from max. Prompts might be targeted to this length.

capabilities: string[]

A list of functional capabilities of the model (e.g., 'tool_use', 'vision_input', 'json_mode').

promptFormatType: string

The type of prompt format the model expects. 'openai_chat': Standard OpenAI chat completion format (array of messages). 'anthropic_messages': Anthropic Messages API format (messages array + optional system prompt). 'generic_completion': A single string prompt for older completion-style models. 'custom': A custom format handled by a specific template.

toolSupport: {
    supported: boolean;
    format: string;
    maxToolsPerCall?: number;
}

Configuration for tool/function calling support.

Type declaration

  • supported: boolean
  • format: string

    Format expected by the model for tool definitions and calls.

  • Optional maxToolsPerCall?: number

    Maximum number of tools that can be defined or called in a single interaction.

visionSupport?: {
    supported: boolean;
    maxImages?: number;
    supportedFormats?: string[];
    maxImageResolution?: string;
}

Vision input support configuration.

Type declaration

  • supported: boolean
  • Optional maxImages?: number
  • Optional supportedFormats?: string[]
  • Optional maxImageResolution?: string
audioSupport?: {
    supported: boolean;
    requiresTranscription?: boolean;
}

Audio input support configuration (more likely for pre-processing than direct model input).

Type declaration

  • supported: boolean
  • Optional requiresTranscription?: boolean
optimizationHints?: {
    preferredSystemPromptLength?: number;
    optimalHistoryMessages?: number;
    tokenBudgetingStrategy?: "aggressive_truncate" | "summarize_old" | "balanced";
}

Model-specific hints for optimizing prompt construction or token budgeting.

Type declaration

  • Optional preferredSystemPromptLength?: number
  • Optional optimalHistoryMessages?: number
  • Optional tokenBudgetingStrategy?: "aggressive_truncate" | "summarize_old" | "balanced"