From 86b8bbfd3e5775d917647689faef63210c0d36aa Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza Date: Wed, 16 Sep 2026 13:48:13 -0300 Subject: [PATCH] fix(tests): bump the APIKEY_PROVIDERS tripwire to 241 (Agnes AI China) (#13905) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `APIKEY_PROVIDERS merges the 6 family files into 240 entries` fails on the release tip, taking a unit-test shard red on every open PR. Agnes AI China (#13399, cdcde97c7) added one `apikey/regional` entry, so the real count is 241 — confirmed at runtime: `Object.keys(APIKEY_PROVIDERS).length` is 241 and includes `agnes-cn`. The hardcoded number is deliberate, not an oversight: the test is a tripwire for silent loss or duplication across the six family files, and each bump is documented in the header with the provider and the PR that caused it. Kept that convention rather than deriving the count at runtime, which would make the test assert nothing. --- changelog.d/fixes/basereds-apikey-provider-count-241.md | 1 + tests/unit/providers-constants-split.test.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/fixes/basereds-apikey-provider-count-241.md diff --git a/changelog.d/fixes/basereds-apikey-provider-count-241.md b/changelog.d/fixes/basereds-apikey-provider-count-241.md new file mode 100644 index 0000000000..35ee9ec9b5 --- /dev/null +++ b/changelog.d/fixes/basereds-apikey-provider-count-241.md @@ -0,0 +1 @@ +- **fix(tests):** bump the `APIKEY_PROVIDERS` tripwire count to 241 — Agnes AI China (#13399) added one `apikey/regional` entry, and the stale 240 was failing a unit-test shard on every open PR against `release/v3.8.51` diff --git a/tests/unit/providers-constants-split.test.ts b/tests/unit/providers-constants-split.test.ts index 4274d0acc4..da74f7db0e 100644 --- a/tests/unit/providers-constants-split.test.ts +++ b/tests/unit/providers-constants-split.test.ts @@ -35,12 +35,13 @@ // UC Direct (#11513, uncensored.com metered Developer API) adds one frontier-labs entry — 237; // SeekAi (#11786, QuantumNous New-API gateway) adds one gateways entry — 238. // GreenPT (#13024, 2b9e7fb3e) and EURouter (#13025, 22473dee5) each add one gateways entry — 240. +// Agnes AI China (#13399, cdcde97c7) adds one apikey/regional entry — 241. import { test } from "node:test"; import assert from "node:assert/strict"; const P = await import("../../src/shared/constants/providers.ts"); -const APIKEY_PROVIDER_COUNT = 240; +const APIKEY_PROVIDER_COUNT = 241; test("barrel still exports every catalog + key helpers", () => { for (const name of [