Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
Stay organized with collections
Save and categorize content based on your preferences.
This document describes how to resolve errors that you might encounter when
developing an agent.
Content generation errors
Issue:
You receive an error message similar to the following:
ValueError: Cannot get the Candidate text.
Response candidate content part has no text.
Possible cause:
This error might be caused by using a version of langchain-google-vertexai
that's not compatible with google-cloud-aiplatform. Version 1.0.2 or later
of langchain-google-vertexai is required. To check which version you're using,
run the following command in your terminal:
pipshowlangchain-google-vertexai
Recommended solution:
Install version 1.0.2 of langchain-google-vertexai. This version includes
the LangChain tool-calling
updates that are required to work with google-cloud-aiplatform. To update your
version of langchain-google-vertexai, run the following command in your
terminal:
pipinstalllangchain-google-vertexai--upgrade
After running the update command, verify that you're using version 1.0.2 or
later by running the following command in your terminal:
pipshowlangchain-google-vertexai
If you're in a notebook instance (for example, Jupyter or Colab or Workbench),
you might need to restart your runtime to use the updated packages.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["This document describes how to resolve errors that you might encounter when\n[developing an agent](/vertex-ai/generative-ai/docs/agent-engine/develop/overview).\n\nContent generation errors\n\n**Issue**:\n\nYou receive an error message similar to the following: \n\n ValueError: Cannot get the Candidate text.\n Response candidate content part has no text.\n\n**Possible cause**:\n\nThis error might be caused by using a version of `langchain-google-vertexai`\nthat's not compatible with `google-cloud-aiplatform`. Version `1.0.2` or later\nof `langchain-google-vertexai` is required. To check which version you're using,\nrun the following command in your terminal: \n\n pip show langchain-google-vertexai\n\n**Recommended solution**:\n\nInstall version `1.0.2` of `langchain-google-vertexai`. This version includes\nthe [LangChain tool-calling](https://github.com/langchain-ai/langchain-google/pull/166)\nupdates that are required to work with `google-cloud-aiplatform`. To update your\nversion of `langchain-google-vertexai`, run the following command in your\nterminal: \n\n pip install langchain-google-vertexai --upgrade\n\nAfter running the update command, verify that you're using version `1.0.2` or\nlater by running the following command in your terminal: \n\n pip show langchain-google-vertexai\n\nIf you're in a notebook instance (for example, Jupyter or Colab or Workbench),\nyou might need to restart your runtime to use the updated packages."]]