From a92ced3c4a97bc089c6aec7cd2ec0ea2d1e42546 Mon Sep 17 00:00:00 2001 From: Haze <709547807@qq.com> Date: Fri, 6 Feb 2026 03:31:24 +0800 Subject: [PATCH] fix(auth): use correct model config format (object, not string) OpenClaw expects agents.defaults.model as { primary: "provider/model" } not a plain string. The previous code wrote a string which caused: "agents.defaults.model: Invalid input: expected object, received string" --- electron/utils/openclaw-auth.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electron/utils/openclaw-auth.ts b/electron/utils/openclaw-auth.ts index 0cc6d6156..da7b95302 100644 --- a/electron/utils/openclaw-auth.ts +++ b/electron/utils/openclaw-auth.ts @@ -197,9 +197,10 @@ export function setOpenClawDefaultModel(provider: string): void { } // Set the default model for the agents + // model must be an object: { primary: "provider/model", fallbacks?: [] } const agents = (config.agents || {}) as Record; const defaults = (agents.defaults || {}) as Record; - defaults.model = model; + defaults.model = { primary: model }; agents.defaults = defaults; config.agents = agents;