Commit bf35dcd
authored
fix: remove explicit cache_control for Google models in OpenRouter (RooCodeInc#4487) (RooCodeInc#4488)
* fix: remove explicit cache_control for Google models in OpenRouter (RooCodeInc#4487)
- Remove all Google models from OPEN_ROUTER_PROMPT_CACHING_MODELS set
- This resolves 3+ minute lag when using google/gemini-2.5-pro-preview
- OpenRouter still provides automatic implicit ephemeral caching for these models
- Updated tests to handle intentional exclusion of Google models from explicit caching
Fixes RooCodeInc#4487
* refactor: simplify OpenRouter caching test logic
- Replace hardcoded exclusion list with simple Google model filter
- Keep original validation logic but make it more maintainable
- Still ensures all our caching models are supported by OpenRouter
- Still verifies we exclude all Google models from explicit caching
* cleanup: remove unused excludedModels variable
- Variable was defined but never used
- Keeps the test logic clean and focused
* refactor: only exclude google/gemini-2.5-pro-preview from caching
- More surgical approach - only exclude the specific problematic model
- Keep other Google models in caching (they work fine)
- Add comment explaining the exclusion with issue reference
- Update test to only exclude the specific model
This targets just the model causing 3+ minute lag while preserving
caching benefits for other Google models that work properly.1 parent 736c4b1 commit bf35dcd
File tree
2 files changed
+16
-7
lines changed- packages/types/src/providers
- src/api/providers/fetchers/__tests__
2 files changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
| |||
0 commit comments