import { type ModelSelectorValue } from "./model-selector-value"; import type { GJC_MODEL_ASSIGNMENT_TARGET_IDS, ModelsConfig } from "./models-config-schema"; export type ModelProfileRole = (typeof GJC_MODEL_ASSIGNMENT_TARGET_IDS)[number]; export interface ModelProfileDefinition { name: string; requiredProviders: string[]; displayName?: string; /** * Optional groups of providers that are interchangeable fallbacks. * Each group is an array of provider ids where at least one must be * authenticated. Providers NOT in any group are treated as strict * requirements (all must be authenticated). * * Example: `[["xiaomi", "xiaomi-token-plan-sgp", "xiaomi-token-plan-ams", "xiaomi-token-plan-cn"]]` * means any single xiaomi credential satisfies the group. */ alternativeProviderGroups?: readonly (readonly string[])[]; modelMapping: Partial>; source: "builtin" | "user"; } export interface ResolvedProfileBinding { defaultSelector?: ModelSelectorValue; modelRoles: Record; agentModelOverrides: Partial, ModelSelectorValue>>; } export declare function deriveModelProfileMappedProviders(definition: Pick): string[]; /** * Return the providers explicitly declared as hard prerequisites. * Model mappings may reference fallback providers, but those references are * resolution-time candidates rather than activation requirements. */ export declare function aggregateModelProfileRequiredProviders(requiredProviders: readonly string[], _definition: Pick): string[]; export declare const BUILTIN_MODEL_PROFILES: readonly ModelProfileDefinition[]; /** * Providers that built-in model presets pin via qualified `/` * selectors. When `modelProfile.proxyProvider` is set, selectors for these * providers are rewritten to `/` at activation time when their * direct provider is unauthenticated, or unconditionally when * `modelProfile.proxyMode` is `always`. Bare-alias (open-weights) profiles are * not included: they already resolve through any authenticated provider, * including a configured proxy. */ export declare const PROXY_ROUTABLE_PROVIDER_IDS: ReadonlySet; export interface ModelProfilePresentation { displayName: string; providerGroup: string; } export declare function getModelProfilePresentation(profile: string | Pick): ModelProfilePresentation; export declare function formatModelProfileDisplayLabel(profile: Pick): string; export declare function groupModelProfilesForPresetLanding(profiles: ReadonlyMap): Map; export declare function recommendModelProfileForProvider(providerId: string, profiles: ReadonlyMap): ModelProfileDefinition | undefined; export declare function mergeModelProfiles(userProfiles?: ModelsConfig["profiles"]): Map; export declare function resolveProfileBindings(definition: ModelProfileDefinition): ResolvedProfileBinding; export declare function formatAvailableProfileNames(profiles: ReadonlyMap): string;