Files
OmniRoute/tests/unit/pollinations-api-key-required-11096.test.ts
Rouzbeh† 3157e8a7ad fix(providers): require API key for Pollinations and fix optional key i18n labels (#11096) (#11117)
Cherry-picked the value commit (0e918816) onto the current tip, dropping the stale base-red sync commits. Focused tests: pollinations-api-key-required 1/1 plus the whole optional-key suite 142/142 (two legacy assertions in provider-route-schemas flipped to the new key-required contract, commented with the PR). Fixes #11096 — Pollinations answers 401 anonymously now. Thank you @rqzbeh!
2026-08-22 15:59:31 -03:00

12 lines
437 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import { providerAllowsOptionalApiKey } from "../../src/shared/constants/providers.js";
test("pollinations provider requires an API key and does not allow optional API key", () => {
assert.equal(
providerAllowsOptionalApiKey("pollinations"),
false,
"pollinations must require an API key because anonymous completions are no longer supported"
);
});