Skip to content

Commit fd62959

Browse files
authored
[Workers AI] Use paid plan model flag (#32448)
* [Workers AI] Use paid plan model flag * [Workers AI] Normalize paid plan model flag
1 parent 4a35085 commit fd62959

4 files changed

Lines changed: 18 additions & 10 deletions

File tree

‎src/components/models/ModelDetailPage.astro‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,9 @@ if (model.name.includes("@cf/openai/gpt-oss")) {
141141
const author = authorData[model.author];
142142
const authorName = model.authorName;
143143
144-
// Models that require the Workers Paid plan (not available on Workers Free).
145-
const workersPaidOnlyModels = [
146-
"@cf/moonshotai/kimi-k2.6",
147-
"@cf/moonshotai/kimi-k2.7-code",
148-
"@cf/zai-org/glm-5.2",
149-
];
150-
const isWorkersPaidOnly = workersPaidOnlyModels.includes(model.name);
144+
const requiresWorkersPaid =
145+
model.properties.require_workers_paid === true ||
146+
model.properties.require_workers_paid === "true";
151147
152148
// `hasSchema`: input must have at least one key.
153149
const hasSchema = Object.keys(model.schema.input).length > 0;
@@ -340,7 +336,7 @@ const headings: MarkdownHeading[] = [
340336
}
341337

342338
{
343-
isWorkersPaidOnly && (
339+
requiresWorkersPaid && (
344340
<Render file="workers-paid-only-note" product="workers-ai" />
345341
)
346342
}

‎src/content/workers-ai-models/glm-5.2.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"name": "@cf/zai-org/glm-5.2",
33
"properties": [
4+
{
5+
"property_id": "require_workers_paid",
6+
"value": "true"
7+
},
48
{
59
"property_id": "context_window",
610
"value": "262144"
@@ -4763,4 +4767,4 @@
47634767
}
47644768
},
47654769
"deprecated": false
4766-
}
4770+
}

‎src/content/workers-ai-models/kimi-k2.6.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"created_at": "2026-04-20 01:40:35.001",
1212
"tags": [],
1313
"properties": [
14+
{
15+
"property_id": "require_workers_paid",
16+
"value": "true"
17+
},
1418
{
1519
"property_id": "context_window",
1620
"value": "262144"
@@ -4752,4 +4756,4 @@
47524756
]
47534757
}
47544758
}
4755-
}
4759+
}

‎src/content/workers-ai-models/kimi-k2.7-code.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"name": "@cf/moonshotai/kimi-k2.7-code",
33
"properties": [
4+
{
5+
"property_id": "require_workers_paid",
6+
"value": "true"
7+
},
48
{
59
"property_id": "context_window",
610
"value": "262144"

0 commit comments

Comments
 (0)