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)")
Comment From: ThomasVitale
VertexAI PaLM2 is deprecated and it's being decommissioned by Google. Therefore, it's being removed from Spring AI as well (see https://github.com/spring-projects/spring-ai/issues/924).
Comment From: markpollack
Closing as the model support via those APIs is going away and will be replaced by access through the vertex apis.