Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Unable to create Google Gemini provider #1327

Open

Description

@magne

Describe the issue

I find it impossible to create a provider to connect to Google Gemini.

When I try to create an OpenAI provider with endpoint https://generativelanguage.googleapis.com/v1beta/openai, CodeGate tries to download the models from https://generativelanguage.googleapis.com/v1beta/openai/v1/models, while the proper url should have been https://generativelanguage.googleapis.com/v1beta/openai/models.

Steps to Reproduce

Operating System

Linux (Intel)

IDE and Version

N/A

Extension and Version

N/A

Provider

OpenAI

Model

N/A

Codegate version

v0.1.30

Logs

2025-03-31T11:01:41.269280Z [info ] HTTP Request: GET https://generativelanguage.googleapis.com/v1beta/openai/v1/models "HTTP/1.1 404 Not Found" lineno=1025 module=_client pathname=/usr/local/lib/python3.12/site-packages/httpx/_client.py

Additional Context

No response

Activity

  1. added theissue type on Mar 31, 2025
  2. lukehinds commented on Apr 1, 2025

    @lukehinds

    which coding assistant were you using @magne ?

  3. magne commented on Apr 1, 2025

    @magne
    Author

    I'm using Cline. But that really doesn't matter. I can't even start using Cline, since I'm not able to register a provider in CodeGate. I also tried to override the OpenAI url (with env variable), and could not make it work. I did not enable debug logging when I did that, so I can't be sure what URL it was trying to reach, but I was not able to reach the Gemini service.

    As you can see from my bug report, the reason this fails is that the OpenAI REST endpoints are what you have after the .../v1/. You automatically add the v1/ between the providers endpoint URL and the OpenAI endpoints. If you didn't do that, I suspect everything would work just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions