When service account credentials are passed to ChatAnthropicVertex they are not used during the client setup (AnthropicVertex/AsyncAnthropicVertex) which results in the following error:
ERROR:root:Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information.
When service account
credentials
are passed to ChatAnthropicVertex they are not used during the client setup (AnthropicVertex/AsyncAnthropicVertex) which results in the following error:ERROR:root:Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information.
AnthropicVertex was recently updated (v0.30.0) to now accept credentials as a parameter.
Example non-working code:
I believe the code that will require changes is here: https://github.com/langchain-ai/langchain-google/blob/e7b45726adc15e17f75f018f4542ec11aecdaeb3/libs/vertexai/langchain_google_vertexai/model_garden.py#L154-L166