/** * Tier shape and constants — tier→model selection lives in ./profiles.ts. * * Claude picks the tier by picking the tool. Tools declare their tier; * resolveTier() turns a Tier into the concrete model name from a TierConfig, * which comes from the active Profile. */ export type Tier = "instant" | "workhorse" | "deep" | "embed"; export interface TierConfig { instant: string; workhorse: string; deep: string; embed: string; /** * Per-tier `num_ctx` (Ollama context window) override (added v2.4.0). * * When a tier's `num_ctx` is set, the MCP server explicitly sends * `options.num_ctx = ` on every generate call routed to that * tier — both the initial attempt and any fallback. When a tier's * `num_ctx` is unset (or this whole map is undefined), the request * options block omits `num_ctx` entirely and Ollama falls back to its * model-loaded default. The "absent when unset" branch is what * preserves v2.3.0 backward-compat. * * Operational driver: hermes3:8b at 32K context on RTX 5080 16GB VRAM * spills to CPU and kills workhorse tool latency. The dev-rtx5080 * profile lowers workhorse/instant to 8192/4096 so the model stays * resident in VRAM; deep remains unset so long-context briefs keep * current behavior. M5 Max has no spill problem (128GB unified) so all * tiers stay unset there. * * Scope guard: this is profile-level only. There is intentionally no * per-call `num_ctx` override on tool inputs in v2.4.0 — operators * tune by switching profiles or pinning a tier via env override. */ num_ctx?: { instant?: number; workhorse?: number; deep?: number; embed?: number; }; } export declare function resolveTier(tier: Tier, config: TierConfig): string; /** * Resolve the per-tier `num_ctx` value for the active tier, if the profile * sets one. Returns undefined when the tier is unset — callers MUST then * omit the `num_ctx` field from the Ollama options block entirely, so * Ollama uses its model-loaded default. v2.3.0 backward-compat depends on * the "absent when unset" contract; never substitute a fake default value. */ export declare function resolveNumCtx(tier: Tier, config: TierConfig): number | undefined; /** * Per-tier timeouts in ms. Used by guardrails/timeouts.ts to enforce * degradation rules and decide fallback behavior. */ export declare const TIER_TIMEOUT_MS: Record; /** * Fallback tier — what to degrade to when a tier's timeout fires. * Deep → workhorse → instant. Embed has no fallback (no cheaper embed tier). */ export declare const TIER_FALLBACK: Record; /** * Default temperatures by work shape. * * Calibrated for Qwen 3 (supported alongside default hermes3:8b). Qwen 3 * has a documented regression vs Qwen 2.5: greedy decoding (temp 0) * degrades quality — the official model cards publish minimum-safe defaults, * which is why classify/extract/triage now floor at 0.2 instead of 0.1 and * never hit zero. hermes3:8b tolerates the higher floors without loss. * * Thinking vs non-thinking mode is controlled by THINK_BY_SHAPE below plus * the per-call `think` field on GenerateRequest. Non-thinking models * (hermes3:8b) ignore `think`, so the same table works on both ladders. * * Upstream reference: Qwen3 HF card recommends Temperature=0.7 / TopP=0.8 * (non-thinking) and Temperature=0.6 / TopP=0.95 (thinking). The * structured-JSON shapes here stay cooler than the card defaults — small * models producing strict schema need less entropy — but never greedy. */ export declare const TEMPERATURE_BY_SHAPE: { readonly classify: 0.2; readonly extract: 0.2; readonly triage: 0.2; readonly summarize: 0.3; readonly research: 0.6; readonly draft: 0.6; readonly chat: 0.7; }; /** * Sampler defaults keyed to Qwen3 official guidance. Apply alongside * TEMPERATURE_BY_SHAPE when the tool constructs its options block. * hermes3:8b applies these without issue. */ export declare const TOP_P_BY_MODE: { readonly non_thinking: 0.8; readonly thinking: 0.95; }; /** * Thinking-mode by work shape. * * Load-bearing for Qwen 3 on Ollama. When `think=true` and the model is a * reasoning model, CoT content is emitted into the response's `thinking` * field AND consumes num_predict budget. For short-output tasks (classify, * extract, triage, short summaries) that budget is tight — a thinking * model can burn the entire num_predict on CoT and return an empty * `response`. The prompt-level `/no_think` soft-switch does NOT work on * Ollama — only the API field `think` does. * * Research / briefs / drafts get think=true: they benefit from CoT, and * their num_predict is sized for reasoning + response together. * * Non-thinking models (hermes3:8b) silently ignore the field, so declaring * it still costs nothing on the default ladder. */ export declare const THINK_BY_SHAPE: { readonly classify: false; readonly extract: false; readonly triage: false; readonly summarize: false; readonly research: true; readonly draft: false; readonly chat: false; }; //# sourceMappingURL=tiers.d.ts.map