Theia API Documentation v1.76.0
    Preparing search index...

    The shared half of a provider that discovers its language models: it asks the provider what it offers, registers the answer, unregisters what disappeared, and reports the state of all of that to the ModelDiscoveryStatusService so the provider's page can show it.

    A provider brings what only it can know: its id, its manager, the preferences it reads, how a discovered model becomes a model description, and the messages that name it. Everything a provider does beyond discovery (a custom endpoint, a proxy, its own retry settings) stays in the subclass, which hooks into initializeProvider and handlePreferenceChange.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    allowEnvironmentApiKeyPreference: "ai-features.google.allowEnvironmentApiKey" = ALLOW_ENV_API_KEY_PREF

    Preference holding the consent to use an API key found in the environment.

    discoveredModels: DiscoveredModel[]

    The models registered from the last discovery, as the provider reported them.

    discovering: Promise<void>
    envConsentPrompted: boolean

    Ensures the env-key consent prompt is shown at most once per session.

    messageService: MessageService
    modelOverridesPreference: "ai-features.google.modelOverrides" = MODEL_OVERRIDES_PREF

    Preference holding an explicit model list that replaces discovery.

    preferenceService: PreferenceService
    providerId: "google" = GOOGLE_PROVIDER_ID

    Provider node id, e.g. anthropic. Matches the provider's node in the Models category.

    providerLabel: "Google Gemini" = 'Google Gemini'

    Human-readable provider name, e.g. Anthropic.

    Accessors

    • get modelIdPrefix(): string

      Prefix of this provider's registered model ids. Defaults to providerId.

      Returns string

    Methods

    • Fetches what the provider offers and registers it, removing whatever disappeared.

      Returns Promise<void>

    • Called when the application is started. The application shell is not attached yet when this method runs. Should return a promise if it runs asynchronously.

      Returns void

    • Re-applies the descriptions of the already-discovered models, after a preference that feeds them changed.

      Returns void