@oh-my-pi/pi-catalog 15.11.0 → 15.11.1

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
+ ## [15.11.1] - 2026-06-11
6
+
7
+ ### Fixed
8
+
9
+ - Fixed NVIDIA NIM Qwen turns failing with `400 Validation: Unsupported parameter(s): enable_thinking`. NIM's chat-completions schema is `additionalProperties: false` and exposes thinking via the vLLM convention `chat_template_kwargs.enable_thinking`; `buildOpenAICompat` was sending top-level `enable_thinking` for every `qwen/*` id regardless of host. Registered `nvidia` as a known host (`integrate.api.nvidia.com`) and routed NVIDIA-hosted Qwen models to `thinkingFormat: "qwen-chat-template"` ([#2299](https://github.com/can1357/oh-my-pi/issues/2299)).
10
+ - Fixed Moonshot/Kimi native OpenAI-compatible request metadata so Kimi K2 uses `max_tokens` and omits OpenAI-only `store`, restoring first-turn output with `MOONSHOT_API_KEY` ([#2289](https://github.com/can1357/oh-my-pi/issues/2289)).
11
+
5
12
  ## [15.11.0] - 2026-06-10
6
13
 
7
14
  ### Fixed
@@ -98,6 +98,11 @@ export declare const KNOWN_HOSTS: {
98
98
  readonly providers: readonly ["qwen-portal"];
99
99
  readonly urlMarkers: readonly ["portal.qwen.ai"];
100
100
  };
101
+ /** NVIDIA NIM (`integrate.api.nvidia.com`). Qwen NIM endpoints take `chat_template_kwargs.enable_thinking`, never top-level `enable_thinking`. */
102
+ readonly nvidia: {
103
+ readonly providers: readonly ["nvidia"];
104
+ readonly urlMarkers: readonly ["integrate.api.nvidia.com"];
105
+ };
101
106
  readonly moonshotNative: {
102
107
  readonly providers: readonly ["moonshot", "kimi-code"];
103
108
  readonly urlMarkers: readonly ["api.moonshot.ai", "api.kimi.com"];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-catalog",
4
- "version": "15.11.0",
4
+ "version": "15.11.1",
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": "15.11.0",
37
+ "@oh-my-pi/pi-utils": "15.11.1",
38
38
  "zod": "4.4.3"
39
39
  },
40
40
  "devDependencies": {
41
- "@oh-my-pi/pi-ai": "15.11.0",
41
+ "@oh-my-pi/pi-ai": "15.11.1",
42
42
  "@types/bun": "^1.3.14"
43
43
  },
44
44
  "engines": {
@@ -102,11 +102,13 @@ export function buildOpenAICompat(spec: ModelSpec<"openai-completions">): Resolv
102
102
  const isZhipu = modelMatchesHost(hostModel, "zhipu");
103
103
  const isKilo = modelMatchesHost(hostModel, "kilo");
104
104
  const isKimiModel = isKimiModelId(spec.id);
105
- const isMoonshotKimi = isKimiModel && modelMatchesHost(hostModel, "moonshotNative");
105
+ const isMoonshotNative = modelMatchesHost(hostModel, "moonshotNative");
106
+ const isMoonshotKimi = isKimiModel && isMoonshotNative;
106
107
  const usesMoonshotKimiPreservedThinking = isMoonshotKimi && isKimiK26ModelId(spec.id);
107
108
  const isAnthropicModel =
108
109
  modelMatchesHost(hostModel, "anthropic") || isClaudeModelId(spec.id) || isAnthropicNamespacedModelId(spec.id);
109
110
  const isAlibaba = modelMatchesHost(hostModel, "alibabaDashscope");
111
+ const isNvidiaNim = modelMatchesHost(hostModel, "nvidia");
110
112
  const isQwen = isQwenModelId(spec.id);
111
113
  // DeepSeek V4 (and other reasoning-capable DeepSeek models) reject follow-up requests in
112
114
  // thinking mode unless prior assistant tool-call turns include `reasoning_content`. The
@@ -145,11 +147,16 @@ export function buildOpenAICompat(spec: ModelSpec<"openai-completions">): Resolv
145
147
  isKilo ||
146
148
  isQwen ||
147
149
  isXiaomiHost ||
150
+ isMoonshotNative ||
148
151
  isOpenCodeHost;
149
152
  const isOpenCodeProvider = provider === "opencode-go" || provider === "opencode-zen";
150
153
 
151
154
  const useMaxTokens =
152
- isMistral || hostMatchesUrl(baseUrl, "chutes") || hostMatchesUrl(baseUrl, "fireworks") || isDirectDeepseekApi;
155
+ isMistral ||
156
+ isMoonshotNative ||
157
+ hostMatchesUrl(baseUrl, "chutes") ||
158
+ hostMatchesUrl(baseUrl, "fireworks") ||
159
+ isDirectDeepseekApi;
153
160
 
154
161
  // Hosts whose chat-completions endpoints are known to accept multiple
155
162
  // leading `system`/`developer` messages (preferred for KV-cache reuse).
@@ -266,14 +273,20 @@ export function buildOpenAICompat(spec: ModelSpec<"openai-completions">): Resolv
266
273
  // OpenAI-compatible proxies — Fireworks' Fire Pass router, OpenCode's gateway,
267
274
  // etc. — drives reasoning via OpenAI-style `reasoning_effort`
268
275
  // (low|medium|high|xhigh|max|none), so those stay on the "openai" path.
276
+ // NVIDIA NIM hosts Qwen with the vLLM convention
277
+ // (`chat_template_kwargs.enable_thinking`); top-level `enable_thinking`
278
+ // is rejected by NIM's `additionalProperties: false` request schema
279
+ // (issue #2299).
269
280
  thinkingFormat:
270
281
  isZai || isZhipu || isMoonshotKimi || isXiaomiMimo
271
282
  ? "zai"
272
283
  : isOpenRouter
273
284
  ? "openrouter"
274
- : isAlibaba || isQwen
275
- ? "qwen"
276
- : "openai",
285
+ : isQwen && isNvidiaNim
286
+ ? "qwen-chat-template"
287
+ : isAlibaba || isQwen
288
+ ? "qwen"
289
+ : "openai",
277
290
  thinkingKeep: usesMoonshotKimiPreservedThinking ? "all" : undefined,
278
291
  reasoningContentField: "reasoning_content",
279
292
  // Backends that 400 follow-up requests when prior assistant tool-call turns lack `reasoning_content`:
package/src/hosts.ts CHANGED
@@ -54,6 +54,8 @@ export const KNOWN_HOSTS = {
54
54
  urlMarkers: ["api.minimax.io", "api.minimaxi.com"],
55
55
  },
56
56
  qwenPortal: { providers: ["qwen-portal"], urlMarkers: ["portal.qwen.ai"] },
57
+ /** NVIDIA NIM (`integrate.api.nvidia.com`). Qwen NIM endpoints take `chat_template_kwargs.enable_thinking`, never top-level `enable_thinking`. */
58
+ nvidia: { providers: ["nvidia"], urlMarkers: ["integrate.api.nvidia.com"] },
57
59
  moonshotNative: { providers: ["moonshot", "kimi-code"], urlMarkers: ["api.moonshot.ai", "api.kimi.com"] },
58
60
  opencode: { providers: ["opencode-go", "opencode-zen"], urlMarkers: ["opencode.ai"] },
59
61
  chutes: { urlMarkers: ["chutes.ai"] },