From 8ddb8814121fc30813d0cb9d9880573eb3372cc1 Mon Sep 17 00:00:00 2001 From: Austin Liu <193228693+Dingding-leo@users.noreply.github.com> Date: Thu, 6 Aug 2026 12:38:40 +0930 Subject: [PATCH] fix(backend): remove dead model IDs and update active models for Cloudflare Workers AI (#8717) (#8808) Validated in local merge-train T5 (base49+contributors+pacocartones) --- open-sse/config/freeModelCatalog.data.ts | 3 -- .../providers/registry/cloudflare-ai/index.ts | 3 -- tests/unit/cloudflare-ai-catalog-8717.test.ts | 45 +++++++++++++++++++ 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 tests/unit/cloudflare-ai-catalog-8717.test.ts diff --git a/open-sse/config/freeModelCatalog.data.ts b/open-sse/config/freeModelCatalog.data.ts index 9893a08fd4..42ec705f8c 100644 --- a/open-sse/config/freeModelCatalog.data.ts +++ b/open-sse/config/freeModelCatalog.data.ts @@ -115,10 +115,7 @@ export const FREE_MODEL_BUDGETS: FreeModelBudget[] = [ { provider: "cerebras", modelId: "zai-glm-4.7", displayName: "GLM 4.7", monthlyTokens: 30000000, creditTokens: 0, freeType: "recurring-daily", poolKey: "cerebras", tos: "caution" }, { provider: "cerebras", modelId: "gpt-oss-120b", displayName: "GPT OSS 120B", monthlyTokens: 30000000, creditTokens: 0, freeType: "recurring-daily", poolKey: "cerebras", tos: "caution" }, { provider: "cloudflare-ai", modelId: "@cf/meta/llama-3.3-70b-instruct", displayName: "Llama 3.3 70B (🆓 ~150 resp/day)", monthlyTokens: 30000000, creditTokens: 0, freeType: "recurring-daily", poolKey: "cloudflare-ai", tos: "caution" }, - { provider: "cloudflare-ai", modelId: "@cf/meta/llama-3.1-8b-instruct", displayName: "Llama 3.1 8B (🆓)", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-daily", poolKey: "cloudflare-ai", tos: "caution" }, { provider: "cloudflare-ai", modelId: "@cf/google/gemma-3-12b-it", displayName: "Gemma 3 12B (🆓)", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-daily", poolKey: "cloudflare-ai", tos: "caution" }, - { provider: "cloudflare-ai", modelId: "@cf/mistral/mistral-7b-instruct-v0.2-lora", displayName: "Mistral 7B (🆓)", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-daily", poolKey: "cloudflare-ai", tos: "caution" }, - { provider: "cloudflare-ai", modelId: "@cf/qwen/qwen2.5-coder-15b-instruct", displayName: "Qwen 2.5 Coder 15B (🆓)", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-daily", poolKey: "cloudflare-ai", tos: "caution" }, { provider: "cloudflare-ai", modelId: "@cf/qwen/qwen2.5-coder-32b-instruct", displayName: "Qwen 2.5 Coder 32B (🆓)", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-daily", poolKey: "cloudflare-ai", tos: "caution" }, { provider: "cloudflare-ai", modelId: "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b", displayName: "DeepSeek R1 Distill 32B (🆓)", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-daily", poolKey: "cloudflare-ai", tos: "caution" }, { provider: "cloudflare-ai", modelId: "@cf/meta/llama-3.3-70b-instruct-fp8-fast", displayName: "Llama 3.3 70B (FP8 Fast 🆓)", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-daily", poolKey: "cloudflare-ai", tos: "caution" }, diff --git a/open-sse/config/providers/registry/cloudflare-ai/index.ts b/open-sse/config/providers/registry/cloudflare-ai/index.ts index f90d67137a..907138aa48 100644 --- a/open-sse/config/providers/registry/cloudflare-ai/index.ts +++ b/open-sse/config/providers/registry/cloudflare-ai/index.ts @@ -12,10 +12,7 @@ export const cloudflare_aiProvider: RegistryEntry = { // 10K Neurons/day free: ~150 LLM responses or 500s Whisper audio — global edge models: [ { id: "@cf/meta/llama-3.3-70b-instruct", name: "Llama 3.3 70B (🆓 ~150 resp/day)" }, - { id: "@cf/meta/llama-3.1-8b-instruct", name: "Llama 3.1 8B (🆓)" }, { id: "@cf/google/gemma-3-12b-it", name: "Gemma 3 12B (🆓)" }, - { id: "@cf/mistral/mistral-7b-instruct-v0.2-lora", name: "Mistral 7B (🆓)" }, - { id: "@cf/qwen/qwen2.5-coder-15b-instruct", name: "Qwen 2.5 Coder 15B (🆓)" }, { id: "@cf/qwen/qwen2.5-coder-32b-instruct", name: "Qwen 2.5 Coder 32B (🆓)" }, { id: "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b", name: "DeepSeek R1 Distill 32B (🆓)" }, // Sweep 2026-06-19: + current Workers AI catalog ids (developers.cloudflare.com/workers-ai/models). diff --git a/tests/unit/cloudflare-ai-catalog-8717.test.ts b/tests/unit/cloudflare-ai-catalog-8717.test.ts new file mode 100644 index 0000000000..1567e0c699 --- /dev/null +++ b/tests/unit/cloudflare-ai-catalog-8717.test.ts @@ -0,0 +1,45 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { REGISTRY } from "../../open-sse/config/providers/index.ts"; +import { FREE_MODEL_BUDGETS } from "../../open-sse/config/freeModelCatalog.data.ts"; + +test("Cloudflare Workers AI free catalog matches registry active models", () => { + const cfRegistry = REGISTRY["cloudflare-ai"]; + assert.ok(cfRegistry, "cloudflare-ai should be registered"); + + const registryModelIds = new Set(cfRegistry.models.map((m) => m.id)); + + // 4 active free models expected + const expectedModels = [ + "@cf/meta/llama-3.3-70b-instruct", + "@cf/google/gemma-3-12b-it", + "@cf/qwen/qwen2.5-coder-32b-instruct", + "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b", + ]; + + for (const id of expectedModels) { + assert.ok(registryModelIds.has(id), `registry should contain ${id}`); + } + + // Dead model IDs should be removed + const deadModels = [ + "@cf/meta/llama-3.1-8b-instruct", + "@cf/mistral/mistral-7b-instruct-v0.2-lora", + "@cf/qwen/qwen2.5-coder-15b-instruct", + ]; + + for (const id of deadModels) { + assert.equal(registryModelIds.has(id), false, `registry should NOT contain dead model ${id}`); + } + + const freeCatalogCfModels = FREE_MODEL_BUDGETS.filter((b) => b.provider === "cloudflare-ai").map( + (b) => b.modelId + ); + for (const id of deadModels) { + assert.equal( + freeCatalogCfModels.includes(id), + false, + `free catalog data should NOT contain dead model ${id}` + ); + } +});