# How to switch between helper models in self-hosted environment

**URL:** <https://community.n8n.io/t/topic/327390>\
**Category:** Questions\
**Tags:** bug:unconfirmed\
**Created:** [November 7, 2026, 8:26pm UTC](https://community.n8n.io/t/topic/327390 "2026-11-07T20:26:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Add9\_693](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/add9_693/32/195905_2.png) [@Add9\_693](https://community.n8n.io/u/Add9_693)\
**Post date:** [November 7, 2026, 8:26pm UTC](https://community.n8n.io/t/topic/327390/1 "2026-11-07T20:26:31Z")

</div>

I subscribed to the OpenAI model, but my credits have run out.

I want to switch to another model. I subscribed to Gemini, added my Gemini API key, and it was successfully accepted.

However, when I try to chat, I still get a message saying that my credits have run out.

I have an active Gemini subscription and have already added the API key. I want to use Gemini instead of OpenAI.

How can I activate Gemini and switch between different AI models? I want to be able to change models whenever I need to, without running into this issue.

Please explain how to fix this problem step by step.

---

<div class="post-metadata">

**Author:** ![kjooleng](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kjooleng/32/184045_2.png) [@kjooleng](https://community.n8n.io/u/kjooleng)\
**Post date:** [November 8, 2026, 2:16am UTC](https://community.n8n.io/t/topic/327390/2 "2026-11-08T02:16:44Z")

</div>

> [@Add9\_693](#):
>
> Please explain how to fix this problem step by step

In order to help you, please explain your issue clearly.  
Step by step as well. Include screenshot if necessary

> [@Add9\_693](#):
>
> How can I activate Gemini and switch between different AI models?

What is your issue? Are you referring to the n8n assistent?  
Or is it the AI agent?

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [November 8, 2026, 10:18am UTC](https://community.n8n.io/t/topic/327390/3 "2026-11-08T10:18:02Z")

</div>

Hi @Add9_693, please share your n8n version and a screenshot showing the chat header and the full credits error, with API keys hidden. That will show which chat feature you’re using.

If this is a workflow with an AI Agent:

1. Open the workflow and disconnect the OpenAI Chat Model from the Agent’s Chat Model input.
2. Click + under Chat Model and select Google Gemini Chat Model.
3. Open that node, select your Gemini credential, and choose a model in the Model field.
4. Send a new test message from the workflow’s chat.

The connected Chat Model determines which provider the Agent calls. Adding a Gemini credential alone doesn’t replace the existing OpenAI connection.

If you mean the n8n Assistant that builds or edits workflows, its provider is configured separately in the instance’s AI settings. The screenshot will help us give you the steps for that screen.

---

<div class="post-metadata">

**Author:** ![Add9\_693](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/add9_693/32/195905_2.png) [@Add9\_693](https://community.n8n.io/u/Add9_693)\
**Post date:** [November 8, 2026, 3:09pm UTC](https://community.n8n.io/t/topic/327390/4 "2026-11-08T15:09:53Z")

</div>

The purpose and summary of my question is that I have a paid hosting subscription with n8n installed on it. I have no programming experience, and I need to find an agent who will build workflows and implement the project himself within the work environment.

He asks me for sensitive information.

I just guide him—he moves within the n8n work environment. If there’s n8n, I don’t know what this job title is called—agent or assistant—but the important thing is that I need this. How can I get this and have them stay with me? Whenever I want to do a project, I open the n8n platform, chat with them, present my project idea, we agree on execution, I give them an order to start, and they begin generating the workflow to the end. With each step, I monitor their work.

This is exactly what I want, noting that I’m on self-hosting.

On Sunday, November 8, 2026, 12:28 PM Anshul Namdev \<[notifications@n8n.discoursemail.com](mailto:notifications@n8n.discoursemail.com)\> wrote:

---

<div class="post-metadata">

**Author:** ![kjooleng](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kjooleng/32/184045_2.png) [@kjooleng](https://community.n8n.io/u/kjooleng)\
**Post date:** [November 8, 2026, 3:33pm UTC](https://community.n8n.io/t/topic/327390/5 "2026-11-08T15:33:59Z")

</div>

This sounds like you are trying to setup n8n assistant.

This link should help

> **[Set up n8n Assistant | Deploy | n8n Docs](https://docs.n8n.io/deploy/host-n8n/configure-n8n/set-up-n8n-assistant)**
>
> Set up n8n Assistant on self-hosted n8n using environment variables.

Only Anthropic, OpenAI, and OpenRouter are supported.

You need to write more clearly as Gemini may not be fully supported

---

<div class="post-metadata">

**Author:** ![SahinY](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@SahinY](https://community.n8n.io/u/SahinY)\
**Post date:** [November 8, 2026, 8:36pm UTC](https://community.n8n.io/t/topic/327390/6 "2026-11-08T20:36:25Z")

</div>

This post was flagged by the community and is temporarily hidden.

---

<div class="post-metadata">

**Author:** ![nivedrathnan](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@nivedrathnan](https://community.n8n.io/u/nivedrathnan)\
**Post date:** [November 9, 2026, 6:00am UTC](https://community.n8n.io/t/topic/327390/7 "2026-11-09T06:00:36Z")

</div>

@Add9_693 From your last message, what you want is n8n Assistant (the one that builds workflows for you in the editor), not an AI Agent inside a workflow. That also explains why the error didn’t go away.

The Gemini key you added was most likely saved as a normal credential, and n8n Assistant doesn’t use those. It has its own model key in the instance’s AI settings (or N8N\_INSTANCE\_AI\_MODEL\_API\_KEY on the server), and that one is still your OpenAI key with no credits. So it keeps saying your credits have run out.

Like kjooleng said, it only accepts Anthropic, OpenAI or OpenRouter, so a Gemini key can’t go in there directly. If you want Gemini anyway, the way is through OpenRouter:

1. Make an account on openrouter.ai, add some credit and create an API key.
2. In n8n open the AI settings and put the OpenRouter key in place of the OpenAI one.
3. Choose OpenRouter as the provider and pick a Gemini model (their names start with google/). If your host only lets you set it on the server, use N8N\_INSTANCE\_AI\_MODEL=openrouter/google/ and N8N\_INSTANCE\_AI\_MODEL\_API\_KEY=, then restart n8n.

After that, switching models is just changing the model name, same key.

About it asking for sensitive information: that’s normally it asking you to connect logins or API keys for the apps your workflow uses. They stay in your own n8n, but only give it access to what the project actually needs.
