Theia API Documentation v1.76.0
    Preparing search index...
    interface AnthropicLanguageModelsManager {
        apiKey: undefined | string;
        createOrUpdateLanguageModels(
            ...models: AnthropicModelDescription[],
        ): Promise<void>;
        fetchAvailableModels(): Promise<ModelDiscoveryResult>;
        getApiKeySource(): Promise<ApiKeySource>;
        removeLanguageModels(...modelIds: string[]): void;
        setAllowEnvironmentApiKey(allowed: boolean): void;
        setApiKey(key: undefined | string): void;
        setProxyUrl(proxyUrl: undefined | string): void;
    }

    Implemented by

    Index

    Properties

    apiKey: undefined | string

    Methods

    • Fetches the models Anthropic currently offers from its /v1/models endpoint, retrying transient connection failures and persisting a snapshot for offline use.

      Requires an API key. Returns an empty result when no key is configured. On a live-fetch failure it falls back to the cached snapshot (fromCache: true) when one exists, and only throws when there is no cache to fall back to.

      Returns Promise<ModelDiscoveryResult>

    • Allows or refuses the use of an API key found in the environment. Refused by default: an environment key is only used once the user has confirmed it, and setting this back to false stops it being used immediately, wherever it would have been used.

      Parameters

      • allowed: boolean

      Returns void