spring-ai
spring-ai copied to clipboard
VertexAI PaLM2 does not support Authentication Credentials
trafficstars
VertexAI PaLM2 Chat https://docs.spring.io/spring-ai/reference/api/clients/vertexai-palm2-chat.html does not support authentication by gcloud (gcloud auth application-default login).
I get following error when not defining api-key:
java.lang.RuntimeException: 403 - ResponseError[error=Error[message=Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API., code=403, status=PERMISSION_DENIED]]
As this is the same mechanism, I think it won't support GKE IAM authentication as well.
VertexAI Gemini Chat supports this authentication already: https://docs.spring.io/spring-ai/reference/api/clients/vertexai-gemini-chat.html#_prerequisites
In documentation I see, that API for PaLM2 supports this method of authentication: https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/text-bison ("Setup the PaLM 2 Text Bison (curl)")