Skip to content

Disabling cache reads assertion for Google Gemini#1306

Merged
jamesbraza merged 1 commit intomainfrom
fixing-flaky-gemini-caching
Feb 25, 2026
Merged

Disabling cache reads assertion for Google Gemini#1306
jamesbraza merged 1 commit intomainfrom
fixing-flaky-gemini-caching

Conversation

@jamesbraza
Copy link
Copy Markdown
Collaborator

Seen in this CI run:

FAILED tests/test_paperqa.py::test_model_chain[gemini] - AssertionError: Expected subsequent calls to reuse prompt cache

#1293 added prompt caching assertions, but it seems Google Gemini doesn't reliably report cache reads. It could be that the 3-sec delay isn't long enough, or it could be they have bugs. Regardless, I am just disabling this assertion for them since it's not mission critical.

@jamesbraza jamesbraza self-assigned this Feb 25, 2026
Copilot AI review requested due to automatic review settings February 25, 2026 22:18
@jamesbraza jamesbraza added the bug Something isn't working label Feb 25, 2026
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 25, 2026
@dosubot
Copy link
Copy Markdown

dosubot bot commented Feb 25, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Disables a flaky prompt-cache reuse assertion for the Google Gemini provider in the test_model_chain integration test, based on CI instability where Gemini does not reliably report cache read tokens.

Changes:

  • Wrap the warm-cache “cache read tokens” assertion in a provider-specific exception path to avoid failing CI for Gemini.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jamesbraza jamesbraza merged commit 6c1b4fb into main Feb 25, 2026
11 checks passed
@jamesbraza jamesbraza deleted the fixing-flaky-gemini-caching branch February 25, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants