#gemini

1 messages ยท Page 1 of 1 (latest)

slow breach
#

i have an problem with gemini. i configured a gemini key on openclaw but when i chat on the ui console, appears:

Agent failed before reply: All models failed (2): openrouter/google/gemini-3.1-pro-preview: No API key found for provider "openrouter". Auth store: /root/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /root/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir. (auth) | openai/gpt-5.4: No API key found for provider "openai". Auth store: /root/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /root/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir. (auth) | No API key found for provider "openai". Auth store: /root/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /root/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir. | No API key found for provider "openai". Auth store: /root/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /root/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir.
Logs: openclaw logs --follow

what can be

past flickerBOT
#

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

pulsar rainBOT
dusk rapidsBOT
#

Most likely this is a provider mismatch, not Gemini itself.

Your error says OpenClaw is trying:

  • openrouter/google/gemini-3.1-pro-preview, which needs an OpenRouter key, OPENROUTER_API_KEY
  • openai/gpt-5.4, which needs an OpenAI key, OPENAI_API_KEY

A normal Gemini key only works with the Google provider, for example:

  • google/gemini-3.1-pro-preview

So if you configured a Gemini key but your model is openrouter/..., OpenClaw will still say auth is missing.

Also, this path is a big clue:

/root/.openclaw/agents/main/agent/auth-profiles.json

#

That usually means the gateway is running as root. If you added the key under another user, the running service will not see it. Put the key on the actual gateway host/user, often in /root/.openclaw/.env, then restart the gateway.

Can you paste these 3 outputs?

openclaw --version
openclaw models status
openclaw gateway status

If you want direct Gemini, set the model to google/gemini-3.1-pro-preview.
If you want to keep openrouter/google/..., add an OpenRouter key instead.

Docs:

slow breach
#

Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : openai/gpt-5.4
Fallbacks (0) : -
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (0): all

Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (0): -

  • google effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | google:default=AQ.Ab8RN...fS1LYvVw

Missing auth

  • openai Run openclaw models auth login --provider openai, openclaw configure, or set an API key env var.

OAuth/token status

  • none

๐Ÿฆž OpenClaw 2026.4.15 (041266a) โ€” I've seen your commit messages. We'll work on that together.

โ”‚
โ—‡
Service: systemd (disabled)
File logs: /tmp/openclaw/openclaw-2026-04-19.log
Command: /root/.nvm/versions/node/v24.15.0/bin/node /root/.nvm/versions/node/v24.15.0/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/root/.nvm/versions/node/v24.15.0/bin)
Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/root/.nvm/versions/node/v24.15.0/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.

Runtime: stopped (state inactive, sub dead, last exit 0, reason 0)
RPC probe: ok

Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting

dusk rapidsBOT
#

Nice, this makes it clear.

Your Gemini key is configured correctly. OpenClaw can see:

  • google:default in auth-profiles.json

So the blocker is not Google auth. The blocker is model selection:

  • your default model is still openai/gpt-5.4, and you do not have OpenAI auth configured
  • the failing UI session also tried openrouter/google/gemini-3.1-pro-preview, which needs an OpenRouter key, not a Gemini key

So the fix is one of these:

  1. Use native Gemini directly
    openclaw models set google/gemini-3.1-pro-preview
    
#
  1. If you want openrouter/google/..., add an OPENROUTER_API_KEY

  2. If you want to keep openai/gpt-5.4 as default, add an OPENAI_API_KEY

Also, if that UI console session was already pinned to the wrong model, it may keep trying it. After changing the default, either:

  • start a new chat/session, or
  • run /model google/gemini-3.1-pro-preview in that session

Shell env: off is not the problem here, since your Google key is already present in the auth profiles.

Separate issue, not the main blocker: the old nvm/systemd warning is worth cleaning up later with:

openclaw doctor --repair
slow breach
#

if i want to change to gemma 4 26b a4b it

dusk rapidsBOT
#

Yep, if you want to use it with your existing Google/Gemini key, use:

openclaw models set google/gemma-4-26b-a4b-it

Or inside the chat/session:

/model google/gemma-4-26b-a4b-it

Important part is the prefix:

  • โœ… google/gemma-4-26b-a4b-it โ†’ uses your Google/Gemini auth
  • โŒ openrouter/google/gemma-4-26b-a4b-it โ†’ would need an OpenRouter key