Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create Google Gemini provider #1327

Open
magne opened this issue Mar 31, 2025 · 2 comments
Open

Unable to create Google Gemini provider #1327

magne opened this issue Mar 31, 2025 · 2 comments

Comments

@magne
Copy link

magne commented Mar 31, 2025

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

@lukehinds
Copy link
Contributor

which coding assistant were you using @magne ?

@magne
Copy link
Author

magne commented Apr 1, 2025

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.

@lukehinds lukehinds added enhancement and removed bug labels Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants