Caching with 002

When listing models for v1beta api version, “createCachedContent” method is only available within 001 models, both flash and pro.

When this functionality will be rolled out for new 002 models?

2 Likes

Hi @Pavel_Mikhaylov.

Welcome to the forum. I already escalated this to the internal team. Soon, will get the clarity on this.

Thanks.

2 Likes

One of my use cases highly depends on it, thanks!

Similar with flash-8b

Hi! Any updates there?

Hi @Pavel_Mikhaylov . Not yet. We didn’t hear back on this. Will follow up again with the team.

Context caching for the 002 models is supported now. :+1:

4 Likes

Hey Govind, I have been playing with 002 + cache and I noticed that the new search grounding does not work (flash/pro 002 + google search + using cache). 001 + google search + cache is fine for example, and so is 002 + google search or 002 + cache.

Greetings! It seems as if models (e.g. gemini-1.5-flash-002) that support ‘createCachedContent’… won’t support combined ‘createCachedContent’ and function calling.
While models (e.g. gemini-1.5-flash) that don’t support ‘createCachedContent’ seem to have function calling working as expected.
I don’t know if this is expected. But it will be nice if someone can please confirm if ‘createCachedContent’ should or should not work when combined with function calling. Thanks!

Please disregard! I didn’t realize that CachedContent object has it’s own Tools field.

Well upon further inspection, it seems like gemini-1.5-flash-001 is the only one to support ‘createCachedContent’ and Tools (function calling) combined. Can’t get it to work on gemini-1.5-flash-002