agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
21 lines • 955 B
JavaScript
/**
* 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).
*/
import { notApplicable } from '../../lib/claim/claim.js';
export class NoOpCacheStrategy {
name = 'none';
async prepareRequest(req, _candidates, _ctx) {
return { request: req, markersApplied: [] };
}
extractMetrics(_usage) {
return 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');
}
}
//# sourceMappingURL=NoOpCacheStrategy.js.map