#Openclaw Ollama Gemini

1 messages · Page 1 of 1 (latest)

icy palm
#

I’m trying to run gemini 3 flash with ollama on openclaw but openclaw keeps defaulting to using a whole different model and is telling me that its not in the allowed models list for the main agent even tho i set up the gemini model through onboard and ollama.

red craterBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

elfin archBOT
#

Can you paste openclaw --version first? Version mismatches cause a lot of model weirdness.

Likely fix: use the exact Ollama ref and add it to the main agent allowlist. Ollama’s official ref is gemini-3-flash-preview / gemini-3-flash-preview:cloud, so in OpenClaw it should be like:

openclaw models list --provider ollama --plain
openclaw models set ollama/gemini-3-flash-preview:cloud

If you have agents.defaults.models set, that becomes an allowlist, so the model must be present there too. Add it safely:

openclaw config set agents.defaults.models '{"ollama/gemini-3-flash-preview:cloud":{}}' --strict-json --merge
openclaw models set ollama/gemini-3-flash-preview:cloud
openclaw gateway restart
#

Don’t use http://...:11434/v1 for Ollama in OpenClaw — use native Ollama API baseUrl: "http://...:11434" with api: "ollama".

Good debug output to paste after version:

openclaw models status
openclaw models list --provider ollama --plain
openclaw config get agents.defaults.model --json
openclaw config get agents.defaults.models --json

Docs: https://docs.openclaw.ai/providers/ollama and https://docs.openclaw.ai/concepts/models. Ollama’s model page shows the gemini-3-flash-preview / :cloud tags. (ollama.com)

icy palm
#

unknown option merge

elfin archBOT
#

That means your OpenClaw CLI is older than the current docs/command I gave. My bad for not gating harder on version first.

Please paste:

openclaw --version

For now, don’t use --merge. Safer path:

openclaw configure --section model

Choose Ollama again, then verify the exact ref:

#
openclaw models list --provider ollama --plain
openclaw models status

Then set the exact model shown, e.g.:

openclaw models set ollama/gemini-3-flash-preview:cloud
openclaw gateway restart

If it still says “not allowed,” paste these too:

openclaw config get agents.defaults.models --json
#
openclaw config get agents.defaults.model --json

The allowlist is almost certainly the thing blocking it. 🦐

icy palm
#

Config validation failed: agents.defaults.models: Invalid input: expected record, received string

elfin archBOT
#

That error means agents.defaults.models got set as a string, but it must be an object/record.

Important distinction:

  • agents.defaults.model = selected default model
  • agents.defaults.models = allowed models map/list

Fastest fix: clear the allowlist, then set the model:

openclaw config unset agents.defaults.models
openclaw models set ollama/gemini-3-flash-preview:cloud
openclaw gateway restart

If you do want to keep an allowlist, it has to be JSON like this, not a bare string: