import type { Backend } from "./modelBackend.js"; import type { ModelKind } from "./modelKind.js"; /** The built-in model catalog: every entry `agency local list` shows * without a download, with its backend, size, and license. */ /** The one field a catalog entry used to carry for both what a model * returns and what it is good for. Split into `kind` and `tags`. Still * read, from a remote catalog or an alias written before the split, and * mapped by `kindOfCategory` and `tagsOfCategory` in `localModels.ts`. */ export type ModelCategory = "general" | "coding" | "reasoning" | "writing" | "science" | "uncensored" | "embedding" | "speech" | "image"; /** What a chat model is good for. Free-form words for the list and the * picker, never for routing; the kind does that. */ export type ModelTag = string; export type ModelInfo = { /** Which engine runs the model. Required; must agree with `uri`. */ backend: Backend; /** For llama-cpp, an `hf:` URI passed to `node-llama-cpp`'s * `resolveModelFile`. For mlx, an `mlx:` URI naming a Hugging Face repo. */ uri: string; /** Human-readable parameter count, e.g. "1.7B" or "70B". */ params: string; /** Approximate download size in bytes: the Q4_K_M file, or the whole * MLX repo at whatever quantization the entry names. */ sizeBytes: number; /** What the model takes and returns. Decides which server runs it. */ kind: ModelKind; /** What it is good for: "coding", "reasoning", "uncensored". Empty for a * general chat model and for every model that is not a chat model. */ tags: ModelTag[]; /** One-line "what is it good for" — shown by `agency local alias list`. */ description: string; /** Native context window in tokens. For an image model, the longest * prompt its text encoder reads, in tokens; a longer one is cut off. */ contextWindow: number; /** License identifier (SPDX-ish). Curated entries are permissive only * (apache-2.0 / mit); restrictively-licensed models (older Gemma's custom * terms, llama) are intentionally excluded. Gemma 4 ships under apache-2.0, * so it qualifies; Gemma 1–3 did not. * * This must be the license the model itself DECLARES, never one inferred * from its base model. Apache-2.0 is permissive, not copyleft — its §4 lets * a derivative work carry different terms — so a fine-tune of an * apache-2.0 base is not thereby apache-2.0. A model whose card declares no * license (the Dolphin 3.0 Mistral fine-tunes, for one) does not belong * here at all; add it locally with `agency local alias add` instead. */ license: string; /** Pinned content SHA-256 (hex) of the resolved single-file GGUF, used to * verify the download. Absent for sharded models (see issue #348). */ sha256?: string; /** Other repos this model loads by name at runtime, as mlx: URIs. * `agency local download` fetches them after the model into the same * layout. The speech server finds them by repo id. */ companions?: string[]; /** How the model card says to sample: the temperature, and the top-p * and top-k cut-offs on the tokens it may pick from. A call that names * no temperature gets these on a local backend (see `withLocalDefaults`). * An entry without them gets Agency's own local default. */ sampling?: Sampling; }; /** Sampling settings from a model card. `temperature` is required because * a card that says anything says that; the cut-offs are optional. */ export type Sampling = { temperature: number; topP?: number; topK?: number; }; /** Curated short-name → ModelInfo catalog. Permissive licenses only * (apache-2.0 / mit). Ordered roughly by size within each grouping. */ export declare const CURATED_LOCAL_MODELS: Record; /** The sampling a model card asks for, by the name a local call carries: * an MLX repo id (`mlx-community/Qwen3.5-9B-4bit`, what the server is * asked for) or the path of a GGUF file downloaded from the catalog. * Undefined for a model the catalog does not know, or one whose entry * names no sampling. */ export declare function localSamplingFor(model: string): Sampling | undefined;