/** * Provider auth resolution extracted from model-auth.ts. * * Resolves API keys for providers via auth profiles, environment variables, * and AWS SDK credential chains. Used by media-understanding, onboarding, * and status display. */ import type { RemoteClawConfig } from "../config/config.js"; import { type AuthProfileStore } from "./index.js"; export { ensureAuthProfileStore } from "./index.js"; export declare function resolveAwsSdkEnvVarName(env?: NodeJS.ProcessEnv): string | undefined; export type ResolvedProviderAuth = { apiKey?: string; profileId?: string; source: string; mode: "api-key"; }; export declare function resolveApiKeyForProvider(params: { provider: string; cfg?: RemoteClawConfig; profileId?: string; preferredProfile?: string; store?: AuthProfileStore; }): Promise; export type EnvApiKeyResult = { apiKey: string; source: string; }; export type ModelAuthMode = "api-key" | "unknown"; export declare function resolveEnvApiKey(provider: string): EnvApiKeyResult | null; export declare function resolveModelAuthMode(provider?: string, cfg?: RemoteClawConfig, store?: AuthProfileStore): ModelAuthMode | undefined; export declare function requireApiKey(auth: ResolvedProviderAuth, provider: string): string;