#change model
1 messages Β· Page 1 of 1 (latest)
If the DeepSeek API key expired, donβt paste it here β replace it locally on the machine running OpenClaw.
First, please check your version if anything below doesnβt match:
openclaw --version
Fast path for DeepSeek:
openclaw onboard --auth-choice deepseek-api-key
openclaw models status
openclaw models list --provider deepseek
That onboarding flow prompts for the new DeepSeek key and can set the DeepSeek model again.
To change the model after auth is fixed:
- current chat/session only: use
/modelor/model listin chat
- persistent default: run
openclaw models set <provider/model>
Use one of the exact refs shown by openclaw models list.
If your gateway runs as a daemon, make sure the new key is visible to the daemon too β commonly in ~/.openclaw/.env as DEEPSEEK_API_KEY=... β then restart the gateway.
Docs: https://docs.openclaw.ai/providers/deepseek and https://docs.openclaw.ai/cli/models
i need to cahnge in to gemini's api
Yep β for Gemini API key, use the Google provider (google) and GEMINI_API_KEY.
Run this on the machine running OpenClaw:
openclaw onboard --auth-choice gemini-api-key
It should prompt you for the Gemini key.
Then verify:
openclaw models list --provider google
openclaw models status
To make Gemini the persistent default, set one of the exact models from the list, for example:
openclaw models set google/gemini-3.1-pro-preview
If OpenClaw is running as a daemon/service, put the key somewhere the gateway can see it, usually ~/.openclaw/.env:
GEMINI_API_KEY=your_key_here
Then restart the gateway:
openclaw gateway restart
π¦ OpenClaw 2026.5.7 (eeef486) β I'm not magicβI'm just extremely persistent with retries and coping strategies.
openclaw tui - local embedded - agent main - session main
session agent:main:main
200k
200
run aborted
200k
run aborted
This response is taking longer than expected. Send another message to continue.
200,000
run aborted
This response is taking longer than expected. Send another message to continue.
128k
run aborted
This response is taking longer than expected. Send another message to continue.
local ready | idle
agent main | session main | google/gemini-3.1-pro-preview | tokens ?/1.0m
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Good news: the model switch worked β your TUI shows google/gemini-3.1-pro-preview and tokens ?/1.0m.
The 200k / 128k messages look like youβre typing token limits into the chat. That wonβt change config; it just sends β200kβ as a prompt, and Gemini is likely stalling/aborting on the run.
Try this cleanup path:
/new
/model status
openclaw models status --probe-provider google
Then send a tiny test prompt like:
reply exactly: ok
If it still aborts, switch to a lighter Google model from your installed list:
openclaw models list --provider google
openclaw models set <exact-google-model-from-that-list>
openclaw gateway restart
Also make sure the daemon can actually see the key:
cat ~/.openclaw/.env | grep GEMINI_API_KEY
openclaw logs --tail 80
Donβt paste the key here. If the logs show No API key found, 401, 403, quota, or rate limit, paste only that redacted error line and we can pin it down.
π¦ OpenClaw 2026.5.7 (eeef486) β Finally, a use for that always-on Mac Mini under your desk.
Config : ~.openclaw\openclaw.json
Agent dir : ~.openclaw\agents\main\agent
Default : google/gemini-3.1-pro-preview
Fallbacks (0) : -
Image model : -
Image fallbacks (0): -
Aliases (2) : DeepSeek -> deepseek/deepseek-v4-flash, gemini -> google/gemini-3.1-pro-preview
Configured models (3): deepseek/deepseek-v4-flash, github-copilot/claude-opus-4.7, google/gemini-3.1-pro-preview
Auth overview
Auth store : ~.openclaw\agents\main\agent\auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (1): github-copilot (1)
- deepseek effective=profiles:~.openclaw\agents\main\agent\auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | deepseek:default=sk-c7940...537ee78f [disabled:billing 1h]
- github-copilot effective=profiles:~.openclaw\agents\main\agent\auth-profiles.json | profiles=1 (oauth=0, token=1, api_key=0) | github-copilot:github=token:ghu_cboo...m42S68c5
- google effective=profiles:~.openclaw\agents\main\agent\auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | google:default=AIzaSyA7...vrYd4Jhk
- openai effective=profiles:~.openclaw\agents\main\agent\auth-profiles.json | profiles=1 (oauth=0, token=0, api_key=1) | openai:default=sk-proj-...hyQKcToA
OAuth/token status
- github-copilot
- github-copilot:github static
PS C:\Users\Somegh>
- github-copilot:github static
That status actually looks mostly correct: default is Gemini, and Google has an API-key profile loaded.
Two things:
-
You pasted partial key values. Theyβre masked, so probably okay, but avoid sharing even partial keys in public. If youβre worried, rotate them.
-
Next step is a live probe, because
models statusonly proves the profile exists β not that Google accepts it:
openclaw models status --probe-provider google
If that says ok, start a fresh session and test small:
/new
reply exactly: ok
If it still aborts, paste the Google probe result and the last log lines, redacted:
openclaw logs --tail 120
Also: Shell env: off is fine here because your Gemini key is in the OpenClaw auth profile, not only in env.
the bot says The model did not produce a response before the model idle timeout. Please try again, or increase models.providers.<id>.timeoutSeconds for slow local or self-hosted providers.
That means Gemini auth is being found, but the model request sits too long without streaming any output.
Set a longer Google provider timeout, then restart:
openclaw config set models.providers.google.timeoutSeconds 300
openclaw gateway restart
Then start clean and test tiny:
/new
reply exactly: ok
If it still times out, try a lighter Google model from your actual installed list:
openclaw models list --provider google
openclaw models set <exact-google-model-from-list>
openclaw gateway restart
And run this to see whether Google is returning a real API error vs just hanging:
openclaw models status --probe-provider google
openclaw logs --tail 120
If you paste logs, redact keys/tokens. The useful lines are usually timeout, 429, quota, permission, API key, or model not found.
where to reply ok
In the OpenClaw TUI chat β the same place where you were typing 200k / 128k.
After you run:
openclaw config set models.providers.google.timeoutSeconds 300
openclaw gateway restart
Open the TUI again if needed:
openclaw tui
Then type these as chat messages inside the TUI:
/new
then:
reply exactly: ok
If Gemini is working, the bot should answer just ok.
Error: Config validation failed: models.providers.google.baseUrl: Invalid input: expected string, received undefined
Ah, that happened because adding models.providers.google.timeoutSeconds created/validated a google provider config, and that provider entry also needs a baseUrl string.
Set both together/fix the missing base URL:
openclaw config set models.providers.google.baseUrl "https://generativelanguage.googleapis.com/v1beta"
openclaw config set models.providers.google.timeoutSeconds 300
openclaw gateway restart
Then test in the TUI:
/new
reply exactly: ok
If the first command still fails because the config is already in a bad partial state, open ~\.openclaw\openclaw.json and either remove the models.providers.google block entirely, or make it look like:
models: {
providers: {
google: {
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
timeoutSeconds: 300,
},
},
},
Then restart the gateway.
π¦ OpenClaw 2026.5.7 (eeef486) β Less clicking, more shipping, fewer "where did that file go" moments.
openclaw tui - ws://127.0.0.1:18789 - agent main - session main
not connected to gateway β message not sent
disconnected | disconnected
agent main | session main | unknown | tokens ?
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The gateway is down now β likely because the config validation error is preventing it from starting. We need to fix the bad models.providers.google block first.
On Windows, open this file:
notepad $env:USERPROFILE\.openclaw\openclaw.json
Find:
models: {
providers: {
google: {
...
}
}
}
For the quickest recovery, either delete the whole google provider block, or make it include baseUrl:
models: {
providers: {
google: {
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
timeoutSeconds: 300,
},
},
},
Save, then run:
openclaw gateway restart
openclaw gateway status