fix(models): use synthetic auth expiry for status

This commit is contained in:
Ayaan Zaidi
2026-04-26 08:50:55 +05:30
parent ad27e0069d
commit 76dc66f5fa
7 changed files with 141 additions and 61 deletions

View File

@@ -306,6 +306,7 @@ describe("anthropic provider replay hooks", () => {
apiKey: "access-token",
source: "Claude CLI native auth",
mode: "oauth",
expiresAt: 123,
});
expect(readClaudeCliCredentialsForRuntimeMock).toHaveBeenCalledTimes(1);
});
@@ -329,6 +330,7 @@ describe("anthropic provider replay hooks", () => {
apiKey: "bearer-token",
source: "Claude CLI native auth",
mode: "token",
expiresAt: 123,
});
});

View File

@@ -414,11 +414,13 @@ function resolveClaudeCliSyntheticAuth() {
apiKey: credential.access,
source: "Claude CLI native auth",
mode: "oauth" as const,
expiresAt: credential.expires,
}
: {
apiKey: credential.token,
source: "Claude CLI native auth",
mode: "token" as const,
expiresAt: credential.expires,
};
}