Revert "Remove Anthropic OAuth support"

This reverts commit f5e6bcac1b.
This commit is contained in:
Mario Zechner 2026-01-09 06:00:20 +01:00
parent f745321169
commit 19b5663340
10 changed files with 159 additions and 84 deletions

View file

@ -9,6 +9,8 @@
* - Antigravity (Gemini 3, Claude, GPT-OSS via Google Cloud)
*/
// Anthropic
export { loginAnthropic, refreshAnthropicToken } from "./anthropic.js";
// GitHub Copilot
export {
getGitHubCopilotBaseUrl,
@ -38,6 +40,7 @@ export * from "./types.js";
// High-level API
// ============================================================================
import { refreshAnthropicToken } from "./anthropic.js";
import { refreshGitHubCopilotToken } from "./github-copilot.js";
import { refreshAntigravityToken } from "./google-antigravity.js";
import { refreshGoogleCloudToken } from "./google-gemini-cli.js";
@ -59,6 +62,9 @@ export async function refreshOAuthToken(
let newCredentials: OAuthCredentials;
switch (provider) {
case "anthropic":
newCredentials = await refreshAnthropicToken(credentials.refresh);
break;
case "github-copilot":
newCredentials = await refreshGitHubCopilotToken(credentials.refresh, credentials.enterpriseUrl);
break;
@ -122,6 +128,11 @@ export async function getOAuthApiKey(
*/
export function getOAuthProviders(): OAuthProviderInfo[] {
return [
{
id: "anthropic",
name: "Anthropic (Claude Pro/Max)",
available: true,
},
{
id: "openai-codex",
name: "ChatGPT Plus/Pro (Codex Subscription)",