export type LlmPresetKey = 'deepseek' | 'moonshot' | 'zhipu' | 'mimo' | 'custom'; export interface LlmPresetDef { key: LlmPresetKey; /** Human label for CLI lists (Web uses i18n keys). */ label: string; provider: 'openai-compat' | 'anthropic'; baseUrl: string; /** Primary model for Agim Agent (native-chat). */ model: string; /** Optional cheaper model for cheap / evaluator roles. */ cheapModel?: string; /** * All models to register under one API key on quick-enable. * Defaults to `[model, cheapModel?]` when omitted. */ models?: readonly string[]; /** Suggested backend name stem (unique-ified by callers). */ baseName: string; /** Where operators get an API key. */ apiKeyDoc?: string; /** * Default Agim Agent thinking level when session.variant is auto/empty. * Mapped onto pi-ai ThinkingLevel at runtime (`max` → `xhigh`). */ defaultThinking?: 'off' | 'high' | 'max'; } /** Curated presets. First entry is the Agim Agent default. */ export declare const LLM_PRESETS: readonly LlmPresetDef[]; export declare const DEFAULT_LLM_PRESET: LlmPresetDef; export declare function getLlmPreset(key: string | undefined | null): LlmPresetDef | undefined; /** Models registered for a preset (primary first). */ export declare function presetModels(preset: LlmPresetDef): string[]; /** * Backend name stem for a preset model. * Prefer the model id itself so UI / `/model` switch show the same string * operators already know (e.g. `deepseek-v4-pro`). */ export declare function presetBackendStem(baseName: string, model: string, _index: number): string; export declare function suggestLlmBackendName(base: string, existing: string[]): string; /** Detect DeepSeek endpoints (official + common proxies that keep the hostname). */ export declare function isDeepSeekBaseUrl(baseUrl: string | undefined | null): boolean; /** * Detect Kimi / Moonshot endpoints (China `moonshot.cn` + international * `moonshot.ai`, plus hostnames that keep "kimi"). */ export declare function isKimiBaseUrl(baseUrl: string | undefined | null): boolean; /** Kimi K3 family — always-on thinking via top-level `reasoning_effort`. */ export declare function isKimiK3Model(model: string | undefined | null): boolean; /** * Kimi K2.x family — `thinking: { type: enabled|disabled }` (+ optional keep). * Includes `kimi-k2.5` / `kimi-k2.6` / `kimi-k2.7-code` (+ highspeed). */ export declare function isKimiK2Model(model: string | undefined | null): boolean; export declare function isKimiModel(model: string | undefined | null): boolean; /** * Detect Zhipu / GLM endpoints (China `bigmodel.cn` + international `z.ai`). */ export declare function isZhipuBaseUrl(baseUrl: string | undefined | null): boolean; /** GLM-5.2+ — `thinking.type` + `reasoning_effort` (max/high/…). */ export declare function isGlm52Model(model: string | undefined | null): boolean; /** Any current GLM chat model id (`glm-4.x` / `glm-5…`). */ export declare function isGlmModel(model: string | undefined | null): boolean; /** * Detect Xiaomi MiMo API hosts (pay-as-you-go + Token Plan CN/intl). * See https://mimo.mi.com/docs/zh-CN/quick-start/faq/api-integration */ export declare function isMimoBaseUrl(baseUrl: string | undefined | null): boolean; /** Current MiMo chat models (`mimo-v2.5` / `mimo-v2.5-pro` / UltraSpeed…). */ export declare function isMimoModel(model: string | undefined | null): boolean; /** * Map a baseUrl onto a built-in preset key using vendor host families * (not exact hostname). Used by quick-enable dedupe so intl hosts * (`api.moonshot.ai`, `api.z.ai`, …) collide with the China defaults. * `custom` is never returned. */ export declare function builtinPresetKeyForBaseUrl(baseUrl: string | undefined | null): Exclude | null; /** * Default /think fallback for a backend URL (and optional model id). * DeepSeek / Kimi / GLM / MiMo default to their preset's `defaultThinking`. */ export declare function resolveDefaultThinking(baseUrl: string | undefined | null, model?: string | undefined | null): 'off' | 'high' | 'max'; /** * Map agim session.variant (/think) → pi-ai ThinkingLevel. * DeepSeek / Kimi / GLM / MiMo map xhigh→max; unsupported mid levels stay * as-is for providers that accept them (Kimi K3 / GLM-5.2 support low/high/max). */ export declare function mapVariantToThinkingLevel(variant: string | undefined | null, fallback?: 'off' | 'high' | 'max'): 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'; //# sourceMappingURL=presets.d.ts.map