UNPKG

agentfootprint

Version:

The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.

34 lines (33 loc) • 1.62 kB
/** * thinkingSupport — `.thinking({ budget })` checked at BUILD against what each * provider declares for the model it will call (`LLMProvider.thinkingMode`). * * Every (provider, model) pair the agent's thinking request can reach is * asked: the declared reliability list (or the agent's own pair), each * per-skill brain, the escalation brain. A * model that cannot think (`'none'`) is refused here, by name, with an * `UnsupportedThinkingError` — rather than on the first call, or on the call * a fallback serves. An `'adaptive'` model takes no budget, and dev mode says * so once per model: configured and silently ignored must not look like * configured and working. * * Not checked here: a model `.configure()` picks at run time. The adapter * asks the same declaration on every request and refuses before sending. */ import type { LLMProvider } from '../../provider-contract/types.js'; import type { FoldedSkillBrains } from './skillBrains.js'; import type { ReliabilityProvider } from '../../reliability/types.js'; /** * Refuse `.thinking()` for any reachable model whose provider declares it * cannot honor thinking for it; dev-warn for one that thinks adaptively (no budget). * * @throws UnsupportedThinkingError (`reason: 'no-thinking'`) * @throws TypeError when a provider's `thinkingMode` declaration is malformed */ export declare function checkThinkingSupport(args: { readonly budget: number; readonly provider: LLMProvider; readonly model: string; readonly brains?: FoldedSkillBrains; readonly reliabilityProviders?: readonly ReliabilityProvider[]; }): void;