openclaw - 💡(How to fix) Fix Existing channel sessions remain pinned to old model after default model changes

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

After changing the default model to tencentcodingplan/glm-5, an existing QQ direct session continued using deepseek/deepseek-v4-pro. The session failed because the DeepSeek key had insufficient balance, even though openclaw models status --json showed tencentcodingplan/glm-5 as the configured default.

There was also a provider URL mismatch: the main config had Tencent Coding Plan configured as https://api.lkeap.cloud.tencent.com/coding/v3, while the agent-level models.json had https://api.lkeap.cloud.tencent.com/coding/v3/v1.

Error Message

deepseek (deepseek-v4-pro) returned a billing error

Root Cause

After changing the default model to tencentcodingplan/glm-5, an existing QQ direct session continued using deepseek/deepseek-v4-pro. The session failed because the DeepSeek key had insufficient balance, even though openclaw models status --json showed tencentcodingplan/glm-5 as the configured default.

Fix Action

Workaround

Manually edit ~/.openclaw/agents/main/sessions/sessions.json and update the affected session's modelProvider, model, and systemPromptReport fields, then verify with:

openclaw sessions --json --active 20
openclaw agent --session-id <session-id> --message ping --timeout 60 --json

Code Example

{
     "defaultModel": "tencentcodingplan/glm-5",
     "resolvedDefault": "tencentcodingplan/glm-5"
   }

---

{
     "key": "agent:main:qqbot:direct:<redacted>",
     "modelProvider": "deepseek",
     "model": "deepseek-v4-pro",
     "systemPromptReport": {
       "provider": "deepseek",
       "model": "deepseek-v4-pro"
     }
   }

---

deepseek (deepseek-v4-pro) returned a billing error
   402 Insufficient Balance

---

{
     "modelProvider": "tencentcodingplan",
     "model": "glm-5",
     "systemPromptReport": {
       "provider": "tencentcodingplan",
       "model": "glm-5"
     }
   }

---

winnerProvider: tencentcodingplan
   winnerModel: glm-5
   fallbackUsed: false

---

{
  "models": {
    "providers": {
      "tencentcodingplan": {
        "baseUrl": "https://api.lkeap.cloud.tencent.com/coding/v3"
      }
    }
  }
}

---

{
  "providers": {
    "tencentcodingplan": {
      "baseUrl": "https://api.lkeap.cloud.tencent.com/coding/v3/v1"
    }
  }
}

---

openclaw sessions clear-model <session>
  openclaw sessions set-model <session> <provider/model>

---

openclaw sessions --json --active 20
openclaw agent --session-id <session-id> --message ping --timeout 60 --json
RAW_BUFFERClick to expand / collapse

This was generated by AI during triage.

Bug: existing channel sessions stay pinned to old model after default model changes, and provider baseUrl may diverge between config files

Summary

After changing the default model to tencentcodingplan/glm-5, an existing QQ direct session continued using deepseek/deepseek-v4-pro. The session failed because the DeepSeek key had insufficient balance, even though openclaw models status --json showed tencentcodingplan/glm-5 as the configured default.

There was also a provider URL mismatch: the main config had Tencent Coding Plan configured as https://api.lkeap.cloud.tencent.com/coding/v3, while the agent-level models.json had https://api.lkeap.cloud.tencent.com/coding/v3/v1.

Environment

  • OpenClaw version: OpenClaw 2026.5.2 (8b2a6e5)
  • Gateway port: 15100
  • Channel involved: qqbot
  • Default model reported by openclaw models status --json: tencentcodingplan/glm-5

What happened

  1. Default model was configured as:

    {
      "defaultModel": "tencentcodingplan/glm-5",
      "resolvedDefault": "tencentcodingplan/glm-5"
    }
  2. The existing QQ direct session still had persisted session-level model state:

    {
      "key": "agent:main:qqbot:direct:<redacted>",
      "modelProvider": "deepseek",
      "model": "deepseek-v4-pro",
      "systemPromptReport": {
        "provider": "deepseek",
        "model": "deepseek-v4-pro"
      }
    }
  3. New messages in that QQ direct session continued to use DeepSeek and failed with:

    deepseek (deepseek-v4-pro) returned a billing error
    402 Insufficient Balance
  4. Manually changing the session entry to:

    {
      "modelProvider": "tencentcodingplan",
      "model": "glm-5",
      "systemPromptReport": {
        "provider": "tencentcodingplan",
        "model": "glm-5"
      }
    }

    made the same QQ direct session work again.

  5. Validation after the manual fix:

    winnerProvider: tencentcodingplan
    winnerModel: glm-5
    fallbackUsed: false

Provider URL mismatch

The main config contained:

{
  "models": {
    "providers": {
      "tencentcodingplan": {
        "baseUrl": "https://api.lkeap.cloud.tencent.com/coding/v3"
      }
    }
  }
}

But the agent-level model file contained:

{
  "providers": {
    "tencentcodingplan": {
      "baseUrl": "https://api.lkeap.cloud.tencent.com/coding/v3/v1"
    }
  }
}

Changing the agent-level file back to https://api.lkeap.cloud.tencent.com/coding/v3 fixed the mismatch.

Expected behavior

  • If the default model changes, OpenClaw should make it clear when existing sessions remain pinned to an older model.
  • A failed session pinned to a non-default provider should be discoverable via doctor, models status, or a sessions command.
  • There should be a supported CLI way to clear or update a session-level model override.
  • Provider baseUrl values should not silently diverge between the main config and agent-level models.json, and OpenClaw should not accidentally append /v1 when the configured OpenAI-compatible endpoint already includes its required path.

Suggested fixes

  • Add a command such as:

    openclaw sessions clear-model <session>
    openclaw sessions set-model <session> <provider/model>
  • Have openclaw doctor report sessions whose pinned model differs from the current default, especially failed/recent sessions.

  • Clarify in openclaw models status whether the default model only applies to new sessions, and whether any active sessions have overrides.

  • Ensure provider URL normalization does not append /v1 to Tencent Coding Plan's https://api.lkeap.cloud.tencent.com/coding/v3 endpoint.

Workaround

Manually edit ~/.openclaw/agents/main/sessions/sessions.json and update the affected session's modelProvider, model, and systemPromptReport fields, then verify with:

openclaw sessions --json --active 20
openclaw agent --session-id <session-id> --message ping --timeout 60 --json

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • If the default model changes, OpenClaw should make it clear when existing sessions remain pinned to an older model.
  • A failed session pinned to a non-default provider should be discoverable via doctor, models status, or a sessions command.
  • There should be a supported CLI way to clear or update a session-level model override.
  • Provider baseUrl values should not silently diverge between the main config and agent-level models.json, and OpenClaw should not accidentally append /v1 when the configured OpenAI-compatible endpoint already includes its required path.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Existing channel sessions remain pinned to old model after default model changes