fix(tests): bump the APIKEY_PROVIDERS tripwire to 241 (Agnes AI China)

`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.
This commit is contained in:
diegosouzapw
2026-09-16 13:47:07 -03:00
parent 68b9fc21a5
commit 3087e103be
2 changed files with 3 additions and 1 deletions

View File

@@ -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`

View File

@@ -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 [