Member Junction
    Preparing search index...

    Function ParseVertexAICredentials

    • Reads a Vertex AI key. A Google Cloud API key (apiKey) takes no other credential beside it; with no project it names no location either (Google's global route), and with one the location defaults to us-central1 (the regional route). Otherwise a serviceAccountJson string is merged in (its fields win, except the top-level project and location); project_id wins over project; the location defaults to us-central1. The Gemini Live fields (liveHost, liveApiVersion) are checked and normalized; blank ones, and a blank apiKey, are dropped.

      Parameters

      Returns VertexAICredentials

      The credentials with project and location set (an empty project and no location for an API key on Google's global route).

      When the key or its serviceAccountJson is not JSON, it names no project (an API key may leave out both the project and the location, not the project alone), its liveHost, liveApiVersion or apiKey is not one, or an apiKey stands beside another credential (no message quotes any of these values).