🚀 Feature Proposal: Add Prompt Caching Compatibility for OpenAI-Compatible Providers #2416
andrewgmercader
started this conversation in
1. Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
The current code works perfectly with OpenAI-compatible APIs (see example below).
It would be a simple and valuable improvement to add prompt caching compatibility for OpenAI-compatible providers, allowing for more efficient and cost-effective usage.
Note: The Kilo Code developers are the ones who best know where caching could be implemented in the codebase, so integrating this feature should be quite straightforward in principle.
Example Code (with mocked key and URL)
Motivation
Proposed Solution
cache_control
parameter to the message schema, as shown above.Implementation Notes
extra_body={}
.cache_control
field is ignored by the OpenAI SDK but can be used by compatible providers or custom gateways.Additional Context
Beta Was this translation helpful? Give feedback.
All reactions