@oh-my-pi/pi-catalog 18.1.2 → 18.1.3

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,24 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.1.3] - 2026-09-02
6
+
7
+ ### Added
8
+
9
+ - Added support for Claude Fable 5.1
10
+
11
+ ### Changed
12
+
13
+ - Updated pricing and context limits for various Claude models
14
+
15
+ ### Fixed
16
+
17
+ - Claude Sonnet 5 no longer advertises unsupported mid-conversation system messages.
18
+ - Custom GLM 5.2 models on `alibaba-coding-plan` (and other blanket-GLM hosts) no longer crash startup with `AmbiguousOverlapError` ([#10553](https://github.com/can1357/oh-my-pi/issues/10553)).
19
+ - Gemini 3.7 Flash no longer offers the `minimal` thinking effort on direct google-level hosts (`google`, `google-vertex`, `opencode-zen`), which reject `thinkingLevel: MINIMAL` with a 400; budget and reasoning-effort resellers keep the tier ([#10543](https://github.com/can1357/oh-my-pi/issues/10543)).
20
+ - Fixed Alibaba Token Plan discovery for `qwen3.8-flash` to include its context limits, reasoning support, and image input.
21
+ - Z.AI GLM-5.3-Flash now uses the native API instead of failing through the unsupported Anthropic-compatible route ([#10539](https://github.com/can1357/oh-my-pi/issues/10539)).
22
+
5
23
  ## [18.1.2] - 2026-09-01
6
24
 
7
25
  ### Added
@@ -502,7 +502,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
502
502
  readonly id: "zai";
503
503
  readonly defaultModel: "glm-5.3";
504
504
  readonly envVars: readonly ["ZAI_API_KEY"];
505
- readonly createModelManagerOptions: (config: ModelManagerConfig) => import("../index.js").ModelManagerOptions<"anthropic-messages", unknown>;
505
+ readonly createModelManagerOptions: (config: ModelManagerConfig) => import("../index.js").ModelManagerOptions<"anthropic-messages" | "openai-completions", unknown>;
506
506
  readonly catalogDiscovery: {
507
507
  readonly label: "zAI";
508
508
  };
@@ -673,6 +673,11 @@ export interface ModelsDevProviderDescriptor {
673
673
  }
674
674
  /** Generic mapper that converts models.dev data using provider descriptors. */
675
675
  export declare function mapModelsDevToModels(data: Record<string, unknown>, descriptors: readonly ModelsDevProviderDescriptor[]): ModelSpec<Api>[];
676
+ /** Resolves the transport and endpoint for one Z.AI model catalog entry. */
677
+ export declare function resolveZaiApi(modelId: string): {
678
+ api: "anthropic-messages" | "openai-completions";
679
+ baseUrl: string;
680
+ };
676
681
  /** All provider descriptors for models.dev data mapping in generate-models.ts. */
677
682
  export declare const MODELS_DEV_PROVIDER_DESCRIPTORS: readonly ModelsDevProviderDescriptor[];
678
683
  /** Providers whose bundled catalog can receive additive models.dev updates at runtime. */
@@ -70,4 +70,5 @@ export declare const DEVIN_STATIC_MODELS: readonly ModelSpec<"devin-agent">[];
70
70
  export declare function devinModelManagerOptions(config?: DevinModelManagerConfig): ModelManagerOptions<"devin-agent">;
71
71
  export interface ZaiModelManagerConfig {
72
72
  }
73
- export declare function zaiModelManagerOptions(_config?: ZaiModelManagerConfig): ModelManagerOptions<"anthropic-messages">;
73
+ /** Creates model-manager options for Z.AI's mixed native and Anthropic transports. */
74
+ export declare function zaiModelManagerOptions(_config?: ZaiModelManagerConfig): ModelManagerOptions<"anthropic-messages" | "openai-completions">;
@@ -879,6 +879,8 @@ export interface Model<TApi extends Api = Api> {
879
879
  * inferring it from the transport API.
880
880
  */
881
881
  requiresGlyphTokenization?: boolean;
882
+ /** Whether this model requires Cursor's tool-schema combiner projection. */
883
+ requiresCursorToolSchemaProjection?: boolean;
882
884
  /**
883
885
  * Model id to send on the wire when it differs from `id`. Used by catalog
884
886
  * variants that present one upstream model under several local entries —
@@ -1033,7 +1035,7 @@ export interface Model<TApi extends Api = Api> {
1033
1035
  * vocabulary of `buildModel`. Identical to `Model` except `compat` carries the
1034
1036
  * sparse override shape and nothing is resolved yet.
1035
1037
  */
1036
- export interface ModelSpec<TApi extends Api = Api> extends Omit<Model<TApi>, "compat" | "identity" | "compatConfig" | "requiresGlyphTokenization" | "supportsComputerUseConfig"> {
1038
+ export interface ModelSpec<TApi extends Api = Api> extends Omit<Model<TApi>, "compat" | "identity" | "compatConfig" | "requiresGlyphTokenization" | "requiresCursorToolSchemaProjection" | "supportsComputerUseConfig"> {
1037
1039
  /** Sparse compatibility overrides; resolved into `Model.compat` by `buildModel`. */
1038
1040
  compat?: CompatConfigOf<TApi>;
1039
1041
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-catalog",
4
- "version": "18.1.2",
4
+ "version": "18.1.3",
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": "Stencil Labs, Inc.",
@@ -35,12 +35,12 @@
35
35
  "gen:proto": "bun scripts/generate-protocols.ts"
36
36
  },
37
37
  "dependencies": {
38
- "@oh-my-pi/omptype": "18.1.2",
39
- "@oh-my-pi/pi-utils": "18.1.2"
38
+ "@oh-my-pi/omptype": "18.1.3",
39
+ "@oh-my-pi/pi-utils": "18.1.3"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@bgotink/kdl": "0.4.0",
43
- "@oh-my-pi/pi-ai": "18.1.2",
43
+ "@oh-my-pi/pi-ai": "18.1.3",
44
44
  "@types/bun": "^1.3.14"
45
45
  },
46
46
  "engines": {
package/src/build.ts CHANGED
@@ -32,7 +32,8 @@ function isInputModalities(value: unknown): value is ("text" | "image")[] {
32
32
  * Applies resolved catalog-data axes onto the model: reviewed metadata
33
33
  * corrections (`cost-patch`, `limits-patch`, `long-context-cost`,
34
34
  * `context-window-floor`) overwrite upstream values; selection metadata
35
- * (`priority`, `apply-patch-tool-type`, `service-tier-cost`) is rule-owned;
35
+ * (`priority`, `apply-patch-tool-type`, `service-tier-cost`,
36
+ * `requires-cursor-tool-schema-projection`) is rule-owned;
36
37
  * `context-promotion-target` fills only when the spec left it unset.
37
38
  */
38
39
  function applyCatalogAssignments<TApi extends Api>(model: Model<TApi>, catalog: Record<string, unknown>): void {
@@ -51,6 +52,12 @@ function applyCatalogAssignments<TApi extends Api>(model: Model<TApi>, catalog:
51
52
  if (applyPatchToolType === "freeform" || applyPatchToolType === "function") {
52
53
  model.applyPatchToolType = applyPatchToolType;
53
54
  }
55
+ const requiresCursorToolSchemaProjection = catalog.requiresCursorToolSchemaProjection;
56
+ if (requiresCursorToolSchemaProjection === true) {
57
+ model.requiresCursorToolSchemaProjection = true;
58
+ } else {
59
+ delete model.requiresCursorToolSchemaProjection;
60
+ }
54
61
  const contextPromotionTarget = catalog.contextPromotionTarget;
55
62
  if (typeof contextPromotionTarget === "string" && model.contextPromotionTarget === undefined) {
56
63
  model.contextPromotionTarget = contextPromotionTarget;
@@ -262,6 +262,11 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
262
262
  "limits-patch": { key: "limitsPatch", set: "catalog", shape: "object" },
263
263
  "long-context-cost": { key: "longContext", set: "catalog", shape: "object" },
264
264
  "long-usage-limit-fallback": { key: "longUsageLimitFallback", set: "catalog", shape: "scalar" },
265
+ "requires-cursor-tool-schema-projection": {
266
+ key: "requiresCursorToolSchemaProjection",
267
+ set: "catalog",
268
+ shape: "scalar",
269
+ },
265
270
  priority: { key: "priority", set: "catalog", shape: "scalar" },
266
271
  "service-tier-cost": { key: "serviceTierCost", set: "catalog", shape: "object" },
267
272
  };
@@ -846,7 +846,7 @@ function resolveAnthropicPolicy(
846
846
  allowAnthropicHeaderOverrides: false,
847
847
  supportsEagerToolInputStreaming: official,
848
848
  supportsLongCacheRetention: official,
849
- supportsMidConversationSystem: official && facts.anthropicAdaptiveGenAtLeast("4.8"),
849
+ supportsMidConversationSystem: official && !facts.family("sonnet") && facts.anthropicAdaptiveGenAtLeast("4.8"),
850
850
  supportsTurnScopedSystem: false,
851
851
  supportsMidConversationToolChanges: false,
852
852
  supportsPerMessageEffort: false,
@@ -66,17 +66,32 @@ class "gemini" {
66
66
  }
67
67
  }
68
68
  }
69
+ // Gemini 3.7 Flash is the one Flash revision whose native thinkingLevel does
70
+ // not accept `minimal` (400 THINKING_LEVEL_MINIMAL). Only the direct
71
+ // google-level transports emit `thinkingLevel` on the wire, so the tier is
72
+ // dropped there; budget (anthropic-messages) and reasoning_effort resellers
73
+ // never send the rejected value and keep the four-tier ladder. The collapsed
74
+ // google-antigravity / google-gemini-cli variants remap minimal -> LOW and
75
+ // carry their own explicit ladder, so they are unaffected.
76
+ // https://ai.google.dev/gemini-api/docs/generate-content/thinking#thinking-levels
77
+ on "google" "google-vertex" "opencode-zen" {
78
+ family "flash" {
79
+ revision ">=3.7 <3.8" {
80
+ thinking-efforts "low" "medium" "high"
81
+ }
82
+ }
83
+ }
69
84
 
70
- // Gemini 3 tool calls require the sentinel signature on unsigned replay.
71
85
  revision ">=3" {
72
86
  // Replaces the Google multimodal function-response baseline.
73
87
  multimodal-function-response #true
74
- requires-skip-thought-signature #true
75
88
  // Replaces the Gemini 3+ mandatory-reasoning fallback.
76
89
  thinking-requires-effort #true
77
90
  }
91
+ // Only public-Gemini-compatible transports accept the bypass sentinel for unsigned calls.
78
92
  on "google" "opencode-zen" {
79
93
  revision ">=3" {
94
+ requires-skip-thought-signature #true
80
95
  supports-function-part-id #true
81
96
  }
82
97
  }
@@ -10,7 +10,10 @@ class "glm" {
10
10
  // GLM-5.2 exposes the default lower tiers plus a genuine max on generic
11
11
  // OpenAI-compatible hosts; the zai-dialect and Anthropic-route hosts
12
12
  // (Z.ai, Zhipu, Umans, Ollama Cloud, Baseten) serve only high/max.
13
- revision ">=5.2 <5.3" {
13
+ // priority breaks the intentional overlap with provider-level blanket GLM
14
+ // ladders authored for the pre-5.2 census (e.g. alibaba-coding-plan.kdl),
15
+ // so the 5.2 lineage ladder wins on generic hosts that lack a 5.2 residue.
16
+ revision ">=5.2 <5.3" priority=10 {
14
17
  thinking-efforts "minimal" "low" "medium" "high" "max"
15
18
  }
16
19
  on "zai" "zhipu-coding-plan" {
@@ -2,6 +2,11 @@
2
2
 
3
3
  provider "cursor" {
4
4
  thinking-mode "effort"
5
+ class "anthropic" {
6
+ family "fable" {
7
+ requires-cursor-tool-schema-projection #true
8
+ }
9
+ }
5
10
  // GetUsableModels advertises no input modalities or context windows.
6
11
  // K3 (including the bare `k3` alias Cursor serves) is natively
7
12
  // multimodal and 1M-context.
@@ -25,8 +25,12 @@ provider "zai" {
25
25
  }
26
26
  // GLM-5.3-Flash is the first mandatory-thinking flash SKU. Its exact
27
27
  // deployment keeps the Anthropic budget+effort wire mode instead of the
28
- // older optional-thinking flash family's budget-only mode.
28
+ // older optional-thinking flash family's budget-only mode. The SKU rides
29
+ // Z.AI's native OpenAI-completions endpoint, so clamp the sent max_tokens
30
+ // to the advertised 131K cap rather than the 64K OpenAI default (the
31
+ // axis is a no-op on the Anthropic route).
29
32
  models "glm-5.3-flash" {
30
33
  thinking-mode "anthropic-budget-effort"
34
+ clamp-output-to-model-max #true
31
35
  }
32
36
  }
@@ -158,6 +158,11 @@ behavior {
158
158
  api-routes provider="zenmux" default="openai-completions" {
159
159
  route "anthropic-messages" prefix="anthropic/"
160
160
  }
161
+ // GLM-5.3-Flash is available on Z.AI's native chat-completions API but
162
+ // not its Anthropic-compatible coding endpoint (#10539).
163
+ api-routes provider="zai" default="anthropic-messages" {
164
+ route "openai-completions" exact="glm-5.3-flash"
165
+ }
161
166
  // OpenCode Zen: models.dev declares these with `@ai-sdk/anthropic`, but the
162
167
  // gateway serves them only at /v1/chat/completions (#1617).
163
168
  api-routes provider="opencode-zen" {
@@ -4720,7 +4720,34 @@
4720
4720
  }
4721
4721
  },
4722
4722
  {
4723
- "source": "classes/gemini.kdl:71",
4723
+ "source": "classes/gemini.kdl:79",
4724
+ "class": "gemini",
4725
+ "providers": [
4726
+ "google",
4727
+ "google-vertex",
4728
+ "opencode-zen"
4729
+ ],
4730
+ "family": "flash",
4731
+ "revision": [
4732
+ {
4733
+ "op": ">=",
4734
+ "revision": "3.7.0"
4735
+ },
4736
+ {
4737
+ "op": "<",
4738
+ "revision": "3.8.0"
4739
+ }
4740
+ ],
4741
+ "thinking": {
4742
+ "efforts": [
4743
+ "low",
4744
+ "medium",
4745
+ "high"
4746
+ ]
4747
+ }
4748
+ },
4749
+ {
4750
+ "source": "classes/gemini.kdl:85",
4724
4751
  "class": "gemini",
4725
4752
  "revision": [
4726
4753
  {
@@ -4729,15 +4756,14 @@
4729
4756
  }
4730
4757
  ],
4731
4758
  "wire": {
4732
- "multimodalFunctionResponse": true,
4733
- "requiresSkipThoughtSignature": true
4759
+ "multimodalFunctionResponse": true
4734
4760
  },
4735
4761
  "thinking": {
4736
4762
  "requiresEffort": true
4737
4763
  }
4738
4764
  },
4739
4765
  {
4740
- "source": "classes/gemini.kdl:79",
4766
+ "source": "classes/gemini.kdl:93",
4741
4767
  "class": "gemini",
4742
4768
  "providers": [
4743
4769
  "google",
@@ -4750,11 +4776,12 @@
4750
4776
  }
4751
4777
  ],
4752
4778
  "wire": {
4779
+ "requiresSkipThoughtSignature": true,
4753
4780
  "supportsFunctionPartId": true
4754
4781
  }
4755
4782
  },
4756
4783
  {
4757
- "source": "classes/gemini.kdl:84",
4784
+ "source": "classes/gemini.kdl:99",
4758
4785
  "class": "gemini",
4759
4786
  "providers": [
4760
4787
  "google-antigravity",
@@ -4847,7 +4874,7 @@
4847
4874
  }
4848
4875
  },
4849
4876
  {
4850
- "source": "classes/glm.kdl:13",
4877
+ "source": "classes/glm.kdl:16",
4851
4878
  "class": "glm",
4852
4879
  "revision": [
4853
4880
  {
@@ -4859,6 +4886,7 @@
4859
4886
  "revision": "5.3.0"
4860
4887
  }
4861
4888
  ],
4889
+ "priority": 10,
4862
4890
  "thinking": {
4863
4891
  "efforts": [
4864
4892
  "minimal",
@@ -4870,7 +4898,7 @@
4870
4898
  }
4871
4899
  },
4872
4900
  {
4873
- "source": "classes/glm.kdl:17",
4901
+ "source": "classes/glm.kdl:20",
4874
4902
  "class": "glm",
4875
4903
  "providers": [
4876
4904
  "zai",
@@ -4892,7 +4920,7 @@
4892
4920
  }
4893
4921
  },
4894
4922
  {
4895
- "source": "classes/glm.kdl:23",
4923
+ "source": "classes/glm.kdl:26",
4896
4924
  "class": "glm",
4897
4925
  "providers": [
4898
4926
  "zai",
@@ -4919,7 +4947,7 @@
4919
4947
  }
4920
4948
  },
4921
4949
  {
4922
- "source": "classes/glm.kdl:29",
4950
+ "source": "classes/glm.kdl:32",
4923
4951
  "class": "glm",
4924
4952
  "providers": [
4925
4953
  "vercel-ai-gateway"
@@ -4945,7 +4973,7 @@
4945
4973
  }
4946
4974
  },
4947
4975
  {
4948
- "source": "classes/glm.kdl:36",
4976
+ "source": "classes/glm.kdl:39",
4949
4977
  "class": "glm",
4950
4978
  "providers": [
4951
4979
  "zai",
@@ -4973,7 +5001,7 @@
4973
5001
  }
4974
5002
  },
4975
5003
  {
4976
- "source": "classes/glm.kdl:46",
5004
+ "source": "classes/glm.kdl:49",
4977
5005
  "class": "glm",
4978
5006
  "providers": [
4979
5007
  "zai"
@@ -4994,7 +5022,7 @@
4994
5022
  }
4995
5023
  },
4996
5024
  {
4997
- "source": "classes/glm.kdl:58",
5025
+ "source": "classes/glm.kdl:61",
4998
5026
  "class": "glm",
4999
5027
  "providers": [
5000
5028
  "zai",
@@ -5014,7 +5042,7 @@
5014
5042
  }
5015
5043
  },
5016
5044
  {
5017
- "source": "classes/glm.kdl:62",
5045
+ "source": "classes/glm.kdl:65",
5018
5046
  "class": "glm",
5019
5047
  "providers": [
5020
5048
  "alibaba-coding-plan",
@@ -5026,7 +5054,7 @@
5026
5054
  }
5027
5055
  },
5028
5056
  {
5029
- "source": "classes/glm.kdl:66",
5057
+ "source": "classes/glm.kdl:69",
5030
5058
  "class": "glm",
5031
5059
  "providers": [
5032
5060
  "openrouter",
@@ -5043,7 +5071,7 @@
5043
5071
  }
5044
5072
  },
5045
5073
  {
5046
- "source": "classes/glm.kdl:77",
5074
+ "source": "classes/glm.kdl:80",
5047
5075
  "class": "glm",
5048
5076
  "models": [
5049
5077
  {
@@ -7458,7 +7486,18 @@
7458
7486
  }
7459
7487
  },
7460
7488
  {
7461
- "source": "providers/cursor.kdl:9",
7489
+ "source": "providers/cursor.kdl:6",
7490
+ "class": "anthropic",
7491
+ "providers": [
7492
+ "cursor"
7493
+ ],
7494
+ "family": "fable",
7495
+ "catalog": {
7496
+ "requiresCursorToolSchemaProjection": true
7497
+ }
7498
+ },
7499
+ {
7500
+ "source": "providers/cursor.kdl:14",
7462
7501
  "class": "kimi",
7463
7502
  "providers": [
7464
7503
  "cursor"
@@ -7473,7 +7512,7 @@
7473
7512
  }
7474
7513
  },
7475
7514
  {
7476
- "source": "providers/cursor.kdl:14",
7515
+ "source": "providers/cursor.kdl:19",
7477
7516
  "providers": [
7478
7517
  "cursor"
7479
7518
  ],
@@ -7496,7 +7535,7 @@
7496
7535
  }
7497
7536
  },
7498
7537
  {
7499
- "source": "providers/cursor.kdl:20",
7538
+ "source": "providers/cursor.kdl:25",
7500
7539
  "providers": [
7501
7540
  "cursor"
7502
7541
  ],
@@ -7530,7 +7569,7 @@
7530
7569
  }
7531
7570
  },
7532
7571
  {
7533
- "source": "providers/cursor.kdl:23",
7572
+ "source": "providers/cursor.kdl:28",
7534
7573
  "providers": [
7535
7574
  "cursor"
7536
7575
  ],
@@ -7564,7 +7603,7 @@
7564
7603
  }
7565
7604
  },
7566
7605
  {
7567
- "source": "providers/cursor.kdl:27",
7606
+ "source": "providers/cursor.kdl:32",
7568
7607
  "providers": [
7569
7608
  "cursor"
7570
7609
  ],
@@ -7582,7 +7621,7 @@
7582
7621
  }
7583
7622
  },
7584
7623
  {
7585
- "source": "providers/cursor.kdl:31",
7624
+ "source": "providers/cursor.kdl:36",
7586
7625
  "providers": [
7587
7626
  "cursor"
7588
7627
  ],
@@ -7615,7 +7654,7 @@
7615
7654
  }
7616
7655
  },
7617
7656
  {
7618
- "source": "providers/cursor.kdl:35",
7657
+ "source": "providers/cursor.kdl:40",
7619
7658
  "providers": [
7620
7659
  "cursor"
7621
7660
  ],
@@ -7655,7 +7694,7 @@
7655
7694
  }
7656
7695
  },
7657
7696
  {
7658
- "source": "providers/cursor.kdl:40",
7697
+ "source": "providers/cursor.kdl:45",
7659
7698
  "providers": [
7660
7699
  "cursor"
7661
7700
  ],
@@ -7674,7 +7713,7 @@
7674
7713
  }
7675
7714
  },
7676
7715
  {
7677
- "source": "providers/cursor.kdl:44",
7716
+ "source": "providers/cursor.kdl:49",
7678
7717
  "providers": [
7679
7718
  "cursor"
7680
7719
  ],
@@ -13245,7 +13284,7 @@
13245
13284
  }
13246
13285
  },
13247
13286
  {
13248
- "source": "providers/zai.kdl:29",
13287
+ "source": "providers/zai.kdl:32",
13249
13288
  "providers": [
13250
13289
  "zai"
13251
13290
  ],
@@ -13255,6 +13294,9 @@
13255
13294
  "value": "glm-5.3-flash"
13256
13295
  }
13257
13296
  ],
13297
+ "wire": {
13298
+ "clampOutputToModelMax": true
13299
+ },
13258
13300
  "thinking": {
13259
13301
  "mode": "anthropic-budget-effort"
13260
13302
  }
@@ -14148,6 +14190,20 @@
14148
14190
  ],
14149
14191
  "default": "openai-completions"
14150
14192
  },
14193
+ {
14194
+ "provider": "zai",
14195
+ "routes": [
14196
+ {
14197
+ "api": "openai-completions",
14198
+ "match": {
14199
+ "exact": [
14200
+ "glm-5.3-flash"
14201
+ ]
14202
+ }
14203
+ }
14204
+ ],
14205
+ "default": "anthropic-messages"
14206
+ },
14151
14207
  {
14152
14208
  "provider": "opencode-zen",
14153
14209
  "routes": [