fix(providers): refresh stale NVIDIA NIM model registry (#6108) (#6223)

This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-07-04 23:01:28 -03:00
committed by GitHub
parent cbc16af286
commit adde9e4bae
3 changed files with 31 additions and 6 deletions

View File

@@ -9,6 +9,7 @@
### 🔧 Bug Fixes
- **fix(api):** relay worker now binds the SSRF guard to a stable `const` name so minified standalone (Docker) builds resolve it ([#6149](https://github.com/diegosouzapw/OmniRoute/issues/6149)) — the Vercel/Deno relay generators embedded the shared `resolveRelayTarget` guard as a bare `${fn.toString()}` declaration while the worker body called the hardcoded literal name; SWC minification mangled the source function's name, so the deployed worker defined `<mangled>` but still called `resolveRelayTarget``ReferenceError`. Both templates now emit `const resolveRelayTarget = ${fn.toString()};` (the const name is a template literal, immune to minification). Regression guard: `tests/unit/relay-minified-fn-6149.test.ts` (4). (thanks @SeaXen)
- **fix(providers):** refresh the stale NVIDIA NIM model registry — drop EOL `z-ai/glm-5.1`, add `z-ai/glm-5.2` and `nvidia/nemotron-3-ultra-550b-a55b` ([#6108](https://github.com/diegosouzapw/OmniRoute/issues/6108)). Regression guard: `tests/unit/nvidia-nim-registry-6108.test.ts`. (thanks @andrea-kingautomation)
- **fix(backend):** call logs now record a **reasoning source/char-count** (migration 116, `reasoning_source`/`reasoning_chars`) for models that emit `reasoning_content`/`<think>` but report zero reasoning tokens in usage, so `tokens_reasoning` no longer silently under-represents reasoning — cost math is unchanged (the priced `tokens_reasoning` stays usage-derived) ([#6187](https://github.com/diegosouzapw/OmniRoute/issues/6187)). Regression guard: `tests/unit/reasoning-token-source-6187.test.ts`. (thanks @andrea-kingautomation)
- **fix(auth):** a stale/changed `STORAGE_ENCRYPTION_KEY` now surfaces as a clear **424 `storage_encryption_stale`** ("re-enter the API key") instead of a misleading "Auth failed: 401" — the connection's ciphertext failed to decrypt and was coerced to an empty Bearer, hiding the real cause ([#6148](https://github.com/diegosouzapw/OmniRoute/issues/6148)). Regression guard: `tests/unit/decrypt-stale-key-hint-6148.test.ts`. (thanks @chirag127)
- **fix(backend):** memory injection now keeps the injected system message **first** for providers that require it (via a `PROVIDERS_SYSTEM_MUST_BE_FIRST` capability), instead of the cache-safe mid-array splice that made strict providers reject the request with a 400 ([#6135](https://github.com/diegosouzapw/OmniRoute/issues/6135)). Regression guard: `tests/unit/memory-system-first-6135.test.ts`.

View File

@@ -9,10 +9,12 @@ export const nvidiaProvider: RegistryEntry = {
authType: "apikey",
authHeader: "bearer",
models: [
{ id: "z-ai/glm-5.1", name: "GLM 5.1" },
// #3329: minimaxai/minimax-m3 removed — NVIDIA NIM does not host it yet
// (every request 404s), while minimax-m2.7 on the same provider works.
// Re-add only once NVIDIA actually serves it.
// #6108: z-ai/glm-5.1 EOL'd 2026-07-02 (direct probe returns 410) — dropped.
{ id: "z-ai/glm-5.2", name: "GLM 5.2" },
// #3329/#6108: minimaxai/minimax-m3 stays excluded from the nvidia tier — it
// still 404s here for most callers; the single 200 probe in #6108 was not
// reproducible enough to override the #3329 guard. Re-add only once NVIDIA
// reliably serves it (and flip nvidia-minimax-m3-removed-3329.test.ts then).
{ id: "minimaxai/minimax-m2.7", name: "MiniMax M2.7" },
{ id: "google/gemma-4-31b-it", name: "Gemma 4 31B" },
{ id: "mistralai/mistral-small-4-119b-2603", name: "Mistral Small 4 2603" },
@@ -25,11 +27,10 @@ export const nvidiaProvider: RegistryEntry = {
{ id: "deepseek-ai/deepseek-v4-pro", name: "DeepSeek V4 Pro", supportsReasoning: true },
{ id: "deepseek-ai/deepseek-v4-flash", name: "DeepSeek V4 Flash", supportsReasoning: true },
// Sweep 2026-06-19: verified present in the live NVIDIA NIM /v1/models catalog.
// minimaxai/minimax-m3 is now listed too, but left out per #3329 until inference
// (not just listing) is confirmed — re-add when a real request stops 404ing.
{ id: "moonshotai/kimi-k2.6", name: "Kimi K2.6" },
{ id: "openai/gpt-oss-120b", name: "GPT OSS 120B", toolCalling: false },
{ id: "openai/gpt-oss-20b", name: "GPT OSS 20B", toolCalling: false },
{ id: "nvidia/nemotron-3-super-120b-a12b", name: "Nemotron 3 Super 120B A12B" },
{ id: "nvidia/nemotron-3-ultra-550b-a55b", name: "Nemotron 3 Ultra 550B" },
],
};

View File

@@ -0,0 +1,23 @@
import test from "node:test";
import assert from "node:assert/strict";
import { nvidiaProvider } from "../../open-sse/config/providers/registry/nvidia/index.ts";
// Regression guard for #6108: the static NVIDIA NIM model registry had gone
// stale — z-ai/glm-5.1 was EOL'd (410) 2026-07-02, while glm-5.2 and
// nvidia/nemotron-3-ultra-550b-a55b were absent. minimaxai/minimax-m3 stays
// excluded per the #3329 guard (nvidia-minimax-m3-removed-3329.test.ts) — the
// single 200 probe in #6108 wasn't reproducible enough to override it.
const modelIds = new Set(nvidiaProvider.models.map((m) => m.id));
test("#6108: NVIDIA NIM registry contains the refreshed live models", () => {
assert.ok(modelIds.has("z-ai/glm-5.2"), "z-ai/glm-5.2 must be present");
assert.ok(
modelIds.has("nvidia/nemotron-3-ultra-550b-a55b"),
"nvidia/nemotron-3-ultra-550b-a55b must be present"
);
});
test("#6108: NVIDIA NIM registry no longer lists EOL z-ai/glm-5.1", () => {
assert.ok(!modelIds.has("z-ai/glm-5.1"), "EOL z-ai/glm-5.1 must be removed");
});