Conversation
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…3/4) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ase 4/4) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Checklist
roborev review --branchor/roborev-review-branchin Claude Code (internal)Note
Medium Risk
Adds new provider adapters and changes LLM cache key computation/entry shape to support multimodal content blocks, which could affect cache hit rates and compatibility for existing consumers.
Overview
Adds multi-provider, multimodal LLM caching to
@betterdb/agent-cache(v0.3.0). Introduces new adapters foropenai(Chat Completions),openai-responses,anthropic(Messages), andllamaindex, each normalizing provider-specific inputs into a shared canonicalLlmCacheParamsformat.Extends cache key + storage model for richer responses.
llmCacheHashnow includes additional request fields (toolChoice,seed,stop,responseFormat,reasoningEffort,promptCacheKey) and new exportedContentBlocktypes; the LLM tier addsstoreMultipart()to persist structuredcontentBlockswhile still flattening text into the legacyresponsefield, andcheck()can now returncontentBlockswhen present.Adds pluggable binary normalization and examples/tests. Introduces
BinaryNormalizerutilities (hashBase64,hashUrl,fetchAndHash,composeNormalizer, etc.), adds example apps for OpenAI/Anthropic/LlamaIndex, expands unit tests/snapshots for adapter normalization and cross-provider hash parity, and updates the release workflow to verify the newly built adapter artifacts.Reviewed by Cursor Bugbot for commit 9faff5c. Bugbot is set up for automated code reviews on this repo. Configure here.