@oh-my-pi/pi-catalog 16.1.8 → 16.1.9

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,17 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [16.1.9] - 2026-06-21
6
+
7
+ ### Fixed
8
+
9
+ - Fixed the `moonshot` provider with no path to the Kimi China API: model discovery now honors a `MOONSHOT_BASE_URL` override (redirecting to `api.moonshot.cn`), and `KIMI_API_KEY` resolves as a fallback for `MOONSHOT_API_KEY`. ([#2883](https://github.com/can1357/oh-my-pi/issues/2883))
10
+ - Fixed LiteLLM model discovery preserving colliding models.dev transport metadata (for example `ollama-cloud` `deepseek-v4-flash`) instead of keeping the LiteLLM `openai-completions` provider transport. ([#3162](https://github.com/can1357/oh-my-pi/issues/3162))
11
+
12
+ ### Removed
13
+
14
+ - Removed bundled Wafer Pass (`wafer-pass`) catalog entries and generation support; Wafer Serverless remains available as `wafer-serverless`.
15
+
5
16
  ## [16.1.8] - 2026-06-20
6
17
 
7
18
  ### Fixed
@@ -173,7 +173,7 @@ export declare const CATALOG_PROVIDERS: readonly [{
173
173
  }, {
174
174
  readonly id: "moonshot";
175
175
  readonly defaultModel: "kimi-k2.7-code";
176
- readonly envVars: readonly ["MOONSHOT_API_KEY"];
176
+ readonly envVars: readonly ["MOONSHOT_API_KEY", "KIMI_API_KEY"];
177
177
  readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
178
178
  readonly catalogDiscovery: {
179
179
  readonly label: "Moonshot";
@@ -310,15 +310,6 @@ export declare const CATALOG_PROVIDERS: readonly [{
310
310
  readonly label: "vLLM";
311
311
  readonly allowUnauthenticated: true;
312
312
  };
313
- }, {
314
- readonly id: "wafer-pass";
315
- readonly defaultModel: "GLM-5.1";
316
- readonly envVars: readonly ["WAFER_PASS_API_KEY"];
317
- readonly createModelManagerOptions: (config: ModelManagerConfig) => import("..").ModelManagerOptions<"openai-completions", unknown>;
318
- readonly catalogDiscovery: {
319
- readonly label: "Wafer Pass";
320
- readonly oauthProvider: "wafer-pass";
321
- };
322
313
  }, {
323
314
  readonly id: "wafer-serverless";
324
315
  readonly defaultModel: "GLM-5.1";
@@ -215,7 +215,6 @@ export interface WaferModelManagerConfig {
215
215
  baseUrl?: string;
216
216
  fetch?: FetchImpl;
217
217
  }
218
- export declare function waferPassModelManagerOptions(config?: WaferModelManagerConfig): ModelManagerOptions<"openai-completions">;
219
218
  export declare function waferServerlessModelManagerOptions(config?: WaferModelManagerConfig): ModelManagerOptions<"openai-completions">;
220
219
  export interface MistralModelManagerConfig {
221
220
  apiKey?: string;
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.1.8",
4
+ "version": "16.1.9",
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.1.8",
37
+ "@oh-my-pi/pi-utils": "16.1.9",
38
38
  "arktype": "^2.2.0",
39
39
  "zod": "^4"
40
40
  },
41
41
  "devDependencies": {
42
- "@oh-my-pi/pi-ai": "16.1.8",
42
+ "@oh-my-pi/pi-ai": "16.1.9",
43
43
  "@types/bun": "^1.3.14"
44
44
  },
45
45
  "engines": {
package/src/models.json CHANGED
@@ -77590,64 +77590,6 @@
77590
77590
  }
77591
77591
  }
77592
77592
  },
77593
- "wafer-pass": {
77594
- "GLM-5.1": {
77595
- "id": "GLM-5.1",
77596
- "name": "GLM-5.1",
77597
- "api": "openai-completions",
77598
- "provider": "wafer-pass",
77599
- "baseUrl": "https://pass.wafer.ai/v1",
77600
- "reasoning": true,
77601
- "input": [
77602
- "text"
77603
- ],
77604
- "cost": {
77605
- "input": 0,
77606
- "output": 0,
77607
- "cacheRead": 0,
77608
- "cacheWrite": 0
77609
- },
77610
- "contextWindow": 202752,
77611
- "maxTokens": 65536,
77612
- "compat": {
77613
- "supportsDeveloperRole": false,
77614
- "thinkingFormat": "zai",
77615
- "reasoningContentField": "reasoning_content"
77616
- },
77617
- "thinking": {
77618
- "mode": "effort",
77619
- "efforts": [
77620
- "minimal",
77621
- "low",
77622
- "medium",
77623
- "high"
77624
- ]
77625
- }
77626
- },
77627
- "Qwen3.5-397B-A17B": {
77628
- "id": "Qwen3.5-397B-A17B",
77629
- "name": "Qwen3.5-397B-A17B",
77630
- "api": "openai-completions",
77631
- "provider": "wafer-pass",
77632
- "baseUrl": "https://pass.wafer.ai/v1",
77633
- "reasoning": false,
77634
- "input": [
77635
- "text",
77636
- "image"
77637
- ],
77638
- "cost": {
77639
- "input": 0,
77640
- "output": 0,
77641
- "cacheRead": 0,
77642
- "cacheWrite": 0
77643
- },
77644
- "contextWindow": 262144,
77645
- "maxTokens": 65536,
77646
- "compat": {
77647
- "supportsDeveloperRole": false
77648
- }
77649
- }
77650
- },
77651
77593
  "wafer-serverless": {
77652
77594
  "deepseek-v4-flash": {
77653
77595
  "id": "deepseek-v4-flash",
@@ -41,7 +41,6 @@ import {
41
41
  veniceModelManagerOptions,
42
42
  vercelAiGatewayModelManagerOptions,
43
43
  vllmModelManagerOptions,
44
- waferPassModelManagerOptions,
45
44
  waferServerlessModelManagerOptions,
46
45
  xaiModelManagerOptions,
47
46
  xaiOAuthModelManagerOptions,
@@ -219,7 +218,9 @@ export const CATALOG_PROVIDERS = [
219
218
  {
220
219
  id: "moonshot",
221
220
  defaultModel: "kimi-k2.7-code",
222
- envVars: ["MOONSHOT_API_KEY"],
221
+ // KIMI_API_KEY is the most intuitive name for a Kimi/Moonshot key; accept it
222
+ // as a fallback so China users need not learn MOONSHOT_API_KEY. (#2883)
223
+ envVars: ["MOONSHOT_API_KEY", "KIMI_API_KEY"],
223
224
  createModelManagerOptions: (config: ModelManagerConfig) => moonshotModelManagerOptions(config),
224
225
  catalogDiscovery: { label: "Moonshot" },
225
226
  },
@@ -347,13 +348,6 @@ export const CATALOG_PROVIDERS = [
347
348
  createModelManagerOptions: (config: ModelManagerConfig) => vllmModelManagerOptions(config),
348
349
  catalogDiscovery: { label: "vLLM", allowUnauthenticated: true },
349
350
  },
350
- {
351
- id: "wafer-pass",
352
- defaultModel: "GLM-5.1",
353
- envVars: ["WAFER_PASS_API_KEY"],
354
- createModelManagerOptions: (config: ModelManagerConfig) => waferPassModelManagerOptions(config),
355
- catalogDiscovery: { label: "Wafer Pass", oauthProvider: "wafer-pass" },
356
- },
357
351
  {
358
352
  id: "wafer-serverless",
359
353
  defaultModel: "GLM-5.1",
@@ -197,6 +197,8 @@ function mapWithBundledReference<TApi extends Api>(
197
197
  ...reference,
198
198
  id: defaults.id,
199
199
  name,
200
+ api: defaults.api,
201
+ provider: defaults.provider,
200
202
  baseUrl: defaults.baseUrl,
201
203
  contextWindow: toPositiveNumber(entry.context_length, reference.contextWindow),
202
204
  maxTokens: toPositiveNumber(entry.max_completion_tokens, reference.maxTokens),
@@ -1568,7 +1570,7 @@ export function firepassModelManagerOptions(
1568
1570
  }
1569
1571
 
1570
1572
  // ---------------------------------------------------------------------------
1571
- // 7.7 Wafer (Pass + Serverless)
1573
+ // 7.7 Wafer Serverless
1572
1574
  // ---------------------------------------------------------------------------
1573
1575
 
1574
1576
  export interface WaferModelManagerConfig {
@@ -1581,13 +1583,14 @@ const WAFER_DEFAULT_BASE_URL = "https://pass.wafer.ai/v1";
1581
1583
  const WAFER_MAX_TOKENS_CAP = 65536;
1582
1584
 
1583
1585
  /**
1584
- * Shared mapper for Wafer's `/v1/models` records.
1586
+ * Mapper for Wafer Serverless `/v1/models` records.
1585
1587
  *
1586
- * Wafer wraps each entry with a `wafer` envelope describing tier, capabilities,
1587
- * and cents-per-million pricing. The mapper folds that metadata into the
1588
- * canonical `ModelSpec<"openai-completions">` shape and applies zai-family thinking
1589
- * compat when the entry advertises reasoning support (GLM-family on the Pass
1590
- * SKU). Cents-per-million dollars-per-million via /100.
1588
+ * Wafer wraps each entry with a `wafer` envelope describing capabilities and
1589
+ * pricing. The mapper folds that metadata into the canonical
1590
+ * `ModelSpec<"openai-completions">` shape and applies upstream-specific thinking
1591
+ * compat when the entry advertises reasoning support. Wafer pricing is exposed
1592
+ * through internal wholesale units; the public Serverless rate equals
1593
+ * `cents × 125 / 10000`.
1591
1594
  */
1592
1595
  interface WaferRecord {
1593
1596
  context_length?: unknown;
@@ -1608,7 +1611,7 @@ function readWaferRecord(entry: OpenAICompatibleModelRecord): WaferRecord | unde
1608
1611
  }
1609
1612
 
1610
1613
  function mapWaferModel(
1611
- providerId: "wafer-pass" | "wafer-serverless",
1614
+ providerId: "wafer-serverless",
1612
1615
  baseUrl: string,
1613
1616
  entry: OpenAICompatibleModelRecord,
1614
1617
  defaults: ModelSpec<"openai-completions">,
@@ -1624,25 +1627,12 @@ function mapWaferModel(
1624
1627
  );
1625
1628
  const maxTokens = contextWindow !== null ? Math.min(contextWindow, WAFER_MAX_TOKENS_CAP) : null;
1626
1629
  const pricing = wafer?.pricing ?? {};
1627
- // Wafer's `/v1/models` exposes pricing through `*_cents_per_million` fields,
1628
- // but the values are an internal wholesale unit, not literal cents — across
1629
- // every published Serverless model on wafer.ai the user-facing rate equals
1630
- // `cents × 125 / 10000` (i.e. wholesale × 1.25 / 100; GLM-5.1's `120` →
1631
- // $1.50/M, Kimi-K2.6's `88` → $1.10/M, etc.). The multiply-first form keeps
1632
- // the result a finite dyadic for every observed value.
1633
- // For the Pass SKU the per-token rate is bundled in the flat-rate
1634
- // subscription, so we follow the convention shared with
1635
- // `kimi-code`/`firepass`/`alibaba-coding-plan` and seed every Pass model with
1636
- // `cost: 0` regardless of what the upstream envelope says.
1637
- const isPassSku = providerId === "wafer-pass";
1638
- const cost = isPassSku
1639
- ? { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }
1640
- : {
1641
- input: (toPositiveNumber(pricing.input_cents_per_million, 0) * 125) / 10000,
1642
- output: (toPositiveNumber(pricing.output_cents_per_million, 0) * 125) / 10000,
1643
- cacheRead: (toPositiveNumber(pricing.cache_read_cents_per_million, 0) * 125) / 10000,
1644
- cacheWrite: 0,
1645
- };
1630
+ const cost = {
1631
+ input: (toPositiveNumber(pricing.input_cents_per_million, 0) * 125) / 10000,
1632
+ output: (toPositiveNumber(pricing.output_cents_per_million, 0) * 125) / 10000,
1633
+ cacheRead: (toPositiveNumber(pricing.cache_read_cents_per_million, 0) * 125) / 10000,
1634
+ cacheWrite: 0,
1635
+ };
1646
1636
  const name = toModelName(wafer?.display_name, defaults.name);
1647
1637
  const base: ModelSpec<"openai-completions"> = {
1648
1638
  ...defaults,
@@ -1688,13 +1678,12 @@ function mapWaferModel(
1688
1678
  };
1689
1679
  }
1690
1680
 
1691
- function createWaferOptions(
1692
- providerId: "wafer-pass" | "wafer-serverless",
1693
- config: WaferModelManagerConfig | undefined,
1681
+ export function waferServerlessModelManagerOptions(
1682
+ config?: WaferModelManagerConfig,
1694
1683
  ): ModelManagerOptions<"openai-completions"> {
1695
1684
  const apiKey = config?.apiKey;
1696
1685
  const baseUrl = config?.baseUrl ?? WAFER_DEFAULT_BASE_URL;
1697
- const passOnly = providerId === "wafer-pass";
1686
+ const providerId = "wafer-serverless" as const;
1698
1687
  return {
1699
1688
  providerId,
1700
1689
  ...(apiKey && {
@@ -1704,11 +1693,6 @@ function createWaferOptions(
1704
1693
  provider: providerId,
1705
1694
  baseUrl,
1706
1695
  apiKey,
1707
- filterModel: entry => {
1708
- if (!passOnly) return true;
1709
- const wafer = readWaferRecord(entry);
1710
- return wafer?.tier === "pass_included";
1711
- },
1712
1696
  mapModel: (entry, defaults) => mapWaferModel(providerId, baseUrl, entry, defaults),
1713
1697
  fetch: config?.fetch,
1714
1698
  }),
@@ -1716,18 +1700,6 @@ function createWaferOptions(
1716
1700
  };
1717
1701
  }
1718
1702
 
1719
- export function waferPassModelManagerOptions(
1720
- config?: WaferModelManagerConfig,
1721
- ): ModelManagerOptions<"openai-completions"> {
1722
- return createWaferOptions("wafer-pass", config);
1723
- }
1724
-
1725
- export function waferServerlessModelManagerOptions(
1726
- config?: WaferModelManagerConfig,
1727
- ): ModelManagerOptions<"openai-completions"> {
1728
- return createWaferOptions("wafer-serverless", config);
1729
- }
1730
-
1731
1703
  // ---------------------------------------------------------------------------
1732
1704
  // 7. Mistral
1733
1705
  // ---------------------------------------------------------------------------
@@ -2493,7 +2465,10 @@ export function moonshotModelManagerOptions(
2493
2465
  config?: MoonshotModelManagerConfig,
2494
2466
  ): ModelManagerOptions<"openai-completions"> {
2495
2467
  const apiKey = config?.apiKey;
2496
- const baseUrl = config?.baseUrl ?? "https://api.moonshot.ai/v1";
2468
+ // `MOONSHOT_BASE_URL` redirects discovery (and the streaming request that
2469
+ // inherits this baseUrl) at the Kimi China platform `api.moonshot.cn`; an
2470
+ // explicit `config.baseUrl` still wins. Mirrors LITELLM_BASE_URL/LM_STUDIO_BASE_URL. (#2883)
2471
+ const baseUrl = config?.baseUrl ?? Bun.env.MOONSHOT_BASE_URL ?? "https://api.moonshot.ai/v1";
2497
2472
  const references = createBundledReferenceMap<"openai-completions">("moonshot");
2498
2473
  return {
2499
2474
  providerId: "moonshot",