mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 07:12:12 +03:00
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)
This commit is contained in:
@@ -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" },
|
||||
|
||||
@@ -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).
|
||||
|
||||
45
tests/unit/cloudflare-ai-catalog-8717.test.ts
Normal file
45
tests/unit/cloudflare-ai-catalog-8717.test.ts
Normal file
@@ -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}`
|
||||
);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user