Plugin SDK: split provider auth login seam

This commit is contained in:
Vincent Koc
2026-03-18 02:03:47 -07:00
parent 1890089f49
commit d8a1ad0f0d
7 changed files with 17 additions and 10 deletions

View File

@@ -2,11 +2,11 @@ import { definePluginEntry } from "openclaw/plugin-sdk/core";
import {
buildOauthProviderAuthResult,
createProviderApiKeyAuthMethod,
loginChutes,
resolveOAuthApiKeyMarker,
type ProviderAuthContext,
type ProviderAuthResult,
} from "openclaw/plugin-sdk/provider-auth";
import { loginChutes } from "openclaw/plugin-sdk/provider-auth-login";
import {
CHUTES_DEFAULT_MODEL_REF,
applyChutesApiKeyConfig,

View File

@@ -5,7 +5,8 @@ import {
type ProviderResolveDynamicModelContext,
type ProviderRuntimeModel,
} from "openclaw/plugin-sdk/core";
import { coerceSecretRef, githubCopilotLoginCommand } from "openclaw/plugin-sdk/provider-auth";
import { coerceSecretRef } from "openclaw/plugin-sdk/provider-auth";
import { githubCopilotLoginCommand } from "openclaw/plugin-sdk/provider-auth-login";
import { normalizeModelCompat } from "openclaw/plugin-sdk/provider-models";
import { DEFAULT_COPILOT_API_BASE_URL, resolveCopilotApiToken } from "./token.js";
import { fetchCopilotUsage } from "./usage.js";

View File

@@ -9,9 +9,9 @@ import {
CODEX_CLI_PROFILE_ID,
ensureAuthProfileStore,
listProfilesForProvider,
loginOpenAICodexOAuth,
type OAuthCredential,
} from "openclaw/plugin-sdk/provider-auth";
import { loginOpenAICodexOAuth } from "openclaw/plugin-sdk/provider-auth-login";
import {
DEFAULT_CONTEXT_TOKENS,
normalizeModelCompat,