mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 07:57:40 +00:00
fix(anthropic): prefer claude cli over setup-token
This commit is contained in:
@@ -579,7 +579,7 @@ describe("modelsAuthLoginCommand", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("writes pasted Anthropic setup-tokens and logs the legacy warning", async () => {
|
||||
it("writes pasted Anthropic setup-tokens and logs the preference note", async () => {
|
||||
const runtime = createRuntime();
|
||||
mocks.clackText.mockResolvedValue(`sk-ant-oat01-${"a".repeat(80)}`);
|
||||
|
||||
@@ -595,7 +595,10 @@ describe("modelsAuthLoginCommand", () => {
|
||||
agentDir: "/tmp/openclaw/agents/main",
|
||||
});
|
||||
expect(runtime.log).toHaveBeenCalledWith(
|
||||
"Anthropic setup-token auth is a legacy/manual path in OpenClaw.",
|
||||
"Anthropic setup-token auth is supported in OpenClaw.",
|
||||
);
|
||||
expect(runtime.log).toHaveBeenCalledWith(
|
||||
"OpenClaw prefers Claude CLI reuse when it is available on the host.",
|
||||
);
|
||||
expect(runtime.log).toHaveBeenCalledWith(
|
||||
"Anthropic staff told us this OpenClaw path is allowed again.",
|
||||
|
||||
@@ -420,7 +420,8 @@ export async function modelsAuthPasteTokenCommand(
|
||||
logConfigUpdated(runtime);
|
||||
runtime.log(`Auth profile: ${profileId} (${provider}/token)`);
|
||||
if (provider === "anthropic") {
|
||||
runtime.log("Anthropic setup-token auth is a legacy/manual path in OpenClaw.");
|
||||
runtime.log("Anthropic setup-token auth is supported in OpenClaw.");
|
||||
runtime.log("OpenClaw prefers Claude CLI reuse when it is available on the host.");
|
||||
runtime.log("Anthropic staff told us this OpenClaw path is allowed again.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user