Skip to content

Feature/agent cache adding OpenAI anthropic llamaindex adapters#116

Merged
KIvanow merged 13 commits intomasterfrom
feature/agent-cache-adding-openai-anthropic-llamaindex-adapters
Apr 20, 2026
Merged

Feature/agent cache adding OpenAI anthropic llamaindex adapters#116
KIvanow merged 13 commits intomasterfrom
feature/agent-cache-adding-openai-anthropic-llamaindex-adapters

Conversation

@KIvanow
Copy link
Copy Markdown
Member

@KIvanow KIvanow commented Apr 20, 2026

Summary

Changes

Checklist

  • Unit / integration tests added
  • Docs added / updated
  • Roborev review passed — run roborev review --branch or /roborev-review-branch in Claude Code (internal)
  • Competitive analysis done / discussed (internal)
  • Blog post about it discussed (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 for openai (Chat Completions), openai-responses, anthropic (Messages), and llamaindex, each normalizing provider-specific inputs into a shared canonical LlmCacheParams format.

Extends cache key + storage model for richer responses. llmCacheHash now includes additional request fields (toolChoice, seed, stop, responseFormat, reasoningEffort, promptCacheKey) and new exported ContentBlock types; the LLM tier adds storeMultipart() to persist structured contentBlocks while still flattening text into the legacy response field, and check() can now return contentBlocks when present.

Adds pluggable binary normalization and examples/tests. Introduces BinaryNormalizer utilities (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.

@KIvanow KIvanow merged commit e74fbf0 into master Apr 20, 2026
3 checks passed
@KIvanow KIvanow deleted the feature/agent-cache-adding-openai-anthropic-llamaindex-adapters branch April 20, 2026 19:07
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant