Skip to content

Gemini API Integration for AI Chat Assistant Not Working Properly #2

@DongDuong2001

Description

@DongDuong2001

Gemini API Integration for AI Chat Assistant Not Working Properly

Description

The Gemini API integration in the AI Chat Assistant is currently failing to respond. When attempting to send a request, the assistant cannot receive a valid response from the API.


Steps to Reproduce

  1. Configure the Gemini API key in environment variables.
  2. Launch the chat assistant.
  3. Send any test message to trigger a Gemini API request.

Expected Behaviour

The chat assistant should successfully send requests to the Gemini API and return generated responses.


Actual Behaviour

The assistant fails to get any response from the Gemini API. The process eventually times out or returns an error message.


Error Log

Error: Failed to fetch response from Gemini API
Caused by: Error: No response received from API endpoint


Environment

  • App Version: v1.2.0
  • Runtime: Node.js 20
  • OS: Window 11
  • Gemini API Version: v1beta

Possible Causes

  • Network timeout or API endpoint misconfiguration
  • Missing or invalid API key
  • Gemini service unresponsive or rate-limited

Suggested Fix / Next Steps

  • Verify Gemini API endpoint URL and authentication setup
  • Add retry and timeout handling in API request logic
  • Log and surface full API error responses for debugging
  • Test API connectivity separately using curl or Postman

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions