Skip to content

feat: add prompt caching support for OpenRouter provider#76

Open
danny-avila wants to merge 1 commit intomainfrom
claude/objective-ramanujan
Open

feat: add prompt caching support for OpenRouter provider#76
danny-avila wants to merge 1 commit intomainfrom
claude/objective-ramanujan

Conversation

@danny-avila
Copy link
Copy Markdown
Owner

OpenRouter uses the same cache_control format as Anthropic's native API, so reuse addCacheControl() for cache breakpoint insertion. Also map cache_write_tokens to cache_creation in usage metrics.

OpenRouter uses the same cache_control format as Anthropic's native API,
so reuse addCacheControl() for cache breakpoint insertion. Also map
cache_write_tokens to cache_creation in usage metrics.
@danny-avila
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dvejsada
Copy link
Copy Markdown

@danny-avila Dou you think this can be merged anytime soon? Currently Gemini models are slow as hell on Openrouter and cost of Anthropic models without caching is huge (as our use case requires a lot of tool calls). Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants