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

    Implements the Gemini language model integration for Theia. Reasoning-level translation lives in googleReasoningFor.

    Implements

    Index

    Constructors

    Properties

    apiKey: () => undefined | string
    enableStreaming: boolean
    id: string
    maxInputTokens?: number
    model: string
    reasoningApi?: ReasoningApi
    reasoningSupport?: ReasoningSupport
    serverTools?: ServerToolDescriptor[]

    Server tools this model offers, declared code-level by the provider package. Note: If you provide these, you must also provide vendor because server tools are vendor-specific.

    vendor: "google" = 'google'

    Provider identifier, used to key per-provider settings (e.g. server tool selections) and the capabilities UI.

    Methods

    • Summarizes the provider-executed server tools (url_context / google_search) into finished ServerToolCalls for display. Gemini does not provide tool ids, so a fresh id is generated; these calls are informational and are not replayed into the conversation history.

      Parameters

      • OptionalurlContextMetadata: UrlContextMetadata
      • OptionalgroundingMetadata: GroundingMetadata

      Returns ServerToolCall[]

    • Builds the Gemini tools array, combining client function declarations with the enabled native server tools.

      Note: combining native tools (googleSearch / urlContext) with functionDeclarations in a single request requires a Gemini 2.0+ model. Older models (e.g. Gemini 1.5) reject the combination with a 400 error. Since adopters configure both the model and which server tools to offer, this is left to the provider rather than silently dropping either set of tools.

      Parameters

      Returns Tool[]