@oh-my-pi/pi-catalog 16.0.6 → 16.0.7

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,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [16.0.7] - 2026-06-18
6
+
7
+ ### Fixed
8
+
9
+ - Fixed MiniMax Anthropic-compatible M2/M3 thinking metadata to expose the adaptive transport and keep M2 mandatory reasoning floored ([#2928](https://github.com/can1357/oh-my-pi/issues/2928)).
10
+
5
11
  ## [16.0.6] - 2026-06-18
6
12
 
7
13
  ### Added
@@ -63,7 +63,7 @@ export declare function mapEffortToGoogleThinkingLevel(effort: Effort): "MINIMAL
63
63
  * Maps a normalized thinking effort to Anthropic adaptive effort values via
64
64
  * the model's baked `thinking.effortMap` (identity for unmapped efforts).
65
65
  */
66
- export declare function mapEffortToAnthropicAdaptiveEffort<TApi extends Api>(model: ApiModel<TApi>, effort: Effort): "low" | "medium" | "high" | "xhigh" | "max";
66
+ export declare function mapEffortToAnthropicAdaptiveEffort<TApi extends Api>(model: ApiModel<TApi>, effort: Effort): "low" | "medium" | "high" | "xhigh" | "max" | "adaptive";
67
67
  /**
68
68
  * Resolves the upstream wire model id for a request at the given effort
69
69
  * (`undefined` = thinking off). Collapsed effort-tier variants route through
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.6",
4
+ "version": "16.0.7",
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.0.6",
37
+ "@oh-my-pi/pi-utils": "16.0.7",
38
38
  "arktype": "^2.2.0",
39
39
  "zod": "^4"
40
40
  },
41
41
  "devDependencies": {
42
- "@oh-my-pi/pi-ai": "16.0.6",
42
+ "@oh-my-pi/pi-ai": "16.0.7",
43
43
  "@types/bun": "^1.3.14"
44
44
  },
45
45
  "engines": {
@@ -25,6 +25,7 @@ import {
25
25
  isDeepseekModelIdOrName,
26
26
  isGlm52ReasoningEffortModelId,
27
27
  isMinimaxM2FamilyModelId,
28
+ isMinimaxM3FamilyModelId,
28
29
  isOpenAIGptOssModelId,
29
30
  supportsAdaptiveThinkingDisplay,
30
31
  } from "./identity/family";
@@ -113,6 +114,12 @@ export const ANTHROPIC_ADAPTIVE_EFFORT_MAP_4_TIER: Readonly<Partial<Record<Effor
113
114
  [Effort.XHigh]: "max",
114
115
  };
115
116
 
117
+ const MINIMAX_ANTHROPIC_ADAPTIVE_EFFORT_MAP: Readonly<EffortMap> = {
118
+ [Effort.Low]: "adaptive",
119
+ [Effort.Medium]: "adaptive",
120
+ [Effort.High]: "adaptive",
121
+ };
122
+
116
123
  // ---------------------------------------------------------------------------
117
124
  // Build-time derivation (buildModel + catalog generator only)
118
125
  // ---------------------------------------------------------------------------
@@ -295,6 +302,10 @@ function isOllamaCloudGlm52ReasoningEffortModel<TApi extends Api>(spec: ModelSpe
295
302
  return spec.api === "ollama-chat" && spec.provider === "ollama-cloud" && isGlm52ReasoningEffortModelId(spec.id);
296
303
  }
297
304
 
305
+ function isMinimaxReasoningModelOnAnthropicEndpoint<TApi extends Api>(spec: ModelSpec<TApi>): boolean {
306
+ return spec.api === "anthropic-messages" && (isMinimaxM2FamilyModelId(spec.id) || isMinimaxM3FamilyModelId(spec.id));
307
+ }
308
+
298
309
  function readCompatEffortMap(compat: CompatOf<Api>): EffortMap | undefined {
299
310
  if (compat === undefined || !("reasoningEffortMap" in compat)) {
300
311
  return undefined;
@@ -309,6 +320,9 @@ function inferDetectedEffortMap<TApi extends Api>(
309
320
  mode: ThinkingConfig["mode"],
310
321
  ): EffortMap | undefined {
311
322
  if (mode === "anthropic-adaptive") {
323
+ if (isMinimaxReasoningModelOnAnthropicEndpoint(spec)) {
324
+ return MINIMAX_ANTHROPIC_ADAPTIVE_EFFORT_MAP;
325
+ }
312
326
  return anthropicModelHasRealXHighEffort(spec, parsedModel)
313
327
  ? ANTHROPIC_ADAPTIVE_EFFORT_MAP_5_TIER
314
328
  : ANTHROPIC_ADAPTIVE_EFFORT_MAP_4_TIER;
@@ -446,6 +460,9 @@ function inferAnthropicSupportedEfforts<TApi extends Api>(
446
460
  }
447
461
 
448
462
  function inferFallbackEfforts<TApi extends Api>(spec: ModelSpec<TApi>, compat: CompatOf<TApi>): readonly Effort[] {
463
+ if (isMinimaxReasoningModelOnAnthropicEndpoint(spec)) {
464
+ return LOW_MEDIUM_HIGH_REASONING_EFFORTS;
465
+ }
449
466
  if (spec.api === "anthropic-messages") {
450
467
  return DEFAULT_REASONING_EFFORTS_WITH_XHIGH;
451
468
  }
@@ -488,6 +505,9 @@ function inferThinkingControlMode<TApi extends Api>(
488
505
  : "budget";
489
506
 
490
507
  case "anthropic-messages":
508
+ if (isMinimaxReasoningModelOnAnthropicEndpoint(spec)) {
509
+ return "anthropic-adaptive";
510
+ }
491
511
  if (parsedModel.family === "anthropic") {
492
512
  if (semverGte(parsedModel.version, "4.6")) {
493
513
  return "anthropic-adaptive";
@@ -626,9 +646,15 @@ export function mapEffortToGoogleThinkingLevel(effort: Effort): "MINIMAL" | "LOW
626
646
  export function mapEffortToAnthropicAdaptiveEffort<TApi extends Api>(
627
647
  model: ApiModel<TApi>,
628
648
  effort: Effort,
629
- ): "low" | "medium" | "high" | "xhigh" | "max" {
649
+ ): "low" | "medium" | "high" | "xhigh" | "max" | "adaptive" {
630
650
  const supported = requireSupportedEffort(model, effort);
631
- return (model.thinking?.effortMap?.[supported] ?? supported) as "low" | "medium" | "high" | "xhigh" | "max";
651
+ return (model.thinking?.effortMap?.[supported] ?? supported) as
652
+ | "low"
653
+ | "medium"
654
+ | "high"
655
+ | "xhigh"
656
+ | "max"
657
+ | "adaptive";
632
658
  }
633
659
 
634
660
  /**