Interface CompletionResolution

A hop that is ready to serve: its provider is initialised and its window is known.

interface CompletionResolution {
    providerId: string;
    modelId: string;
    hop: number;
    maxContextTokens: number;
    capabilities: string[];
    toolFormat: "openai_functions" | "anthropic_tools" | "google_function_calling";
    providerManager: AIModelProviderManager;
    healthId?: string;
    optionOverrides: Partial<ModelCompletionOptions>;
    chain: readonly CompletionHop[];
}

Properties

providerId: string
modelId: string
hop: number
maxContextTokens: number
capabilities: string[]
toolFormat: "openai_functions" | "anthropic_tools" | "google_function_calling"

Same strings as ModelTargetInfo.toolSupport.format.

providerManager: AIModelProviderManager
healthId?: string

The id the hop's health is recorded under: for the first hop on a key or base URL of the route's own that differs from the provider's, the provider id with a digest of them (see providerHealthKey). Absent means the provider id.

optionOverrides: Partial<ModelCompletionOptions>

Per-hop effort, cache and output budget from fallbackHopOverrides; merged over the caller's options.

chain: readonly CompletionHop[]

The hop list fixed by the route's first resolve(); later calls walk it.