@oh-my-pi/pi-catalog 16.0.3 → 16.0.4
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 +6 -0
- package/dist/types/identity/family.d.ts +2 -0
- package/package.json +3 -3
- package/src/compat/openai.ts +5 -1
- package/src/identity/family.ts +11 -0
- package/src/model-thinking.ts +19 -0
- package/src/models.json +479 -747
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [16.0.4] - 2026-06-17
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed GLM-5.2 catalog thinking metadata for Zhipu/BigModel so the top effort is exposed as `xhigh` and maps to provider-native `max`. ([#2833](https://github.com/can1357/oh-my-pi/issues/2833))
|
|
10
|
+
|
|
5
11
|
## [16.0.2] - 2026-06-16
|
|
6
12
|
|
|
7
13
|
### Fixed
|
|
@@ -49,6 +49,8 @@ export declare function isOpenAIModelId(modelId: string): boolean;
|
|
|
49
49
|
* allowlist.
|
|
50
50
|
*/
|
|
51
51
|
export declare function isReasoningGlmModelId(modelId: string): boolean;
|
|
52
|
+
/** GLM-5.2+ coding SKUs accept `reasoning_effort` in addition to binary thinking. */
|
|
53
|
+
export declare function isGlm52ReasoningEffortModelId(modelId: string): boolean;
|
|
52
54
|
/** GLM vision SKUs — the `v` that attaches to the version (`glm-4v`, `glm-4.5v`). */
|
|
53
55
|
export declare function isGlmVisionModelId(modelId: string): boolean;
|
|
54
56
|
/**
|
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.0.
|
|
4
|
+
"version": "16.0.4",
|
|
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,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@bufbuild/protobuf": "^2.12.0",
|
|
37
|
-
"@oh-my-pi/pi-utils": "16.0.
|
|
37
|
+
"@oh-my-pi/pi-utils": "16.0.4",
|
|
38
38
|
"zod": "^4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@oh-my-pi/pi-ai": "16.0.
|
|
41
|
+
"@oh-my-pi/pi-ai": "16.0.4",
|
|
42
42
|
"@types/bun": "^1.3.14"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
package/src/compat/openai.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
isAnthropicNamespacedModelId,
|
|
13
13
|
isClaudeModelId,
|
|
14
14
|
isDeepseekModelIdOrName,
|
|
15
|
+
isGlm52ReasoningEffortModelId,
|
|
15
16
|
isKimiK26ModelId,
|
|
16
17
|
isKimiModelId,
|
|
17
18
|
isMimoModelIdOrName,
|
|
@@ -82,6 +83,7 @@ export function buildOpenAICompat(spec: ModelSpec<"openai-completions">): Resolv
|
|
|
82
83
|
const isCerebras = modelMatchesHost(hostModel, "cerebras");
|
|
83
84
|
const isZai = modelMatchesHost(hostModel, "zai");
|
|
84
85
|
const isZhipu = modelMatchesHost(hostModel, "zhipu");
|
|
86
|
+
const supportsZaiReasoningEffort = (isZai || isZhipu) && isGlm52ReasoningEffortModelId(spec.id);
|
|
85
87
|
const isKilo = modelMatchesHost(hostModel, "kilo");
|
|
86
88
|
const isKimiModel = isKimiModelId(spec.id);
|
|
87
89
|
const isMoonshotNative = modelMatchesHost(hostModel, "moonshotNative");
|
|
@@ -136,6 +138,8 @@ export function buildOpenAICompat(spec: ModelSpec<"openai-completions">): Resolv
|
|
|
136
138
|
const useMaxTokens =
|
|
137
139
|
isMistral ||
|
|
138
140
|
isMoonshotNative ||
|
|
141
|
+
isZai ||
|
|
142
|
+
isZhipu ||
|
|
139
143
|
hostMatchesUrl(baseUrl, "chutes") ||
|
|
140
144
|
hostMatchesUrl(baseUrl, "fireworks") ||
|
|
141
145
|
isDirectDeepseekApi;
|
|
@@ -202,7 +206,7 @@ export function buildOpenAICompat(spec: ModelSpec<"openai-completions">): Resolv
|
|
|
202
206
|
// OpenAI's reasoning-API surface.
|
|
203
207
|
supportsDeveloperRole: isOpenAIHost || isAzureHost,
|
|
204
208
|
supportsMultipleSystemMessages: supportsMultipleSystemMessagesDefault,
|
|
205
|
-
supportsReasoningEffort: !isGrok && !
|
|
209
|
+
supportsReasoningEffort: !isGrok && !isXiaomiMimo && (!(isZai || isZhipu) || supportsZaiReasoningEffort),
|
|
206
210
|
// GitHub Copilot's chat-completions endpoint rejects reasoning params wholesale.
|
|
207
211
|
supportsReasoningParams: provider !== "github-copilot",
|
|
208
212
|
reasoningEffortMap: {},
|
package/src/identity/family.ts
CHANGED
|
@@ -105,6 +105,17 @@ export function isReasoningGlmModelId(modelId: string): boolean {
|
|
|
105
105
|
}
|
|
106
106
|
return semverGte(glm.version, "4.5");
|
|
107
107
|
}
|
|
108
|
+
/** GLM-5.2+ coding SKUs accept `reasoning_effort` in addition to binary thinking. */
|
|
109
|
+
export function isGlm52ReasoningEffortModelId(modelId: string): boolean {
|
|
110
|
+
const glm = parseGlmModel(bareModelId(modelId));
|
|
111
|
+
if (!glm || glm.vision) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
if (glm.variant !== "base" && glm.variant !== "air" && glm.variant !== "turbo") {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
return semverGte(glm.version, "5.2");
|
|
118
|
+
}
|
|
108
119
|
|
|
109
120
|
/** GLM vision SKUs — the `v` that attaches to the version (`glm-4v`, `glm-4.5v`). */
|
|
110
121
|
export function isGlmVisionModelId(modelId: string): boolean {
|
package/src/model-thinking.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
findThinkingVariantToken,
|
|
25
25
|
isDeepseekModelIdOrName,
|
|
26
|
+
isGlm52ReasoningEffortModelId,
|
|
26
27
|
isMinimaxM2FamilyModelId,
|
|
27
28
|
isOpenAIGptOssModelId,
|
|
28
29
|
supportsAdaptiveThinkingDisplay,
|
|
@@ -76,6 +77,13 @@ const DEEPSEEK_REASONING_EFFORT_MAP: Readonly<EffortMap> = {
|
|
|
76
77
|
const FIREWORKS_REASONING_EFFORT_MAP: Readonly<EffortMap> = {
|
|
77
78
|
[Effort.Minimal]: "none",
|
|
78
79
|
};
|
|
80
|
+
const ZAI_GLM_52_REASONING_EFFORT_MAP: Readonly<EffortMap> = {
|
|
81
|
+
[Effort.Minimal]: "none",
|
|
82
|
+
[Effort.Low]: "high",
|
|
83
|
+
[Effort.Medium]: "high",
|
|
84
|
+
[Effort.High]: "high",
|
|
85
|
+
[Effort.XHigh]: "max",
|
|
86
|
+
};
|
|
79
87
|
|
|
80
88
|
/**
|
|
81
89
|
* Effort → wire-value map for the 5-tier adaptive scale (Opus 4.7+ and
|
|
@@ -259,11 +267,19 @@ function sameEffortList(left: readonly Effort[], right: readonly Effort[]): bool
|
|
|
259
267
|
}
|
|
260
268
|
|
|
261
269
|
function getModelDefinedEfforts<TApi extends Api>(spec: ModelSpec<TApi>): readonly Effort[] | undefined {
|
|
270
|
+
if (spec.api === "openai-completions" && isZaiGlm52ReasoningEffortModel(spec)) {
|
|
271
|
+
return DEFAULT_REASONING_EFFORTS_WITH_XHIGH;
|
|
272
|
+
}
|
|
262
273
|
return spec.api === "openai-completions" && (isMinimaxM2FamilyModelId(spec.id) || isOpenAIGptOssModelId(spec.id))
|
|
263
274
|
? LOW_MEDIUM_HIGH_REASONING_EFFORTS
|
|
264
275
|
: undefined;
|
|
265
276
|
}
|
|
266
277
|
|
|
278
|
+
function isZaiGlm52ReasoningEffortModel<TApi extends Api>(spec: ModelSpec<TApi>): boolean {
|
|
279
|
+
if (!isGlm52ReasoningEffortModelId(spec.id)) return false;
|
|
280
|
+
return modelMatchesHost(spec, "zai") || modelMatchesHost(spec, "zhipu");
|
|
281
|
+
}
|
|
282
|
+
|
|
267
283
|
function readCompatEffortMap(compat: CompatOf<Api>): EffortMap | undefined {
|
|
268
284
|
if (compat === undefined || !("reasoningEffortMap" in compat)) {
|
|
269
285
|
return undefined;
|
|
@@ -288,6 +304,9 @@ function inferDetectedEffortMap<TApi extends Api>(
|
|
|
288
304
|
if (spec.provider === "groq" && spec.id === "qwen/qwen3-32b") {
|
|
289
305
|
return GROQ_QWEN3_32B_REASONING_EFFORT_MAP;
|
|
290
306
|
}
|
|
307
|
+
if (isZaiGlm52ReasoningEffortModel(spec)) {
|
|
308
|
+
return ZAI_GLM_52_REASONING_EFFORT_MAP;
|
|
309
|
+
}
|
|
291
310
|
if (isDeepseekReasoningModel(spec)) {
|
|
292
311
|
return DEEPSEEK_REASONING_EFFORT_MAP;
|
|
293
312
|
}
|