@oh-my-pi/pi-catalog 16.0.1 → 16.0.2

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,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [16.0.2] - 2026-06-16
6
+
7
+ ### Fixed
8
+
9
+ - Fixed Kimi output caps for Umans AI Coding Plan and Venice so discovery metadata cannot use context-sized token ceilings as request caps.
10
+ - Marked Umans Anthropic-compatible models as client-tool escaped so cached and bundled metadata do not expose `web_search` as a provider server tool.
11
+
5
12
  ## [16.0.1] - 2026-06-15
6
13
 
7
14
  ### Added
@@ -65,6 +65,10 @@ export declare const KNOWN_HOSTS: {
65
65
  readonly providers: readonly ["alibaba-coding-plan"];
66
66
  readonly urlMarkers: readonly ["dashscope"];
67
67
  };
68
+ readonly umans: {
69
+ readonly providers: readonly ["umans"];
70
+ readonly urlMarkers: readonly ["api.code.umans.ai"];
71
+ };
68
72
  readonly xiaomi: {
69
73
  readonly providers: readonly ["xiaomi"];
70
74
  readonly providerPrefixes: readonly ["xiaomi-token-plan-"];
@@ -172,6 +172,14 @@ export declare function isFireworksKimiK2ModelId(modelId: string): boolean;
172
172
  */
173
173
  export declare function clampFireworksKimiMaxTokens(modelId: string, candidate: number): number;
174
174
  export declare function clampFireworksKimiMaxTokens(modelId: string, candidate: number | null): number | null;
175
+ /**
176
+ * Kimi K2.7 Code's documented recommended output budget. Some provider
177
+ * discovery rows report the context-sized `max_completion_tokens` instead.
178
+ */
179
+ export declare const KIMI_K27_CODE_RECOMMENDED_MAX_TOKENS = 32768;
180
+ export declare function isKimiK27CodeModelId(modelId: string): boolean;
181
+ export declare function clampKimiK27CodeMaxTokens(modelId: string, candidate: number): number;
182
+ export declare function clampKimiK27CodeMaxTokens(modelId: string, candidate: number | null): number | null;
175
183
  /**
176
184
  * Fireworks DeepSeek V4 accepts effort via `reasoning_effort` but rejects the
177
185
  * DeepSeek-native binary `thinking` toggle when both are present.
@@ -285,6 +285,13 @@ export interface AnthropicCompat {
285
285
  * Default: auto-detected from provider/baseUrl and `model.reasoning`.
286
286
  */
287
287
  replayUnsignedThinking?: boolean;
288
+ /**
289
+ * Prefix Anthropic built-in tool names (`web_search`, `code_execution`, ...)
290
+ * when they are ordinary client tools. Some Anthropic-compatible gateways
291
+ * intercept those exact names as server tools and return raw search/result
292
+ * blocks instead of normal `tool_use` calls.
293
+ */
294
+ escapeBuiltinToolNames?: boolean;
288
295
  }
289
296
  /**
290
297
  * OpenRouter provider routing preferences.
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.1",
4
+ "version": "16.0.2",
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.1",
37
+ "@oh-my-pi/pi-utils": "16.0.2",
38
38
  "zod": "^4"
39
39
  },
40
40
  "devDependencies": {
41
- "@oh-my-pi/pi-ai": "16.0.1",
41
+ "@oh-my-pi/pi-ai": "16.0.2",
42
42
  "@types/bun": "^1.3.14"
43
43
  },
44
44
  "engines": {
@@ -67,6 +67,7 @@ export function buildAnthropicCompat(spec: ModelSpec<"anthropic-messages">): Res
67
67
  // arguments (#2005). Known non-signing hosts (Z.AI, DeepSeek) are also
68
68
  // preserved for compatibility.
69
69
  replayUnsignedThinking: isZai || modelMatchesHost(spec, "deepseekFamily") || (spec.reasoning && !official),
70
+ escapeBuiltinToolNames: modelMatchesHost(spec, "umans"),
70
71
  };
71
72
  applyCompatOverrides(compat, spec.compat);
72
73
  return compat;
package/src/hosts.ts CHANGED
@@ -42,6 +42,7 @@ export const KNOWN_HOSTS = {
42
42
  zhipu: { providers: ["zhipu-coding-plan"], urlMarkers: ["open.bigmodel.cn"] },
43
43
  kilo: { providers: ["kilo"], urlMarkers: ["api.kilo.ai"] },
44
44
  alibabaDashscope: { providers: ["alibaba-coding-plan"], urlMarkers: ["dashscope"] },
45
+ umans: { providers: ["umans"], urlMarkers: ["api.code.umans.ai"] },
45
46
  xiaomi: { providers: ["xiaomi"], providerPrefixes: ["xiaomi-token-plan-"], urlMarkers: ["xiaomimimo.com"] },
46
47
  xai: { providers: ["xai"], urlMarkers: ["api.x.ai"] },
47
48
  mistral: { providers: ["mistral"], urlMarkers: ["mistral.ai"] },
package/src/models.json CHANGED
@@ -60012,8 +60012,8 @@
60012
60012
  "text"
60013
60013
  ],
60014
60014
  "cost": {
60015
- "input": 0.09,
60016
- "output": 0.18,
60015
+ "input": 0.098,
60016
+ "output": 0.196,
60017
60017
  "cacheRead": 0.02,
60018
60018
  "cacheWrite": 0
60019
60019
  },
@@ -65288,7 +65288,7 @@
65288
65288
  "cacheWrite": 0
65289
65289
  },
65290
65290
  "contextWindow": 262144,
65291
- "maxTokens": 262144,
65291
+ "maxTokens": 81920,
65292
65292
  "thinking": {
65293
65293
  "mode": "effort",
65294
65294
  "efforts": [
@@ -65311,12 +65311,12 @@
65311
65311
  "image"
65312
65312
  ],
65313
65313
  "cost": {
65314
- "input": 0.39,
65315
- "output": 2.34,
65314
+ "input": 0.385,
65315
+ "output": 2.4499999999999997,
65316
65316
  "cacheRead": 0.195,
65317
65317
  "cacheWrite": 0
65318
65318
  },
65319
- "contextWindow": 262144,
65319
+ "contextWindow": 256000,
65320
65320
  "maxTokens": 65536,
65321
65321
  "thinking": {
65322
65322
  "mode": "effort",
@@ -65932,13 +65932,13 @@
65932
65932
  "text"
65933
65933
  ],
65934
65934
  "cost": {
65935
- "input": 0.063,
65936
- "output": 0.21,
65937
- "cacheRead": 0.020999999999999998,
65935
+ "input": 0.06599999999999999,
65936
+ "output": 0.26,
65937
+ "cacheRead": 0.029,
65938
65938
  "cacheWrite": 0
65939
65939
  },
65940
65940
  "contextWindow": 262144,
65941
- "maxTokens": 64000,
65941
+ "maxTokens": 262144,
65942
65942
  "thinking": {
65943
65943
  "mode": "effort",
65944
65944
  "efforts": [
@@ -68906,7 +68906,7 @@
68906
68906
  "cacheWrite": 0
68907
68907
  },
68908
68908
  "contextWindow": 262144,
68909
- "maxTokens": 262144,
68909
+ "maxTokens": 32768,
68910
68910
  "thinking": {
68911
68911
  "mode": "budget",
68912
68912
  "efforts": [
@@ -68916,6 +68916,9 @@
68916
68916
  "high",
68917
68917
  "xhigh"
68918
68918
  ]
68919
+ },
68920
+ "compat": {
68921
+ "escapeBuiltinToolNames": true
68919
68922
  }
68920
68923
  },
68921
68924
  "umans-flash": {
@@ -68936,7 +68939,7 @@
68936
68939
  "cacheWrite": 0
68937
68940
  },
68938
68941
  "contextWindow": 262144,
68939
- "maxTokens": 262144,
68942
+ "maxTokens": 32768,
68940
68943
  "thinking": {
68941
68944
  "mode": "budget",
68942
68945
  "efforts": [
@@ -68946,11 +68949,14 @@
68946
68949
  "high",
68947
68950
  "xhigh"
68948
68951
  ]
68952
+ },
68953
+ "compat": {
68954
+ "escapeBuiltinToolNames": true
68949
68955
  }
68950
68956
  },
68951
68957
  "umans-glm-5.1": {
68952
68958
  "id": "umans-glm-5.1",
68953
- "name": "GLM 5.1",
68959
+ "name": "Umans GLM 5.1",
68954
68960
  "api": "anthropic-messages",
68955
68961
  "provider": "umans",
68956
68962
  "baseUrl": "https://api.code.umans.ai",
@@ -68965,7 +68971,7 @@
68965
68971
  "cacheRead": 0,
68966
68972
  "cacheWrite": 0
68967
68973
  },
68968
- "contextWindow": 204800,
68974
+ "contextWindow": 202752,
68969
68975
  "maxTokens": 131072,
68970
68976
  "thinking": {
68971
68977
  "mode": "budget",
@@ -68976,11 +68982,14 @@
68976
68982
  "high",
68977
68983
  "xhigh"
68978
68984
  ]
68985
+ },
68986
+ "compat": {
68987
+ "escapeBuiltinToolNames": true
68979
68988
  }
68980
68989
  },
68981
68990
  "umans-kimi-k2.6": {
68982
68991
  "id": "umans-kimi-k2.6",
68983
- "name": "Kimi K2.6",
68992
+ "name": "Umans Kimi K2.6",
68984
68993
  "api": "anthropic-messages",
68985
68994
  "provider": "umans",
68986
68995
  "baseUrl": "https://api.code.umans.ai",
@@ -68996,7 +69005,7 @@
68996
69005
  "cacheWrite": 0
68997
69006
  },
68998
69007
  "contextWindow": 262144,
68999
- "maxTokens": 262144,
69008
+ "maxTokens": 32768,
69000
69009
  "thinking": {
69001
69010
  "mode": "budget",
69002
69011
  "efforts": [
@@ -69006,11 +69015,14 @@
69006
69015
  "high",
69007
69016
  "xhigh"
69008
69017
  ]
69018
+ },
69019
+ "compat": {
69020
+ "escapeBuiltinToolNames": true
69009
69021
  }
69010
69022
  },
69011
69023
  "umans-kimi-k2.7": {
69012
69024
  "id": "umans-kimi-k2.7",
69013
- "name": "Kimi K2.7 Code",
69025
+ "name": "Umans Kimi K2.7 Code",
69014
69026
  "api": "anthropic-messages",
69015
69027
  "provider": "umans",
69016
69028
  "baseUrl": "https://api.code.umans.ai",
@@ -69026,7 +69038,7 @@
69026
69038
  "cacheWrite": 0
69027
69039
  },
69028
69040
  "contextWindow": 262144,
69029
- "maxTokens": 262144,
69041
+ "maxTokens": 32768,
69030
69042
  "thinking": {
69031
69043
  "mode": "budget",
69032
69044
  "efforts": [
@@ -69037,11 +69049,14 @@
69037
69049
  "xhigh"
69038
69050
  ],
69039
69051
  "requiresEffort": true
69052
+ },
69053
+ "compat": {
69054
+ "escapeBuiltinToolNames": true
69040
69055
  }
69041
69056
  },
69042
69057
  "umans-qwen3.6-35b-a3b": {
69043
69058
  "id": "umans-qwen3.6-35b-a3b",
69044
- "name": "Qwen3.6 35B A3B",
69059
+ "name": "Umans Qwen3.6 35B A3B",
69045
69060
  "api": "anthropic-messages",
69046
69061
  "provider": "umans",
69047
69062
  "baseUrl": "https://api.code.umans.ai",
@@ -69057,7 +69072,7 @@
69057
69072
  "cacheWrite": 0
69058
69073
  },
69059
69074
  "contextWindow": 262144,
69060
- "maxTokens": 262144,
69075
+ "maxTokens": 32768,
69061
69076
  "thinking": {
69062
69077
  "mode": "budget",
69063
69078
  "efforts": [
@@ -69067,6 +69082,9 @@
69067
69082
  "high",
69068
69083
  "xhigh"
69069
69084
  ]
69085
+ },
69086
+ "compat": {
69087
+ "escapeBuiltinToolNames": true
69070
69088
  }
69071
69089
  }
69072
69090
  },
@@ -70539,6 +70557,28 @@
70539
70557
  ]
70540
70558
  }
70541
70559
  },
70560
+ "kimi-k2-7-code": {
70561
+ "id": "kimi-k2-7-code",
70562
+ "name": "kimi-k2-7-code",
70563
+ "api": "openai-completions",
70564
+ "provider": "venice",
70565
+ "baseUrl": "https://api.venice.ai/api/v1",
70566
+ "reasoning": false,
70567
+ "input": [
70568
+ "text"
70569
+ ],
70570
+ "cost": {
70571
+ "input": 0,
70572
+ "output": 0,
70573
+ "cacheRead": 0,
70574
+ "cacheWrite": 0
70575
+ },
70576
+ "contextWindow": 256000,
70577
+ "maxTokens": 32768,
70578
+ "compat": {
70579
+ "supportsUsageInStreaming": false
70580
+ }
70581
+ },
70542
70582
  "kimi-k2-thinking": {
70543
70583
  "id": "kimi-k2-thinking",
70544
70584
  "name": "Kimi K2 Thinking",
@@ -72288,7 +72328,8 @@
72288
72328
  "supportsForcedToolChoice": true,
72289
72329
  "supportsSamplingParams": true,
72290
72330
  "requiresToolResultId": false,
72291
- "replayUnsignedThinking": false
72331
+ "replayUnsignedThinking": false,
72332
+ "escapeBuiltinToolNames": false
72292
72333
  }
72293
72334
  },
72294
72335
  "alibaba/qwen3-max-preview": {
@@ -658,13 +658,17 @@ function mapUmansModelInfo(
658
658
  api: "anthropic-messages",
659
659
  provider: "umans",
660
660
  baseUrl,
661
+ compat: { ...reference?.compat, escapeBuiltinToolNames: true },
661
662
  reasoning: thinking !== undefined,
662
663
  ...(thinking ? { thinking } : {}),
663
664
  input: umansSupportsVision(capabilities.supports_vision) ? ["text", "image"] : ["text"],
664
665
  ...(supportsTools === false ? { supportsTools: false } : {}),
665
666
  cost: reference?.cost ?? { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
666
667
  contextWindow: toPositiveNumber(capabilities.context_window, reference?.contextWindow ?? null),
667
- maxTokens: toPositiveNumber(capabilities.max_completion_tokens, reference?.maxTokens ?? null),
668
+ maxTokens: toPositiveNumber(
669
+ capabilities.recommended_max_tokens,
670
+ toPositiveNumber(capabilities.max_completion_tokens, reference?.maxTokens ?? null),
671
+ ),
668
672
  };
669
673
  }
670
674
 
@@ -1232,6 +1236,23 @@ export function clampFireworksKimiMaxTokens(modelId: string, candidate: number |
1232
1236
  return isFireworksKimiK2ModelId(modelId) ? Math.min(candidate, FIREWORKS_KIMI_MAX_TOKENS) : candidate;
1233
1237
  }
1234
1238
 
1239
+ /**
1240
+ * Kimi K2.7 Code's documented recommended output budget. Some provider
1241
+ * discovery rows report the context-sized `max_completion_tokens` instead.
1242
+ */
1243
+ export const KIMI_K27_CODE_RECOMMENDED_MAX_TOKENS = 32_768;
1244
+
1245
+ export function isKimiK27CodeModelId(modelId: string): boolean {
1246
+ return /(?:^|\/)kimi[-._]?k2(?:[._-]?|p)7[-._]?code$/i.test(modelId);
1247
+ }
1248
+
1249
+ export function clampKimiK27CodeMaxTokens(modelId: string, candidate: number): number;
1250
+ export function clampKimiK27CodeMaxTokens(modelId: string, candidate: number | null): number | null;
1251
+ export function clampKimiK27CodeMaxTokens(modelId: string, candidate: number | null): number | null {
1252
+ if (candidate === null) return null;
1253
+ return isKimiK27CodeModelId(modelId) ? Math.min(candidate, KIMI_K27_CODE_RECOMMENDED_MAX_TOKENS) : candidate;
1254
+ }
1255
+
1235
1256
  /**
1236
1257
  * Fireworks DeepSeek V4 accepts effort via `reasoning_effort` but rejects the
1237
1258
  * DeepSeek-native binary `thinking` toggle when both are present.
@@ -2276,6 +2297,7 @@ export function veniceModelManagerOptions(
2276
2297
  const model = mapWithBundledReference(entry, defaults, reference);
2277
2298
  return {
2278
2299
  ...model,
2300
+ maxTokens: clampKimiK27CodeMaxTokens(defaults.id, model.maxTokens),
2279
2301
  compat: { ...model.compat, supportsUsageInStreaming: false },
2280
2302
  };
2281
2303
  },
@@ -3544,7 +3566,12 @@ const MODELS_DEV_PROVIDER_DESCRIPTORS_SPECIALIZED: readonly ModelsDevProviderDes
3544
3566
  // --- Synthetic ---
3545
3567
  openAiCompletionsDescriptor("synthetic", "synthetic", "https://api.synthetic.new/openai/v1"),
3546
3568
  // --- Venice AI ---
3547
- openAiCompletionsDescriptor("venice", "venice", "https://api.venice.ai/api/v1"),
3569
+ openAiCompletionsDescriptor("venice", "venice", "https://api.venice.ai/api/v1", {
3570
+ transformModel: model => {
3571
+ const maxTokens = clampKimiK27CodeMaxTokens(model.id, model.maxTokens);
3572
+ return maxTokens === model.maxTokens ? model : { ...model, maxTokens };
3573
+ },
3574
+ }),
3548
3575
  // --- Ollama Cloud ---
3549
3576
  simpleModelsDevDescriptor("ollama-cloud", "ollama-cloud", "ollama-chat", "https://ollama.com"),
3550
3577
  // --- Xiaomi Token Plan ---
package/src/types.ts CHANGED
@@ -311,6 +311,13 @@ export interface AnthropicCompat {
311
311
  * Default: auto-detected from provider/baseUrl and `model.reasoning`.
312
312
  */
313
313
  replayUnsignedThinking?: boolean;
314
+ /**
315
+ * Prefix Anthropic built-in tool names (`web_search`, `code_execution`, ...)
316
+ * when they are ordinary client tools. Some Anthropic-compatible gateways
317
+ * intercept those exact names as server tools and return raw search/result
318
+ * blocks instead of normal `tool_use` calls.
319
+ */
320
+ escapeBuiltinToolNames?: boolean;
314
321
  }
315
322
 
316
323
  /**