langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Error occurs when selecting “Google Generative AI” as Model Provider in Agents component

Open restato opened this issue 1 year ago • 1 comments

Bug Description

When I select “Google Generative AI” as the Model Provider in the Agents component, an error occurs and the component fails to load properly.

"Error getting model names: 400 API key not valid. Please pass a valid API key. [reason: "API_KEY_INVALID"\ndomain: "googleapis.com"\nmetadata {\n key: "service"\n value: "generativelanguage.googleapis.com"\n}\n, locale: "en-US"\nmessage: "API key not valid. Please pass a valid API key."\n]"

Reproduction

Steps to Reproduce:

  1. Navigate to the Agents component.
  2. Click on the Model Provider dropdown.
  3. Select “Google Generative AI”.
  4. Observe the error.

Expected behavior

The component should load without error and allow further configuration of the Google Generative AI model.

Actual Behavior:

An error occurs immediately upon selection, and the UI does not respond as expected.

Who can help?

@Cristhianzl @lucaseduoli @igorrCarvalho

Operating System

Ubuntu

Langflow Version

1.4.2

Python Version

None

Screenshot

Image

Flow File

No response

restato avatar Jun 16 '25 14:06 restato

https://github.com/langflow-ai/langflow/pull/9495

Empreiteiro avatar Aug 22 '25 13:08 Empreiteiro