pi-cache-optimizer 2.10.7 → 2.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ last version Pi recorded for this package under "Extension Updates". Pi records
5
5
  it sees this file, so notes start with the update after that.
6
6
  Older history is in the [git log](https://github.com/jiangge/pi-cache-optimizer/commits/master).
7
7
 
8
+ ## [2.10.8] - 2026-11-22
9
+
10
+ ### Fixed
11
+
12
+ - Native virtual models: when several credentialed providers share the routed model id and only some set `compat.promptCacheKeyMode: "disabled"`, the extension no longer adds a `prompt_cache_key` depending on catalog order; such requests are left unchanged. Providers whose mode is `"enabled"`, `"auto"` or unset are still treated alike. Thanks @qsgy-edge (#32).
13
+
8
14
  ## [2.10.7] - 2026-11-21
9
15
 
10
16
  ### Fixed
package/index.ts CHANGED
@@ -1698,6 +1698,10 @@ export default function (pi: ExtensionAPI) {
1698
1698
  promptCacheRetention400Models.has(key),
1699
1699
  anthropicTtlOrderErrorModels.has(key),
1700
1700
  isPromptCacheKeyOmittedForModel(model),
1701
+ // The decision, not the raw compat.promptCacheKeyMode: "enabled",
1702
+ // "auto" and an unset mode all inject, so only "disabled" may split
1703
+ // otherwise-equal candidates (PR #32).
1704
+ shouldInjectOpenAIPromptCacheKeyForModel(model),
1701
1705
  ]);
1702
1706
  }
1703
1707
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-cache-optimizer",
3
- "version": "2.10.7",
3
+ "version": "2.10.8",
4
4
  "description": "Improve Pi prompt/KV cache hit rates with stable prompts, OpenAI-compatible cache keys, proxy compat warnings, and footer cache stats.",
5
5
  "keywords": [
6
6
  "pi-package",