export type AuthMethod = "oauth" | "apikey"; /** * One API-key option for a provider that splits auth across multiple distinct * endpoints/credentials (currently only Xiaomi: Token Plan vs. API Credits). * Each variant stores under its own auth.json key so a user can hold both at * once — the model registry picks which one a given model resolves via * `getAuthStorageKeys()`. */ export interface ApiKeyVariant { /** Storage key in auth.json (distinct from `value` when multiple variants exist). */ key: string; /** Display label, e.g. "Token Plan" or "API Credits". */ label: string; /** Base URL stored alongside this variant's credential. */ baseUrl?: string; } export interface AuthProviderMeta { /** Stable provider id (matches the gg-ai Provider union, plus storage keys). */ value: string; /** Display name shown in the login list. */ label: string; /** One-line model summary. */ description: string; /** Supported auth methods, in preferred order (oauth first when both). */ methods: AuthMethod[]; /** Friendly label for the API key field (e.g. "Z.AI"). */ apiKeyLabel?: string; /** Fixed base URL stored alongside an API key (e.g. Xiaomi's token plan). */ apiKeyBaseUrl?: string; /** * When a provider's API-key auth splits across multiple endpoints, the * choices to present (in order). The first variant is the default. Absent * for every provider with a single API-key credential. */ apiKeyVariants?: ApiKeyVariant[]; /** * Per-method guidance overrides. Only providers whose methods differ in * billing/entitlement (the dual-auth ones) need these; everything else is * described generically by {@link describeAuthMethods}. */ methodDetails?: Partial>; } /** * What one auth method means for a provider, so both UIs can answer "which do I * pick?" without hardcoding provider knowledge in a component. */ export interface AuthMethodMeta { method: AuthMethod; /** Button/row label, e.g. "Sign in with Grok (SuperGrok / X Premium)". */ label: string; /** What the user spends on this method. */ billing: string; /** When to choose it. */ when: string; /** Prerequisite the user must already have, if any. */ requires?: string; } export declare const AUTH_PROVIDERS: AuthProviderMeta[]; export declare function getAuthProvider(value: string): AuthProviderMeta | undefined; /** * Per-method guidance for a provider, in resolution order. Providers with a * single method get a generic description; the dual-auth ones (Kimi, Grok) carry * explicit `methodDetails` because the choice changes what the user is billed. */ export declare function describeAuthMethods(provider: string): AuthMethodMeta[]; /** * How the runtime picks between two connected methods, phrased for the UI. Only * dual-auth providers have a choice to explain; everything else returns * undefined so callers can omit the note entirely. * * Keep this wording in sync with AuthStorage's actual resolution order in * gg-core (`DUAL_AUTH_PROVIDERS`) — it is the user-facing description of it. */ export declare function authPriorityNote(provider: string): string | undefined; //# sourceMappingURL=auth-providers.d.ts.map