import { type CredentialValueSource, type JsonObject, type ModelConfig } from "@arnilo/prism"; export interface KimiModelConfig extends Omit { readonly provider?: "kimi-coding" | "moonshot"; readonly compat?: JsonObject & { readonly route?: "anthropic" | "openai"; readonly preserveThinking?: boolean; /** Official K2.x `thinking` object (`type`, optional `keep`). */ readonly thinking?: boolean | JsonObject; /** Official K3 `reasoning_effort` (`"low"`/`"high"`/`"max"`; Open Platform default `"max"`, Coding default `"high"`). */ readonly reasoning_effort?: string; }; } export interface ListKimiModelsOptions { readonly apiKey?: CredentialValueSource; readonly fetch?: typeof fetch; /** Defaults to Open Platform `https://api.moonshot.ai/v1` (also supports `api.moonshot.cn/v1`). */ readonly baseUrl?: string; readonly signal?: AbortSignal; readonly headers?: Readonly>; /** Defaults to `"moonshot"`. */ readonly provider?: "moonshot" | string; } /** * Official Moonshot / Kimi Open Platform `GET /v1/models` entry. * @see https://platform.kimi.ai/docs/api/list-models */ export interface KimiModelEntry { readonly id: string; readonly object?: string; readonly created?: number; readonly owned_by?: string; readonly context_length?: number; readonly supports_image_in?: boolean; readonly supports_video_in?: boolean; readonly supports_reasoning?: boolean; } export declare function defineKimiModel(config: KimiModelConfig): ModelConfig; /** * Caller-gated Moonshot Open Platform model discovery via official `GET /v1/models`. * Never invoked by `createKimiProviderPackage` — hosts call this and pass results via * `moonshotModels:` / `models:` (or register themselves). * Kimi For Coding (`api.kimi.com/coding`) has no public list API; use featured * `kimiCodingModels` (official Coding ids) as offline bootstrap. * @see https://platform.kimi.ai/docs/api/list-models */ export declare function listKimiModels(options?: ListKimiModelsOptions): Promise; /** * Map an official Moonshot `/v1/models` entry to Prism `ModelConfig`. * Open Platform models use Chat Completions (`compat.route: "openai"`). */ export declare function mapKimiModel(entry: KimiModelEntry, options?: { readonly provider?: string; }): ModelConfig; /** * Featured Kimi For Coding offline bootstrap aliases — official Coding model ids * from https://www.kimi.com/code/docs/en/kimi-code/models (not Pi's `k2p7` alias). * Refresh Open Platform catalogs via `listKimiModels()`. */ export declare const kimiCodingModels: readonly [ModelConfig, ModelConfig, ModelConfig]; /** * Featured Moonshot Open Platform offline bootstrap aliases — official Open Platform * ids from https://platform.kimi.ai/docs/models. Callable via `createMoonshotProvider` * when `includeMoonshotModels: true`. Refresh via `listKimiModels()`. */ export declare const moonshotKimiModels: readonly [ModelConfig, ModelConfig, ModelConfig, ModelConfig, ModelConfig];