Skip to content

[Bug]: Incorrect API key provided" when adding Gemini model #185

@kstij1

Description

@kstij1

Description

When trying to add the Gemini model by entering a valid API key, the system shows an error message:
“Incorrect API key provided” even though the key is valid and works externally.

Expected Behavior

  • The Gemini API key should be verified successfully.
  • The model should appear in the “Model List” section after clicking Save.

Current Behavior

  • Upon entering the API key and saving, a toast error appears: “Incorrect API key provided.”
  • The model is not added to the list.
  • Other models (if applicable) work correctly.

Steps to Reproduce

  1. Navigate to the API Key management section.
  2. Select Gemini from the “Add Model” dropdown.
  3. Enter a valid Gemini API key.
  4. Click Save.
  5. Observe the error: “Incorrect API key provided.”

Possible Causes

  • API validation endpoint may be incorrect or outdated.
  • Missing or incorrect request headers (e.g., Authorization: Bearer <key>).
  • Gemini model integration not aligned with latest API spec.
  • Backend may be rejecting keys due to missing environment configuration.
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions