@oh-my-pi/pi-catalog 16.2.12 → 16.2.13

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
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [16.2.13] - 2026-07-01
6
+
7
+ ### Added
8
+
9
+ - Added support for human-readable reasoning summaries on compatible OpenAI Codex models (v5.4+)
10
+
11
+ ### Fixed
12
+
13
+ - Fixed discovered OpenAI Codex models to advertise V2 streaming remote compaction, avoiding the legacy compact endpoint timeout path for Codex sessions. ([#4146](https://github.com/can1357/oh-my-pi/issues/4146))
14
+
5
15
  ## [16.2.12] - 2026-07-01
6
16
 
7
17
  ### Breaking Changes
@@ -60,6 +60,15 @@ export declare const isOpenAIModelId: (modelId: string) => boolean;
60
60
  * fall back to omitting `context`, letting the server default to `current_turn`.
61
61
  */
62
62
  export declare const supportsAllTurnsReasoningContext: (modelId: string) => boolean;
63
+ /**
64
+ * OpenAI Codex models that accept `reasoning.summary`. Shares the gpt-5.4 wire
65
+ * floor with {@link supportsAllTurnsReasoningContext}: earlier Codex ids
66
+ * (`gpt-5.1-codex`, `gpt-5.3-codex`, `gpt-5.3-codex-spark`) reject the field
67
+ * with `Unsupported parameter: 'reasoning.summary' is not supported with this
68
+ * model`. Callers omit `summary` for unsupported ids, letting the server skip
69
+ * the human-readable summary stream.
70
+ */
71
+ export declare const supportsCodexReasoningSummary: (modelId: string) => boolean;
63
72
  /**
64
73
  * Reasoning-capable GLM coding SKUs: glm-4.5 and up on the base / `-air` /
65
74
  * `-turbo` lines. Excludes the vision (`…v`) shape, the non-reasoning
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-catalog",
4
- "version": "16.2.12",
4
+ "version": "16.2.13",
5
5
  "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -34,12 +34,12 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@bufbuild/protobuf": "^2.12.0",
37
- "@oh-my-pi/pi-utils": "16.2.12",
37
+ "@oh-my-pi/pi-utils": "16.2.13",
38
38
  "arktype": "^2.2.0",
39
39
  "zod": "^4"
40
40
  },
41
41
  "devDependencies": {
42
- "@oh-my-pi/pi-ai": "16.2.12",
42
+ "@oh-my-pi/pi-ai": "16.2.13",
43
43
  "@types/bun": "^1.3.14"
44
44
  },
45
45
  "engines": {
@@ -8,6 +8,11 @@ const DEFAULT_CONTEXT_WINDOW = 272_000;
8
8
  const DEFAULT_MAX_TOKENS = 128_000;
9
9
  const DEFAULT_CODEX_CLIENT_VERSION = "0.99.0";
10
10
  const NPM_CODEX_LATEST_URL = "https://registry.npmjs.org/@openai%2Fcodex/latest";
11
+ const CODEX_REMOTE_COMPACTION = {
12
+ enabled: true,
13
+ api: "openai-codex-responses",
14
+ v2StreamingEnabled: true,
15
+ } as const;
11
16
 
12
17
  const codexReasoningPresetSchema = type({
13
18
  "effort?": "unknown",
@@ -269,6 +274,7 @@ function normalizeCodexModelEntry(entry: unknown, baseUrl: string): NormalizedCo
269
274
  reasoning,
270
275
  input,
271
276
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
277
+ remoteCompaction: CODEX_REMOTE_COMPACTION,
272
278
  contextWindow,
273
279
  maxTokens,
274
280
  ...(preferWebsockets ? { preferWebsockets: true } : {}),
@@ -123,6 +123,13 @@ export const isOpenAIModelId = memo((modelId: string): boolean => {
123
123
  return /(^|\/)(gpt|o1|o3|o4)[-.]/i.test(modelId) || modelId.toLowerCase().includes("openai/");
124
124
  });
125
125
 
126
+ /** OpenAI models at or above the gpt-5.4 wire generation, keyed off the parsed version. */
127
+ const isOpenAIWireGen54Plus = memo((modelId: string): boolean => {
128
+ const parsed = parseOpenAIModel(bareModelId(modelId));
129
+ if (!parsed) return false;
130
+ return semverGte(parsed.version, "5.4");
131
+ });
132
+
126
133
  /**
127
134
  * OpenAI Codex models that honor `reasoning.context: "all_turns"` (full
128
135
  * cross-turn reasoning replay). The `reasoning.context` field itself exists for
@@ -133,11 +140,17 @@ export const isOpenAIModelId = memo((modelId: string): boolean => {
133
140
  * floor (not an allowlist) so 5.6/6.x inherit support automatically. Callers
134
141
  * fall back to omitting `context`, letting the server default to `current_turn`.
135
142
  */
136
- export const supportsAllTurnsReasoningContext = memo((modelId: string): boolean => {
137
- const parsed = parseOpenAIModel(bareModelId(modelId));
138
- if (!parsed) return false;
139
- return semverGte(parsed.version, "5.4");
140
- });
143
+ export const supportsAllTurnsReasoningContext = isOpenAIWireGen54Plus;
144
+
145
+ /**
146
+ * OpenAI Codex models that accept `reasoning.summary`. Shares the gpt-5.4 wire
147
+ * floor with {@link supportsAllTurnsReasoningContext}: earlier Codex ids
148
+ * (`gpt-5.1-codex`, `gpt-5.3-codex`, `gpt-5.3-codex-spark`) reject the field
149
+ * with `Unsupported parameter: 'reasoning.summary' is not supported with this
150
+ * model`. Callers omit `summary` for unsupported ids, letting the server skip
151
+ * the human-readable summary stream.
152
+ */
153
+ export const supportsCodexReasoningSummary = isOpenAIWireGen54Plus;
141
154
 
142
155
  /**
143
156
  * Reasoning-capable GLM coding SKUs: glm-4.5 and up on the base / `-air` /
@@ -7,14 +7,15 @@ import { getModelDbPath } from "@oh-my-pi/pi-utils";
7
7
  import type { Api, Model, ModelSpec } from "./types";
8
8
 
9
9
  // Rows persist ModelSpec JSON (sparse `compat`, never the resolved record);
10
- // the model manager rebuilds via `buildModel` on load. v7 invalidates rows
11
- // predating the Antigravity Gemini budget-mode migration (cached specs still
12
- // carrying `thinking.mode: "google-level"` and the old 3.5-flash effort
13
- // routing); v6 invalidates rows that may contain the retired unknown-limit
14
- // sentinels (222222/8888); v5 invalidated rows predating effort-tier variant
15
- // collapsing (raw `-low`/`-high`/`-thinking` member ids); v4 dropped the
16
- // pre-efforts ThinkingConfig shape.
17
- const CACHE_SCHEMA_VERSION = 7;
10
+ // the model manager rebuilds via `buildModel` on load. v8 invalidates Codex
11
+ // discovery rows predating provider-native V2 compaction metadata; v7
12
+ // invalidated rows predating the Antigravity Gemini budget-mode migration
13
+ // (cached specs still carrying `thinking.mode: "google-level"` and the old
14
+ // 3.5-flash effort routing); v6 invalidated rows that may contain the retired
15
+ // unknown-limit sentinels (222222/8888); v5 invalidated rows predating
16
+ // effort-tier variant collapsing (raw `-low`/`-high`/`-thinking` member ids);
17
+ // v4 dropped the pre-efforts ThinkingConfig shape.
18
+ const CACHE_SCHEMA_VERSION = 8;
18
19
 
19
20
  interface CacheRow {
20
21
  provider_id: string;
@@ -100,7 +101,12 @@ function migrateCacheSchema(db: Database): void {
100
101
  } finally {
101
102
  stmt.finalize();
102
103
  }
103
- db.run("UPDATE model_cache SET version = ? WHERE version = 2", [CACHE_SCHEMA_VERSION]);
104
+ // Delete rows written under any older schema so they cannot be reused. The
105
+ // legacy `UPDATE ... WHERE version = 2` migration silently promoted the very
106
+ // first cache version to whatever the current one is, defeating every
107
+ // subsequent invalidation (see #4146: pre-V2 Codex rows kept the legacy
108
+ // compaction path even after CACHE_SCHEMA_VERSION was bumped).
109
+ db.run("DELETE FROM model_cache WHERE version <> ?", [CACHE_SCHEMA_VERSION]);
104
110
  }
105
111
 
106
112
  export function readModelCache<TApi extends Api>(