Skip to content

Conversation

@sestinj
Copy link
Contributor

@sestinj sestinj commented Oct 5, 2025

Summary by cubic

Add an OpenRouter API adapter with Anthropic prompt caching for Claude models. Defaults to caching system and tools, and adds ephemeral caching to the last two user messages; non-Anthropic models are unchanged.

  • New Features
    • Introduced OpenRouterApi with default base URL and a cachingStrategy option.
    • Applies Anthropic prompt caching for Claude models: caches system and tools per strategy, always adds ephemeral cache_control to the last two user messages, and only the final text block in array content.
    • Switched provider "openrouter" to use OpenRouterApi instead of the generic OpenAI-compatible path.

@sestinj sestinj requested a review from a team as a code owner October 5, 2025 22:15
@sestinj sestinj requested review from tingwai and removed request for a team October 5, 2025 22:15
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Oct 5, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

@sestinj sestinj merged commit 33e39b5 into main Oct 5, 2025
54 of 58 checks passed
@sestinj sestinj deleted the nate/openrouter-prompt-caching branch October 5, 2025 23:09
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs Oct 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2025
@github-actions github-actions bot added the tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys label Oct 5, 2025
@sestinj
Copy link
Contributor Author

sestinj commented Oct 5, 2025

🎉 This PR is included in version 1.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor Author

sestinj commented Oct 6, 2025

🎉 This PR is included in version 1.26.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@sestinj
Copy link
Contributor Author

sestinj commented Oct 15, 2025

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

released size:XL This PR changes 500-999 lines, ignoring generated files. tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants