fix(providers): g4f.space sub-providers no longer advertise a free tier (#10071) (#11185)

Validated on the combined batch board over tip c92bd40b: static gates clean (changelog, file-size 158 frozen, complexity 2626<=2774, cognitive 1183<=1223, dead-code 409<=416), typecheck:core clean, 70 focused tests green (PR suites 49/49 + auth/combo neighbors 21/21).

Five g4f-* entries re-flagged hasFree:false with the live-probed 402 evidence (proof-of-work wall, member key still works); the two dissenting providers deliberately untouched, matching the chutes/aimlapi/yi precedent. Fixes #10071. Thank you @pacocartones and @chirag127 for the capture!
This commit is contained in:
Paco Cartones
2026-08-23 06:24:19 +02:00
committed by GitHub
parent 376b49d8a5
commit b6fc55911e
4 changed files with 64 additions and 17 deletions

View File

@@ -0,0 +1 @@
- **fix(providers):** the five g4f.space sub-providers (Groq, Gemini, Pollinations, Ollama, NVIDIA) no longer advertise a free tier — a keyless `POST /v1/chat/completions` now returns `402 insufficient_credits` behind a proof-of-work "cake" wall (re-verified live 2026-08-22), so `hasFree` is `false` and the notes point at `g4f.dev/members.html`. The gateway still works with a member key, so its registry wiring and `authType: "optional"` are unchanged ([#10071](https://github.com/diegosouzapw/OmniRoute/issues/10071)) — thanks @chirag127

View File

@@ -673,11 +673,12 @@ export const APIKEY_PROVIDERS_GATEWAYS = {
color: "#F97316",
textIcon: "G4F",
website: "https://g4f.space",
hasFree: true,
freeNote: "Free no-key reverse proxy to Groq (gpt4free project) — rate-limited to 5 req/min.",
hasFree: false,
freeNote:
"No-key reverse proxy to Groq (gpt4free project) — the anonymous free tier is gone; keyless calls return insufficient_credits until you bake proof-of-work credits. A g4f.dev member key is required.",
passthroughModels: true,
authHint:
"No auth required. Free tier is limited to 5 requests/minute — sign up at g4f.dev/members.html for higher limits.",
"Anonymous use now needs proof-of-work credits baked at g4f.dev/chat — sign up at g4f.dev/members.html for a member key.",
},
"g4f-gemini": {
id: "g4f-gemini",
@@ -687,11 +688,12 @@ export const APIKEY_PROVIDERS_GATEWAYS = {
color: "#F97316",
textIcon: "G4F",
website: "https://g4f.space",
hasFree: true,
freeNote: "Free no-key reverse proxy to Gemini (gpt4free project) — rate-limited to 5 req/min.",
hasFree: false,
freeNote:
"No-key reverse proxy to Gemini (gpt4free project) — the anonymous free tier is gone; keyless calls return insufficient_credits until you bake proof-of-work credits. A g4f.dev member key is required.",
passthroughModels: true,
authHint:
"No auth required. Free tier is limited to 5 requests/minute — sign up at g4f.dev/members.html for higher limits.",
"Anonymous use now needs proof-of-work credits baked at g4f.dev/chat — sign up at g4f.dev/members.html for a member key.",
},
"g4f-pollinations": {
id: "g4f-pollinations",
@@ -701,12 +703,12 @@ export const APIKEY_PROVIDERS_GATEWAYS = {
color: "#F97316",
textIcon: "G4F",
website: "https://g4f.space",
hasFree: true,
hasFree: false,
freeNote:
"Free no-key reverse proxy to Pollinations (gpt4free project) — rate-limited to 5 req/min.",
"No-key reverse proxy to Pollinations (gpt4free project) — the anonymous free tier is gone; keyless calls return insufficient_credits until you bake proof-of-work credits. A g4f.dev member key is required.",
passthroughModels: true,
authHint:
"No auth required. Free tier is limited to 5 requests/minute — sign up at g4f.dev/members.html for higher limits.",
"Anonymous use now needs proof-of-work credits baked at g4f.dev/chat — sign up at g4f.dev/members.html for a member key.",
},
"g4f-ollama": {
id: "g4f-ollama",
@@ -716,11 +718,12 @@ export const APIKEY_PROVIDERS_GATEWAYS = {
color: "#F97316",
textIcon: "G4F",
website: "https://g4f.space",
hasFree: true,
freeNote: "Free no-key hosted Ollama gateway (gpt4free project) — rate-limited to 5 req/min.",
hasFree: false,
freeNote:
"No-key hosted Ollama gateway (gpt4free project) — the anonymous free tier is gone; keyless calls return insufficient_credits until you bake proof-of-work credits. A g4f.dev member key is required.",
passthroughModels: true,
authHint:
"No auth required. Free tier is limited to 5 requests/minute — sign up at g4f.dev/members.html for higher limits.",
"Anonymous use now needs proof-of-work credits baked at g4f.dev/chat — sign up at g4f.dev/members.html for a member key.",
},
"g4f-nvidia": {
id: "g4f-nvidia",
@@ -730,12 +733,12 @@ export const APIKEY_PROVIDERS_GATEWAYS = {
color: "#F97316",
textIcon: "G4F",
website: "https://g4f.space",
hasFree: true,
hasFree: false,
freeNote:
"Free no-key reverse proxy to NVIDIA NIM (gpt4free project) — rate-limited to 5 req/min.",
"No-key reverse proxy to NVIDIA NIM (gpt4free project) — the anonymous free tier is gone; keyless calls return insufficient_credits until you bake proof-of-work credits. A g4f.dev member key is required.",
passthroughModels: true,
authHint:
"No auth required. Free tier is limited to 5 requests/minute — sign up at g4f.dev/members.html for higher limits.",
"Anonymous use now needs proof-of-work credits baked at g4f.dev/chat — sign up at g4f.dev/members.html for a member key.",
},
"vercel-ai-gateway": {
id: "vercel-ai-gateway",

View File

@@ -6,6 +6,9 @@ import assert from "node:assert";
// free tier that does not exist. The budget catalog already dropped them. The 2026-06-18 batch
// (gitlawb, gitlawb-gmi, aimlapi, yi) was each re-verified against the official source before flipping
// (aimlapi docs: "The Free Tier is currently paused"; gitlawb GitHub issue #1345: MiMo revoked).
// 2026-08-22 (#10071): the five g4f.space sub-providers lost their anonymous tier to a proof-of-work
// credit wall (keyless POST -> HTTP 402 insufficient_credits). They remain usable with a g4f.dev
// member key, so only hasFree/freeNote/authHint changed - registry wiring is untouched.
describe("2026 discontinued free tiers — providers.ts hasFree reconciliation", () => {
it("APIKEY_PROVIDERS dead tiers no longer advertise a free tier", async () => {
const { APIKEY_PROVIDERS } = await import("../../src/shared/constants/providers.ts");
@@ -27,6 +30,42 @@ describe("2026 discontinued free tiers — providers.ts hasFree reconciliation",
}
});
it("g4f.space sub-providers no longer advertise an anonymous free tier", async () => {
const { APIKEY_PROVIDERS } = await import("../../src/shared/constants/providers.ts");
// 2026-08-22 live re-verification: every g4f.space sub-path still lists models keylessly, but a
// keyless POST /v1/chat/completions returns HTTP 402 {"type":"insufficient_credits"} pointing at
// a proof-of-work "cake" wall (g4f.dev/chat) or a member key (g4f.dev/members.html). The gateway
// is NOT dead - it works with a g4f.dev member key - so the registry entries and their
// authType:"optional" are deliberately untouched; only the free-tier advertisement is corrected.
for (const id of ["g4f-groq", "g4f-gemini", "g4f-pollinations", "g4f-ollama", "g4f-nvidia"]) {
const p = (
APIKEY_PROVIDERS as Record<
string,
{ hasFree?: boolean; freeNote?: string; authHint?: string }
>
)[id];
assert.ok(
p,
`${id} should still exist in APIKEY_PROVIDERS (gateway still usable with a member key)`
);
assert.strictEqual(
p.hasFree,
false,
`${id} should have hasFree:false (anonymous tier walled behind proof-of-work credits in 2026)`
);
assert.match(
p.freeNote ?? "",
/proof-of-work/i,
`${id} freeNote should explain the proof-of-work credit wall`
);
assert.match(
p.authHint ?? "",
/member key/i,
`${id} authHint should state that a g4f.dev member key is required`
);
}
});
it("phind is fully removed (service shut down 2026-01) from both catalogs", async () => {
const { APIKEY_PROVIDERS, WEB_COOKIE_PROVIDERS } =
await import("../../src/shared/constants/providers.ts");

View File

@@ -17,7 +17,8 @@
* category on the dashboard
* - allowed to skip API key validation (providerAllowsOptionalApiKey)
* - has provider metadata (name/website/free-tier note) in the apikey
* gateway catalog
* gateway catalog (hasFree flipped false by #10071 — anonymous tier now
* requires proof-of-work credits; a g4f.dev member key is required)
*/
import test from "node:test";
import assert from "node:assert/strict";
@@ -96,7 +97,10 @@ for (const [id, subPath] of Object.entries(SUB_PATHS)) {
assert.ok(meta, `${id} should have an APIKEY_PROVIDERS metadata entry`);
assert.equal(meta.id, id);
assert.equal(meta.website, "https://g4f.space");
assert.equal(meta.hasFree, true);
// hasFree was true at #6650 time; the anonymous tier was walled behind proof-of-work
// credits in 2026 (#10071), so the flag is now false. Registry wiring above is unchanged:
// the provider still works with a g4f.dev member key, hence authType stays "optional".
assert.equal(meta.hasFree, false);
assert.equal(typeof meta.freeNote, "string");
assert.ok((meta.freeNote as string).length > 0);
});