Interface LanguageModelAliasRegistry

Registry for managing language model aliases.

interface LanguageModelAliasRegistry {
    onDidChange: Event<void>;
    ready: Promise<void>;
    addAlias(alias): void;
    getAliases(): LanguageModelAlias[];
    removeAlias(id): void;
    resolveAlias(id): undefined | string[];
}

Implemented by

Properties

onDidChange: Event<void>

Event that is fired when the alias list changes.

ready: Promise<void>

Promise that resolves when the registry is ready for use (preferences loaded).

Methods

  • Resolve an alias or model id to a prioritized list of model ids. If the id is not an alias, returns [id]. If the alias exists and has a selectedModelId, returns [selectedModelId]. If the alias exists and has no selectedModelId, returns defaultModelIds. If the alias does not exist, returns undefined.

    Parameters

    • id: string

    Returns undefined | string[]