/** * BedrockCacheStrategy — model-aware strategy for AWS Bedrock. * * Bedrock hosts multiple model families. Cache support varies: * - Claude on Bedrock → identical mechanics to direct Anthropic * (`cache_control: { type: 'ephemeral' }` markers, 4-marker * limit). Strategy delegates to Anthropic-shaped behavior. * - Llama / Mistral / Cohere on Bedrock → no cache support today * (as of 2026-04-30). Strategy passes through, returns no metrics. * * Auto-detection: inspects `req.model` to decide. Claude model IDs * start with `'anthropic.claude'` on Bedrock (e.g., * `anthropic.claude-3-5-sonnet-20240620-v1:0`). * * Auto-registers under provider name `'bedrock'`. * * Per the Phase 1 review (Reviewer 6 — Provider SDK expert): for * non-Claude Bedrock models the strategy reports `enabled: false` in * its capabilities so the CacheDecision subflow can short-circuit * marker emission (potential v2.7 optimization). Today markers still * emit and we drop them silently in prepareRequest. */ import type { CacheCapabilities, CacheMarker, CacheMetrics, CacheStrategy, CacheStrategyContext } from '../types.js'; import type { LLMRequest } from '../../adapters/types.js'; export declare class BedrockCacheStrategy implements CacheStrategy { readonly providerName = "bedrock"; readonly capabilities: CacheCapabilities; prepareRequest(req: LLMRequest, candidates: readonly CacheMarker[], ctx: CacheStrategyContext): Promise<{ readonly request: LLMRequest; readonly markersApplied: readonly CacheMarker[]; }>; extractMetrics(usage: unknown): CacheMetrics | undefined; }