Solving Gemini API key errors in Discourse

How do I connect Google Cloud AI for Discourse AI.

I tried the steps mentioned in the post

but GCP interface has changed.

I tried what’s mentioned at

But still encountering the following error

For now I’m using a workaround (Google Cloud Run → vLLM) but latency is very high with that method.

Can someone tell me how do I fix this error? I want to use one of the AI models available on GCP as the default LLM.

why are you using vertex AI?

I used it ln Discourse through LiteLLM proxy. They offer 300 USD in free bonus credits.

@Lilly I also have credits in GCP that’s why I’m trying to connect via Vertex.
@satonotdead Do you experience any latency with LiteLLM method?

i’ve never set it up using vertex. it works perfectly fine though using gemini api service. i just walked through the configuration and i see no change in the google cloud dashboard for the apis and services and for configuration of credentials. :woman_shrugging:t2:

did you see the documentation that is quoted there? what does it tell you?

If I use the Gemini method, it will not use the credits I have because it will connect me to Gemini AI Studio, which cannot utilize the credits in GCP.

i don’t even use this

Can you share a screenshot of your configuration?

i just did a new configuration of gemini flash 3.6 and all i had to add to do was set the api key to use (which in my case is called 2026-07-02). i didn’t change anything else from the default setup for flash 3.6 and it tested successfully and worked fine:


but the api key credential is using the gemini api service, not vertex.

my GCP configuration looks exactly like what you linked in the disco-docs screenshots (those are screenshots of my GCP config!).

Yes, this method works, but it will not allow me to use the GCP credits I already have.

ok so the credits are limited to vertex ai then?

i am just using my paid GCP with a service account and gemini api - very straightforward.

Yes, credits work with the Vertex method only. I’m able to use Vertex AI by logging into GCP but unable to connect it with Discourse as there’s some mismatch in the authentication method that GCP accepts and what Discourse follows, as per my understanding. That’s why I created a LiteLLM proxy for now, but there’s some latency with that method.

Not at all, and I also used a Nginx internal proxy with a script to rotate the token login on Vertex.

LiteLLM is really good if you have plans to deploy more keys, MCP servers and want to use more LLM endpoints.

You can use almost any subscription tier as LLM API with it.

I switched to a lighter model, and there’s no latency now. Thanks.

Closing this topic, though the Vertex method is not working, as the LiteLLM workaround is fine.