1 parent
e65e5f40c9
commit
fe974f420d
23 files changed
+55
-54
No files matched your search
@@ -111,7 +111,7 @@ async function resolveOAuthToken(params: {
|
||||
provider: params.provider,
|
||||
});
|
||||
|
||||
// Claude CLI creds are the only Anthropic tokens that reliably include the
|
||||
// Claude Code CLI creds are the only Anthropic tokens that reliably include the
|
||||
// `user:profile` scope required for the OAuth usage endpoint.
|
||||
const candidates = params.provider === "anthropic" ? [CLAUDE_CLI_PROFILE_ID, ...order] : order;
|
||||
const deduped: string[] = [];
|
||||
|
||||
@@ -126,7 +126,7 @@ export async function fetchClaudeUsage(
|
||||
// ignore parse errors
|
||||
}
|
||||
|
||||
// Claude CLI setup-token yields tokens that can be used for inference, but may not
|
||||
// Claude Code CLI setup-token yields tokens that can be used for inference, but may not
|
||||
// include user:profile scope required by the OAuth usage endpoint. When a claude.ai
|
||||
// browser sessionKey is available, fall back to the web API.
|
||||
if (res.status === 403 && message?.includes("scope requirement user:profile")) {
|
||||
|
||||
Reference in new issue
Block a user