UNPKG

agentfootprint

Version:

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

25 lines • 1.12 kB
"use strict"; /** * NoOpCacheStrategy — for a provider that declares no prompt caching * (`LLMProvider.promptCaching` absent or undefined for this model): Mock, Ollama, * any adapter that has not said, or an intentional opt-out. * * Returns the request unchanged and reports *not applicable* — never a zero. * Chosen by `cacheStrategyFor` when the declaration is absent; one shared * instance serves every such provider (it holds no state). */ Object.defineProperty(exports, "__esModule", { value: true }); exports.NoOpCacheStrategy = void 0; const claim_js_1 = require("../../lib/claim/claim.js"); class NoOpCacheStrategy { name = 'none'; async prepareRequest(req, _candidates, _ctx) { return { request: req, markersApplied: [] }; } extractMetrics(_usage) { return (0, claim_js_1.notApplicable)('the provider declares no prompt caching for this model (LLMProvider.promptCaching is absent or resolves to undefined), so no ' + 'cache traffic is driven or reported'); } } exports.NoOpCacheStrategy = NoOpCacheStrategy; //# sourceMappingURL=NoOpCacheStrategy.js.map