@linxiraos/pi-catalog 1.1.4 → 1.1.6

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.
@@ -60,7 +60,10 @@ export function resolveModelCacheProviderId(providerId: string, options: ModelCa
60
60
  return "cursor:default-effort-v4";
61
61
  case "litellm": {
62
62
  const baseUrl = options.baseUrl ?? getDefaultModelDiscoveryBaseUrl(providerId)!;
63
- return `litellm:rich-v6:${Bun.hash(baseUrl).toString(36)}`;
63
+ // rich-v8 invalidates rows whose `compatConfig` retained a colliding
64
+ // bundled model's provider-specific transport (e.g. Fireworks
65
+ // `wireModelIdMode`) before that leak was fixed (issue #9938).
66
+ return `litellm:rich-v8:${Bun.hash(baseUrl).toString(36)}`;
64
67
  }
65
68
  case "opencode-go":
66
69
  case "opencode-zen": {
@@ -19,6 +19,7 @@ import {
19
19
  cerebrasModelManagerOptions,
20
20
  cloudflareAiGatewayModelManagerOptions,
21
21
  coreWeaveModelManagerOptions,
22
+ deepinfraModelManagerOptions,
22
23
  deepseekModelManagerOptions,
23
24
  firepassModelManagerOptions,
24
25
  fireworksModelManagerOptions,
@@ -56,6 +57,7 @@ import {
56
57
  xaiModelManagerOptions,
57
58
  xaiOAuthModelManagerOptions,
58
59
  xiaomiModelManagerOptions,
60
+ yoloAutoModelManagerOptions,
59
61
  zenmuxModelManagerOptions,
60
62
  zhipuCodingPlanModelManagerOptions,
61
63
  } from "./openai-compat";
@@ -150,6 +152,14 @@ export const CATALOG_PROVIDERS = [
150
152
  createModelManagerOptions: (config: ModelManagerConfig) => cursorModelManagerOptions(config),
151
153
  catalogDiscovery: { label: "Cursor", envVars: ["CURSOR_API_KEY"], oauthProvider: "cursor" },
152
154
  },
155
+ {
156
+ id: "deepinfra",
157
+ defaultModel: "deepseek-ai/DeepSeek-V4-Flash-0731",
158
+ envVars: ["DEEPINFRA_API_KEY"],
159
+ createModelManagerOptions: (config: ModelManagerConfig) => deepinfraModelManagerOptions(config),
160
+ dynamicModelsAuthoritative: true,
161
+ catalogDiscovery: { label: "DeepInfra", allowUnauthenticated: true },
162
+ },
153
163
  {
154
164
  id: "deepseek",
155
165
  defaultModel: "deepseek-v4-pro",
@@ -413,7 +423,7 @@ export const CATALOG_PROVIDERS = [
413
423
  },
414
424
  {
415
425
  id: "synthetic",
416
- defaultModel: "hf:zai-org/GLM-5.1",
426
+ defaultModel: "hf:zai-org/GLM-5.2",
417
427
  envVars: ["SYNTHETIC_API_KEY"],
418
428
  createModelManagerOptions: (config: ModelManagerConfig) => syntheticModelManagerOptions(config),
419
429
  dynamicModelsAuthoritative: true,
@@ -521,6 +531,14 @@ export const CATALOG_PROVIDERS = [
521
531
  createModelManagerOptions: (config: ModelManagerConfig) =>
522
532
  xiaomiModelManagerOptions({ ...config, providerId: "xiaomi-token-plan-sgp", tokenPlanRegion: "sgp" }),
523
533
  },
534
+ {
535
+ id: "yolo-auto",
536
+ defaultModel: "deepseek-flash-v4",
537
+ envVars: ["YOLO_AUTO_API_KEY"],
538
+ createModelManagerOptions: (config: ModelManagerConfig) => yoloAutoModelManagerOptions(config),
539
+ dynamicModelsAuthoritative: true,
540
+ catalogDiscovery: { label: "Yolo-Auto" },
541
+ },
524
542
  {
525
543
  id: "zai",
526
544
  defaultModel: "glm-5.3",
@@ -0,0 +1,38 @@
1
+ import type { Api, ModelSpec } from "../types";
2
+
3
+ const BEDROCK_MANTLE_OPENAI_MODEL_IDS: Readonly<Record<string, true>> = {
4
+ "openai.gpt-5.4": true,
5
+ "openai.gpt-5.5": true,
6
+ "openai.gpt-5.6-luna": true,
7
+ "openai.gpt-5.6-sol": true,
8
+ "openai.gpt-5.6-terra": true,
9
+ };
10
+
11
+ /**
12
+ * Remove models.dev rows that OMP cannot route successfully.
13
+ *
14
+ * Generation and runtime refresh share this policy so a live catalog cannot
15
+ * reintroduce selectors deliberately excluded from the bundled catalog.
16
+ */
17
+ export function filterModelsDevCatalogRows<TApi extends Api>(models: readonly ModelSpec<TApi>[]): ModelSpec<TApi>[] {
18
+ return models.filter(model => {
19
+ if (model.provider === "amazon-bedrock") {
20
+ // AWS does not document the jp. Opus 5 profile, and the openai.gpt-5.x
21
+ // rows are Mantle-only ids that Bedrock rejects or misroutes.
22
+ return model.id !== "jp.anthropic.claude-opus-5" && !BEDROCK_MANTLE_OPENAI_MODEL_IDS[model.id];
23
+ }
24
+ if (model.provider === "zai") {
25
+ // [1m] is a Claude Code selector convention, not an inference id.
26
+ return !model.id.endsWith("[1m]");
27
+ }
28
+ if (model.provider === "fireworks" || model.provider === "firepass") {
29
+ // Control-plane resource ids are not accepted by the inference API.
30
+ return !model.id.startsWith("accounts/fireworks/");
31
+ }
32
+ if (model.provider === "xiaomi" || model.provider.startsWith("xiaomi-token-plan-")) {
33
+ // Text-chat transports cannot serve Xiaomi's audio-only models.
34
+ return !model.id.includes("-tts") && !model.id.includes("-asr");
35
+ }
36
+ return true;
37
+ });
38
+ }