pi-cache-optimizer 2.6.14 → 2.6.15

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.
Files changed (2) hide show
  1. package/index.ts +7 -1
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -1992,10 +1992,16 @@ function describeMissingOpenAICompatibleProxyCompat(model: PiModel): string[] {
1992
1992
  if (!isOpenAICompatibleProxyApi(model.api)) return missing;
1993
1993
  if (isOfficialOpenAIBaseUrl(model)) return missing;
1994
1994
 
1995
- if (compat.sendSessionAffinityHeaders !== true) {
1995
+ if (compat.sendSessionAffinityHeaders === undefined) {
1996
1996
  missing.push("sendSessionAffinityHeaders");
1997
1997
  }
1998
1998
 
1999
+ // Explicit `sendSessionAffinityHeaders: false` is a valid safe opt-out for
2000
+ // proxies/CDNs/WAFs that block Pi's custom affinity headers with HTTP 403.
2001
+ // Treat only a missing/undefined value as missing compat; do not mark an
2002
+ // intentional false override as ⚠️ compat or let /cache-optimizer fix turn it
2003
+ // back to true.
2004
+ //
1999
2005
  // NOTE: supportsLongCacheRetention is intentionally NOT checked here.
2000
2006
  // Per spec, it is optional/risky advisory text only and must NOT trigger
2001
2007
  // the ⚠️ compat marker. The before_provider_request hook proactively
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-cache-optimizer",
3
- "version": "2.6.14",
3
+ "version": "2.6.15",
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",