pi-openai-toolkit 0.14.0 → 0.14.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-openai-toolkit",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -781,7 +781,11 @@ export default function registerCompactionExtension(
781
781
  const syncTools = async (ctx: ExtensionContext, model = ctx.model): Promise<boolean> => {
782
782
  const config = dependencies.loadConfig().config.compaction;
783
783
  const active = await isRemoteContextActive(ctx, config, model);
784
- return tools.sync(active);
784
+ // sync() reports whether the tool-set update succeeded; an inactive model
785
+ // syncs fine and returns true. The activation decision must use `active`
786
+ // itself, or non-covered models would receive a window boundary.
787
+ const synced = tools.sync(active);
788
+ return active && synced;
785
789
  };
786
790
  pi.on("session_start", async (_event, ctx) => {
787
791
  const active = await syncTools(ctx);
@@ -790,7 +794,9 @@ export default function registerCompactionExtension(
790
794
  if (!config.enabled) return;
791
795
 
792
796
  let activationReason: string | undefined;
793
- if (config.contextManagement === "remote") {
797
+ // Only models the built-in Remote Context coverage targets may activate or
798
+ // warn; everything else silently runs Pi's normal compaction path.
799
+ if (config.contextManagement === "remote" && isCodexContextModel(ctx.model, config)) {
794
800
  if (active) {
795
801
  try {
796
802
  contextWindows.ensureInitialized(pi, ctx, true);