This library already supports the use of Google OAuth credentials in ChatVertexAI, but ChatGoogleAI currently only supports the query string "api key". While poorly documented, "Google AI Studio" (the service ChatGoogleAI interfaces with) does support oauth credentials, as described here.
This is probably an easy change, we'd just need to extend ChatGoogleAI to support specifying whether the :api_key field should be sent as a query string or an Authorization: Bearer xxx header. (A more complicated way to do this could be to add a callback for clients to modify the Req before it's sent, but this seems like something that should be supported without workarounds.)
This library already supports the use of Google OAuth credentials in
ChatVertexAI, butChatGoogleAIcurrently only supports the query string "api key". While poorly documented, "Google AI Studio" (the serviceChatGoogleAIinterfaces with) does support oauth credentials, as described here.This is probably an easy change, we'd just need to extend
ChatGoogleAIto support specifying whether the:api_keyfield should be sent as a query string or anAuthorization: Bearer xxxheader. (A more complicated way to do this could be to add a callback for clients to modify the Req before it's sent, but this seems like something that should be supported without workarounds.)