import { type ModelProviderConfig, type PeaksConfig } from './config-types.js'; /** * `STRONGEST_MODEL_ID = 'claude-opus-4-7'` constant (removed) with a dynamic * resolver. The strongest planner/reviewer model is now derived * from the active config instead of being hardcoded to a specific * vendor. This unlocks running peaks-loop under non-Claude IDEs * (z-code, Cursor, Trae, ...). * * Resolution order: * 1. Explicit `config.model` (user override via `peaks config set model ...`) * 2. Stable fallback for back-compat (env-var override; defaults to * `claude-opus-4-7` so legacy fixtures keep compiling per * SC §3.4 strategy A) * * Vendor-neutrality note: the default `'claude-opus-4-7'` is a * *back-compat fallback*, NOT a hardcoded "the strongest model is * always Claude" assumption. Production callers should set * `config.model` (or override the env var) to declare their strongest * model. Adapter-level runtime probing is wired in Slice C * (`getStrongestModelIdAsync` below). */ export declare function getStrongestModelId(config?: { model?: unknown; }): string; /** * of `getStrongestModelId`. Same precedence for layers 1 + 2, but * layer 2.5 is the IDE's runtime probe (`detectCurrentIdeModel`) * which is consulted BEFORE the env-var back-compat fallback. * * Why this exists: * - `rd-service.buildPlan` (and other sync callers) still call the * sync `getStrongestModelId` — we do NOT change those signatures. * - New async callers (the future Slice C-extension of * `workflow-router-service`, plus any LLM-inside-z-code path) * resolve the strongest model from the IDE's actual state, * without forcing the user to set `config.model`. * * Resolution order: * 1. Explicit `config.model`. * 2. `PEAKS_STRONGEST_MODEL_DEFAULT` env var override. * 3. Runtime probe via `detectCurrentIdeModel()` (only when the * registered IDE adapter opts in via `detectCurrentModel?` — * only `zcode` does in Slice C; other IDEs skip this layer). * 4. Hardcoded back-compat default `'claude-opus-4-7'`. * * Each layer is isolated so a failure in the probe does not break * the resolver. */ export declare function getStrongestModelIdAsync(config?: { model?: unknown; }, runtimeProbeDisabled?: boolean): Promise; export declare function getConfiguredExecutionModelId(providers: ModelProviderConfig | undefined): string; /** * Lives next to its throw site so a downstream `instanceof` check survives * any tree-shaking. CLI catch sites map this to the `INVALID_PROVIDERS` * envelope code via `_cli-error-envelope.mapServiceError`. */ export declare class ProviderNotConfiguredError extends Error { constructor(message?: string); } export declare function getEconomyAwareExecutionModelId(config: Pick & { model?: string; }): string;