-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Auto-compaction does not resolve compaction model aliases before dispatch #90340
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
Auto-compaction in OpenClaw 2026.6.1 does not resolve a configured compaction model alias before dispatch, causing the alias
gpt54minito be sent asopenai/gpt54miniand rejected as an unknown model.Steps to reproduce
Start OpenClaw 2026.6.1 with a model alias and compaction override shaped like this sanitized config:
{ "models": { "providers": { "openai": { "api": "openai-chatgpt-responses", "agentRuntime": { "id": "pi" } } } }, "agents": { "defaults": { "model": { "primary": "gpt55", "fallbacks": ["gpt54"] }, "models": { "openai/gpt-5.5": { "alias": "gpt55", "agentRuntime": { "id": "pi" } }, "openai/gpt-5.4": { "alias": "gpt54", "agentRuntime": { "id": "pi" } }, "openai/gpt-5.4-mini": { "alias": "gpt54mini", "params": { "thinking": "high" }, "agentRuntime": { "id": "pi" } }, "openai/*": { "agentRuntime": { "id": "pi" } } }, "compaction": { "reserveTokens": 30000, "keepRecentTokens": 20000, "maxHistoryShare": 0.1, "model": "gpt54mini", "notifyUser": true } } } }Run a long
openai/gpt-5.5session until embedded auto-compaction is triggered.Observe the gateway/agent log line shown below.
Expected behavior
The auto-compaction path should resolve
agents.defaults.compaction.model = "gpt54mini"through the same model alias resolver used by normal agent model selection, then dispatch compaction to canonicalopenai/gpt-5.4-mini.Actual behavior
Auto-compaction dispatches or reports the alias as
openai/gpt54mini, which is not a configured model id and is rejected as unknown.OpenClaw version
2026.6.1
Operating system
macOS 15.x / Darwin 24.x
Install method
npm global, Node.js 24
Model
Primary session model:
openai/gpt-5.5Compaction override: alias
gpt54minifor canonicalopenai/gpt-5.4-miniProvider / routing chain
OpenClaw -> OpenAI plugin -> ChatGPT Responses runtime (
agentRuntime.id = "pi")Additional provider/model setup details
The alias is defined under
agents.defaults.modelsas:Changing only
agents.defaults.compaction.modelfromgpt54minito canonicalopenai/gpt-5.4-miniavoids the failure.Logs, screenshots, and evidence
15:17:24+02:00 warn agent/embedded {"subsystem":"agent/embedded"} auto-compaction failed for openai/gpt-5.5: Unknown model: openai/gpt54miniSanitized verification after workaround:
Impact and severity
agents.defaults.compaction.modelset to a configured alias instead of a fully-qualified provider/model id.Additional information
This appears to be either:
The workaround is to avoid aliases in
agents.defaults.compaction.modeland useopenai/gpt-5.4-minidirectly.No credentials, user paths, account names, chat IDs, or local file paths are included in this report.