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

    Implements

    Index

    Constructors

    Properties

    _allowEnvironmentApiKey: boolean = false

    Whether a key found in the environment may be used. Withheld until the user confirms it, so the gate sits on the key itself: every path that reaches for one — discovery, a custom endpoint, a manually configured model — is covered, and revoking the consent takes effect at once.

    _apiKey: undefined | string
    discoveryFetcher: ModelDiscoveryFetcher
    languageModelRegistry: LanguageModelRegistry
    logger: ILogger
    modelInfoCache: Map<string, Promise<Model>> = ...

    Cached /v1beta/models lookups keyed by model id. Successful lookups are kept for the process lifetime; failed lookups are evicted so the next call retries.

    Accessors

    Methods

    • Heuristic for the Gemini chat models among the entries that are left once toDiscoveredModels has dropped what cannot generate content at all. Two things remain to be excluded, and both report generateContent like a chat model: a model that generates something other than text (an image, speech), and one that answers through an agentic API of its own (deep research, computer use, robotics). Everything outside the gemini-* family goes too — Gemma, LearnLM — since being able to generate content does not make a model one of the models this provider is about. Anything this misses can be configured as a custom endpoint.

      The Live API models need no term of their own: they report bidiGenerateContent, so the capability check has already left them out.

      Without a release date to go by, the ranking that decides which models the chat input offers falls back to the numbers in the id, and those only mean a version within this family: a parameter count (gemma-3-27b-it) or an experiment date would otherwise read as the newest model there is.

      Parameters

      • id: string

      Returns boolean