#{"error":{"message":"","code":404,"status":"Not Found"}}

1 messages · Page 1 of 1 (latest)

wet hill
#

I upgraded OpenClaw from version 2026.3.2 to 2026.3.13 today, but the model can no longer answer questions. An error code popped up on the web interface. How should I solve this?

Embedded agent failed before reply: All models failed (4): google/gemini-2.5-pro: {"error":{"message":"","code":404,"status":"Not Found"}} (model_not_found) | google/gemini-3-flash-preview: {"error":{"message":"","code":404,"status":"Not Found"}} (model_not_found) | google/gemini-3-pro-preview: {"error":{"message":"","code":404,"status":"Not Found"}} (model_not_found) | google/gemini-3.1-pro-preview: {"error":{"message":"","code":404,"status":"Not Found"}} (model_not_found)

covert mapleBOT
#

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

sharp sandalBOT
#

This specific error usually means Google auth is reachable, but the model IDs in your current chain aren’t available for your key/project (model_not_found 404).

Try this quick recovery sequence:

openclaw --version
openclaw models status --probe --probe-provider google
openclaw models set google/gemini-2.5-flash
openclaw models fallbacks clear
openclaw gateway restart

If models status shows missing/invalid Google auth, reconfigure Gemini auth:

openclaw onboard --auth-choice gemini-api-key
#

Also check if you have a custom models.providers.google override in openclaw.json (custom baseUrl, etc.). If yes, remove/fix it so OpenClaw uses the built-in Google provider, then restart.

If it still fails, share:

  • openclaw models status --json
  • ~30 log lines around one failed request (openclaw logs --follow)

Docs:

wet hill
#

请忽略json格式,我为了剩字数删除了几个括号
"configPath": "/root/.openclaw/openclaw.json",
"agentDir": "/root/.openclaw/agents/main/agent",
"defaultModel": "google/gemini-2.5-flash",
"resolvedDefault": "google/gemini-2.5-flash",
"fallbacks": [],
"imageModel": null,
"imageFallbacks": [],
"aliases": {
"gemini-flash": "google/gemini-3-flash-preview",
"gemini": "google/gemini-2.5-pro"
},
"allowed": [
"google/gemini-3-flash-preview",
"google/gemini-3-pro-preview",
"google/gemini-3.1-pro-preview",
"google/gemini-2.5-pro",
"google/gemini-2.5-flash"
],
"auth": {
"storePath": "/root/.openclaw/agents/main/agent/auth-profiles.json",
"shellEnvFallback": {
"enabled": false,
"appliedKeys": []
},
"providersWithOAuth": [],
"missingProvidersInUse": [],
"providers": [
{
"provider": "google",
"effective": {
"kind": "profiles",
"detail": "~/.openclaw/agents/main/agent/auth-profiles.json"
},
"profiles": {
"count": 1,
"oauth": 0,
"token": 0,
"apiKey": 1,
"labels": [
"google:default=AIzaSyAf...Opf_U7Zk"
]
},
"env": {
"value": "AIzaSyAf...Opf_U7Zk",
"source": "env: GEMINI_API_KEY"

],
"unusableProfiles": [],
"oauth": {
  "warnAfterMs": 86400000,
  "profiles": [
    {
      "profileId": "google:default",
      "provider": "google",
      "type": "api_key",
      "status": "static",
      "source": "store",
      "label": "google:default"
    }
  ],
  "providers": [
    {
      "provider": "google",
      "status": "static",
      "profiles": [
        {
          "profileId": "google:default",
          "provider": "google",
          "type": "api_key",
          "status": "static",
          "source": "store",
          "label": "google:default"
sharp sandalBOT
#

收到,你这个补充非常有用。
从你贴的状态看,认证本身是加载到了google:default + GEMINI_API_KEY),问题更像是:

  1. 当前会话/别名还在用会 404 的模型链(你的 gemini 别名指向 google/gemini-2.5-pro
  2. 或者存在 Google provider 的自定义覆盖(models.providers.google)导致请求落到错误 endpoint

另外先提醒:你消息里把 API key 暴露出来了,建议立刻去 Google 侧旋转/重建 key


先按这个顺序做(最快排查):

openclaw models status --probe --probe-provider google
openclaw config get models.providers.google
openclaw models aliases remove gemini
#
openclaw models aliases add gemini google/gemini-2.5-flash
openclaw models set google/gemini-2.5-flash
openclaw models fallbacks clear
openclaw gateway restart

然后在出错的聊天里执行一次:

  • /model status
  • /model google/gemini-2.5-flash

重点:旧会话可能还“记着”之前的模型链,改完默认后也要在该会话里切一次,或者新开一个会话测试。


如果 --probe-provider google 仍然是 404,请把这两段贴出来(可打码):

wet hill
#

08:06:00 warn compaction-safeguard {"subsystem":"compaction-safeguard"} Compaction safeguard: cancelling compaction with no real conversation messages to summarize.
08:06:01 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_agent_end","tags":["error_handling","lifecycle","agent_end","assistant_error"],"runId":"c4e775df-e602-472b-b68b-ccf0e7468b93","isError":true,"error":"{"error":{"message":"","code":404,"status":"Not Found"}}","failoverReason":"model_not_found","model":"gemini-2.5-pro","provider":"google","rawErrorPreview":"{"error":{"message":"","code":404,"status":"Not Found"}}","rawErrorHash":"sha256:0cee8b31170c","rawErrorFingerprint":"sha256:10cad5e6b406"} embedded run agent end
08:06:01 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"auth_profile_failure_state_updated","tags":["error_handling","auth_profiles","cooldown"],"runId":"c4e775df-e602-472b-b68b-ccf0e7468b93","profileId":"sha256:a94403a4f9d0","provider":"google","reason":"model_not_found","windowType":"cooldown","windowReused":false,"previousErrorCount":1,"errorCount":1,"previousCooldownUntil":1773907229047,"cooldownUntil":1773907621067,"failureCounts":{"model_not_found":1}} auth profile failure state updated
08:06:01 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_failover_decision","tags":["error_handling","failover","assistant","surface_error"],"runId":"c4e775df-e602-472b-b68b-ccf0e7468b93","stage":"assistant","decision":"surface_error","failoverReason":"model_not_found","profileFailureReason":"model_not_found","provider":"google","model":"gemini-2.5-pro","profileId":"sha256:a94403a4f9d0","fallbackConfigured":false,"timedOut":false,"aborted":false,"rawErrorPreview":"{"error":{"message":"","code":404,"status":"Not Found"}}","rawErrorHash":"sha256:0cee8b31170c","rawErrorFingerprint":"sha256:10cad5e6b406"} embedded run failover decision

sharp sandalBOT
#

这段日志已经把关键点暴露出来了:

  • model":"gemini-2.5-pro"
  • fallbackConfigured:false

也就是说当前失败会话实际还在用 google/gemini-2.5-pro,并没有走你想要的 2.5-flash
所以先修“会话模型覆盖”,不是 auth。

先在这个线程里直接执行:

  1. /model status(确认当前会话模型)
  2. /model google/gemini-2.5-flash
  3. 再发一句测试

然后把默认和别名也一起修掉(防止新会话又回到 pro):

#
openclaw models set google/gemini-2.5-flash
openclaw models aliases remove gemini
openclaw models aliases add gemini google/gemini-2.5-flash
openclaw gateway restart

如果这样后 2.5-flash 仍是 404,再做这个外部验证(判断是不是 Google key/project 本身问题):

curl "https://generativelanguage.googleapis.com/v1beta/models?key=$GEMINI_API_KEY"
  • 能返回模型列表:更像 OpenClaw 侧回归(建议附日志开 issue)
  • 也报错:就是 key/project/region 侧问题

另外,你前面贴出的 key 已经暴露,建议马上 rotate。

wet hill
#

我就是想用gemini-2.5-pro

sharp sandalBOT
#

明白,你就是要 gemini-2.5-pro,那我们就只围绕它排查。

你现在的 404 是 model_not_found,核心是:
OpenClaw 请求到了 Google,但 Google 在当前 endpoint/项目下找不到这个模型。

先做这两个直连测试(最关键):

# 1) OpenClaw 当前走的是 v1beta,先测它
curl -s "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro?key=$GEMINI_API_KEY"

# 2) 再测 v1
curl -s "https://generativelanguage.googleapis.com/v1/models/gemini-2.5-pro?key=$GEMINI_API_KEY"

结果判断:

#
  • 两条都 404/报错 → 这是 Google key/project 权限或区域问题(不是 OpenClaw 会话问题)
  • v1 成功、v1beta 404 → 这是 OpenClaw 侧兼容问题(当前 Google provider 走 v1beta),请开 issue 并贴这两条结果
    https://github.com/openclaw/openclaw/issues
  • 两条都成功 但 OpenClaw 还 404 → 就是 OpenClaw 2026.3.13 回归,带日志开 issue(我建议你这么做)

另外你之前把 key 发出来了,务必先 rotate 一下再继续测。
文档:

wet hill
#

两条都成功了