-
Notifications
You must be signed in to change notification settings - Fork 15
feat: context caching #377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/add-tracing
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…into feat/support-caching
…ags, and refactor the project card component to display these new properties.
Adk showcase
MarvelNwachukwu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: PR isn't merging to main
It's synced with tracing, thanks for the note 🙏. Good catch |
packages/adk/src/models/ai-sdk.ts
Outdated
| const tools = this.convertToAiSdkTools(request); | ||
|
|
||
| const requestParams = { | ||
| const requestParams: any = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Any progress on this? so far i can only see this is implemented for just gemini models... also for AI sdk does it accept cache config for other models? |
No, I think context caching is limited to Gemini models. I added support in the AI SDK so that it accepts a cache configuration name: https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai#explicit-caching |
Closes #371
Description
This PR introduces context caching support for Gemini models to improve performance and reduce API costs for repeated contexts.
Key Implementation Details
GeminiContextCacheManagerwith cache fingerprinting, TTL management, and automatic cache lifecycle handling.Type of Change
How Has This Been Tested?
Checklist
Additional Notes
GeminiContextCacheManagerreduces redundant API calls by reusing existing context data.