From c8f3bc888eafd0641aec9e79d37fa9972d006e5b Mon Sep 17 00:00:00 2001 From: Webman Date: Wed, 26 Aug 2026 15:40:50 -0500 Subject: [PATCH] test(providers): update count-derived assertions for v3.8.51 additions (#11674) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merged via /merge-batch (2026-08-26, v3.8.51). Boarded no worktree combinado; validação única: typecheck/complexity/cognitive-complexity/file-size/changelog verdes, lint nos mesmos 228 achados pré-existentes confirmados contra o tip puro, testes focados passando. Obrigado pela contribuição. --- .../11449-provider-count-test-assertions.md | 1 + tests/snapshots/provider/translate-path.json | 33 ++++++++++++++++--- tests/unit/context7-provider.test.ts | 2 +- .../provider-node-reserved-prefix.test.ts | 10 +++--- tests/unit/providers-constants-split.test.ts | 11 ++++--- 5 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 changelog.d/maintenance/11449-provider-count-test-assertions.md diff --git a/changelog.d/maintenance/11449-provider-count-test-assertions.md b/changelog.d/maintenance/11449-provider-count-test-assertions.md new file mode 100644 index 0000000000..2037de733a --- /dev/null +++ b/changelog.d/maintenance/11449-provider-count-test-assertions.md @@ -0,0 +1 @@ +- **test(providers):** update count-derived assertions after the v3.8.51 provider additions — `APIKEY_PROVIDERS` 233 → 235 (Opper #11629 + 1min.ai #11631), reserved-prefix REGISTRY walk 395 → 398, `WEB_FETCH_PROVIDERS` now includes `nimble-search` (#11620), and the provider translate-path golden snapshot regenerated ([#11449](https://github.com/diegosouzapw/OmniRoute/issues/11449)). diff --git a/tests/snapshots/provider/translate-path.json b/tests/snapshots/provider/translate-path.json index 8380aa7c4f..2e0e544a4d 100644 --- a/tests/snapshots/provider/translate-path.json +++ b/tests/snapshots/provider/translate-path.json @@ -1311,7 +1311,7 @@ "Authorization": "Bearer ", "Content-Type": "application/json", "Openai-Beta": "responses=experimental", - "User-Agent": "codex-cli/0.149.0 (; )", + "User-Agent": "codex-cli/0.144.1 (; )", "Version": "0.149.0", "X-Codex-Beta-Features": "responses_websockets" }, @@ -1319,7 +1319,7 @@ "Authorization": "Bearer ", "Content-Type": "application/json", "Openai-Beta": "responses=experimental", - "User-Agent": "codex-cli/0.149.0 (; )", + "User-Agent": "codex-cli/0.144.1 (; )", "Version": "0.149.0", "X-Codex-Beta-Features": "responses_websockets" }, @@ -1328,7 +1328,7 @@ "Authorization": "Bearer ", "Content-Type": "application/json", "Openai-Beta": "responses=experimental", - "User-Agent": "codex-cli/0.149.0 (; )", + "User-Agent": "codex-cli/0.144.1 (; )", "Version": "0.149.0", "X-Codex-Beta-Features": "responses_websockets" } @@ -1950,8 +1950,8 @@ } }, "url": { - "nonStream": "https://duckduckgo.com/duckchat/v1/chat", - "stream": "https://duckduckgo.com/duckchat/v1/chat" + "nonStream": "https://duck.ai/duckchat/v1/chat", + "stream": "https://duck.ai/duckchat/v1/chat" } }, "dxnt": { @@ -4396,6 +4396,29 @@ "stream": "https://ollama.com/v1/chat/completions" } }, + "oneminai": { + "format": "openai", + "headers": { + "apiKey": { + "Accept": "text/event-stream", + "Authorization": "Bearer ", + "Content-Type": "application/json" + }, + "nonStream": { + "Authorization": "Bearer ", + "Content-Type": "application/json" + }, + "oauth": { + "Accept": "text/event-stream", + "Authorization": "Bearer ", + "Content-Type": "application/json" + } + }, + "url": { + "nonStream": "https://api.1min.ai/api/chat-with-ai", + "stream": "https://api.1min.ai/api/chat-with-ai" + } + }, "openadapter": { "format": "openai", "headers": { diff --git a/tests/unit/context7-provider.test.ts b/tests/unit/context7-provider.test.ts index 5f7b63aa35..3ff00545bf 100644 --- a/tests/unit/context7-provider.test.ts +++ b/tests/unit/context7-provider.test.ts @@ -91,7 +91,7 @@ test("web-fetch routing policies pin context7 as explicit-only and anonymous-cap // The generic providers stay mutable-free at the type level and complete. assert.deepEqual( [...WEB_FETCH_PROVIDERS], - ["firecrawl", "jina-reader", "tavily-search", "tinyfish", "context7"] + ["firecrawl", "jina-reader", "tavily-search", "tinyfish", "context7", "nimble-search"] ); }); diff --git a/tests/unit/provider-node-reserved-prefix.test.ts b/tests/unit/provider-node-reserved-prefix.test.ts index e0c6655974..d7514541b7 100644 --- a/tests/unit/provider-node-reserved-prefix.test.ts +++ b/tests/unit/provider-node-reserved-prefix.test.ts @@ -106,13 +106,13 @@ test("shared set excludes manual aliases that never intercept nodes at runtime", assert.equal(RESERVED_PROVIDER_PREFIXES.has("aq"), false); }); -test("shared set size matches full REGISTRY scan (395 unique prefixes)", () => { - // Count measured against release/v3.8.50 tip after this merge-batch boarded - // #11333 (volcengine-coding-plan + volcengine-agent-plan, +4 ids/aliases) on - // top of the 391 pinned post-upstream-65e81158a (was 329 at c68cda7df) — +test("shared set size matches full REGISTRY scan (398 unique prefixes)", () => { + // Count measured against release/v3.8.51 tip after #11629 (opper) and + // #11631 (1min.ai) boarded — 398 unique ids/aliases walked from the + // provider REGISTRY on top of the 395 pinned post-#11333. // the assertion pins that the set is a full REGISTRY walk, not a // hand-maintained list. - assert.equal(RESERVED_PREFIX_COUNT, 395); + assert.equal(RESERVED_PREFIX_COUNT, 398); }); test("isReservedProviderPrefix rejects non-string input", () => { diff --git a/tests/unit/providers-constants-split.test.ts b/tests/unit/providers-constants-split.test.ts index ef42705e9a..fd0529c276 100644 --- a/tests/unit/providers-constants-split.test.ts +++ b/tests/unit/providers-constants-split.test.ts @@ -30,6 +30,7 @@ // The v3.8.50 back-merge (f95b03d) adds Synthetic (specialty-media) and // Kilo Gateway (gateways); #11434 adds volcengine-agent-plan and // volcengine-coding-plan (regional family) — both land at 233. +// release/v3.8.51 adds Opper (gateways, #11629) and 1min.ai (gateways, #11631) — lands at 235. import { test } from "node:test"; import assert from "node:assert/strict"; @@ -58,12 +59,12 @@ test("barrel still exports every catalog + key helpers", () => { } }); -test("APIKEY_PROVIDERS merges the 6 family files into 233 entries (no loss / no dup)", async () => { +test("APIKEY_PROVIDERS merges the 6 family files into 235 entries (no loss / no dup)", async () => { const keys = Object.keys((P as Record).APIKEY_PROVIDERS); - assert.equal(keys.length, 233); - assert.equal(new Set(keys).size, 233, "duplicate keys after spread-merge"); + assert.equal(keys.length, 235); + assert.equal(new Set(keys).size, 235, "duplicate keys after spread-merge"); // the merged object's entry-count equals the sum of the 6 semantic family files; families are a - // strict partition (every provider in exactly one), so the sum must be exactly 233. + // strict partition (every provider in exactly one), so the sum must be exactly 235. const families: [string, string][] = [ ["gateways", "APIKEY_PROVIDERS_GATEWAYS"], ["frontier-labs", "APIKEY_PROVIDERS_FRONTIER"], @@ -83,7 +84,7 @@ test("APIKEY_PROVIDERS merges the 6 family files into 233 entries (no loss / no seen.add(k); } } - assert.equal(famTotal, 233, "families must partition all 233 providers"); + assert.equal(famTotal, 235, "families must partition all 235 providers"); }); test("AI_PROVIDERS Proxy aggregates all sections; lookups resolve", () => {