google / google/generative-ai-go
Tools In Context Caching
- Dominant language
- Go
- Stars
- 857
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description

### Description of the bug:
Tools in cached content is not working. If I don't use cached content and declare the tools direct using the example below, my tools work. But if I put the tools inside of cached content (as in the attached image), the model have so many difficulty to call a tool.
Example:
```
model := client.GenerativeModel("gemini-1.5-flash-001")
model.Tools = []*genai.Tool{}
```
The PDF file have 41 pages and I have 17 tools declared, that is returned in g.ToolsDeclarations().
I execute a test, and the tools don't exists in cached content:
Code:

Result:

### Actual vs expected behavior:
_No response_
### Any other information you'd like to share?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.