You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"⚠️ Model login expired on the gateway for claude-cli. Re-auth with `claude auth login`, then refresh OpenClaw's CLI auth profile with `openclaw models auth login --provider anthropic --method cli`, then try again.",
7648
+
);
7649
+
}
7650
+
});
7651
+
7652
+
it("surfaces Claude CLI OAuth reauth guidance through known failure payloads",()=>{
"⚠️ Model login expired on the gateway for claude-cli. Re-auth with `claude auth login`, then refresh OpenClaw's CLI auth profile with `openclaw models auth login --provider anthropic --method cli`, then try again.",
7665
+
);
7666
+
});
7667
+
7668
+
it("preserves active profile flags in Claude CLI OAuth reauth guidance",async()=>{
7669
+
vi.stubEnv("OPENCLAW_PROFILE","work");
7670
+
try{
7671
+
state.runEmbeddedAgentMock.mockRejectedValueOnce(
7672
+
newFailoverError(
7673
+
"Failed to authenticate. API Error: 401 Invalid authentication credentials",
? "⚠️ Model login expired on the gateway for claude-cli."
965
+
: "⚠️ Model login failed on the gateway for claude-cli.";
966
+
return{
967
+
text: `${text} Re-auth with \`${CLAUDE_CLI_LOCAL_AUTH_COMMAND}\`, then refresh OpenClaw's CLI auth profile with \`${openClawAuthCommand}\`, then try again.`,
? "Send `/login codex` from a private chat or Web UI session to pair a new Codex login, or re-auth"
979
+
: "Re-auth";
980
+
constretryLoginHint=supportsCodexLogin
981
+
? "send `/login codex` from a private chat or Web UI session to pair a new Codex login, or re-auth"
982
+
: "re-auth";
983
+
if(oauthRefreshFailure.reason){
984
+
return{
985
+
text: `⚠️ Model login expired on the gateway${providerText}. ${channelLoginHint} with ${loginCommandMarkdown} in a terminal, then try again.`,
986
+
isGenericRunnerFailure: false,
987
+
};
988
+
}
989
+
return{
990
+
text: `⚠️ Model login failed on the gateway${providerText}. Please try again. If this keeps happening, ${retryLoginHint} with ${loginCommandMarkdown} in a terminal.`,
? "Send `/login codex` from a private chat or Web UI session to pair a new Codex login, or re-auth"
995
-
: "Re-auth";
996
-
constretryLoginHint=supportsCodexLogin
997
-
? "send `/login codex` from a private chat or Web UI session to pair a new Codex login, or re-auth"
998
-
: "re-auth";
999
-
if(oauthRefreshFailure.reason){
1000
-
return{
1001
-
text: `⚠️ Model login expired on the gateway${providerText}. ${channelLoginHint} with ${loginCommandMarkdown} in a terminal, then try again.`,
1002
-
isGenericRunnerFailure: false,
1003
-
};
1004
-
}
1005
-
return{
1006
-
text: `⚠️ Model login failed on the gateway${providerText}. Please try again. If this keeps happening, ${retryLoginHint} with ${loginCommandMarkdown} in a terminal.`,
0 commit comments