From b4b30a2dd6fac971e250fff140097e8a927ef747 Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Fri, 18 Sep 2026 17:27:48 -0700 Subject: [PATCH 01/12] [Workers AI] Correct model reasoning controls and schemas --- .../configuration/open-ai-compatibility.mdx | 12 ++++ .../deepseek-v4-flash-0731.json | 42 ++++++++------ .../deepseek-v4-pro-0813.json | 42 ++++++++------ .../workers-ai-models/gemma-4-26b-a4b-it.json | 50 ++++++++-------- .../workers-ai-models/glm-4.7-flash.json | 38 +----------- src/content/workers-ai-models/glm-5.2.json | 46 ++++++++------- .../workers-ai-models/glm-5.3-flash.json | 58 ++++++++++++------- src/content/workers-ai-models/glm-5.3.json | 58 ++++++++++++------- .../workers-ai-models/gpt-oss-120b.json | 12 ++-- .../workers-ai-models/gpt-oss-20b.json | 12 ++-- src/content/workers-ai-models/kimi-k2.6.json | 42 +++++++------- .../workers-ai-models/kimi-k2.7-code.json | 42 ++++++++------ 12 files changed, 249 insertions(+), 205 deletions(-) diff --git a/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx b/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx index bc5db147942..37ae8bc07bf 100644 --- a/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx +++ b/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx @@ -83,6 +83,18 @@ const response = await openai.responses.create({ }); ``` +### Reasoning controls + +Reasoning controls and defaults depend on the model. Refer to each [model's input schema](/workers-ai/models/) for its supported values. + +- **Chat Completions:** Use `reasoning_effort` when the model supports named effort levels. For example, GPT-OSS supports `low`, `medium` (the default), and `high`. Its reasoning is always enabled. +- **Responses:** For GPT-OSS, use `reasoning: { effort: "medium" }` instead of the top-level `reasoning_effort` field. +- **Thinking on or off:** Models such as GLM-4.7-Flash support `chat_template_kwargs: { enable_thinking: false }`. GLM-4.7-Flash has an on/off control, rather than separate low, medium, and high levels. + +Gemma 4 supports `reasoning_effort: "none"` (the default) or `"high"`. Kimi K2.6 supports the same two values and defaults to `"high"`. Compatibility aliases such as `"low"` and `"medium"` select `"high"` for these models; they do not represent distinct effort levels. A `"none"` alias does not necessarily disable reasoning on models where reasoning is mandatory. Refer to the model's schema before using it as an off switch. + +The input schema linked from each model page is also available as JSON. For example, [Gemma 4's synchronous input schema](/workers-ai/models/gemma-4-26b-a4b-it/sync-input.json) documents its effort values and thinking default. + ### AI Gateway These endpoints are also compatible with [AI Gateway](/ai-gateway/usage/providers/workersai/#openai-compatible-endpoints). diff --git a/src/content/workers-ai-models/deepseek-v4-flash-0731.json b/src/content/workers-ai-models/deepseek-v4-flash-0731.json index f1b762fc15e..4c5f36ebe78 100644 --- a/src/content/workers-ai-models/deepseek-v4-flash-0731.json +++ b/src/content/workers-ai-models/deepseek-v4-flash-0731.json @@ -299,16 +299,18 @@ { "type": "string", "enum": [ + "max", + "high", "low", - "medium", - "high" + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low, none. Compatibility aliases: minimal maps to low; medium maps to high; xhigh maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -316,7 +318,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -1546,16 +1548,18 @@ { "type": "string", "enum": [ + "max", + "high", "low", - "medium", - "high" + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low, none. Compatibility aliases: minimal maps to low; medium maps to high; xhigh maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -1563,7 +1567,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -2363,16 +2367,18 @@ { "type": "string", "enum": [ + "max", + "high", "low", - "medium", - "high" + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low, none. Compatibility aliases: minimal maps to low; medium maps to high; xhigh maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -2380,7 +2386,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -3610,16 +3616,18 @@ { "type": "string", "enum": [ + "max", + "high", "low", - "medium", - "high" + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low, none. Compatibility aliases: minimal maps to low; medium maps to high; xhigh maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -3627,7 +3635,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -4678,4 +4686,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/deepseek-v4-pro-0813.json b/src/content/workers-ai-models/deepseek-v4-pro-0813.json index d3dad444e1a..c8a833e5263 100644 --- a/src/content/workers-ai-models/deepseek-v4-pro-0813.json +++ b/src/content/workers-ai-models/deepseek-v4-pro-0813.json @@ -295,16 +295,18 @@ { "type": "string", "enum": [ + "max", + "high", "low", - "medium", - "high" + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low, none. Compatibility aliases: minimal maps to low; medium maps to high; xhigh maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -312,7 +314,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -1542,16 +1544,18 @@ { "type": "string", "enum": [ + "max", + "high", "low", - "medium", - "high" + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low, none. Compatibility aliases: minimal maps to low; medium maps to high; xhigh maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -1559,7 +1563,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -2359,16 +2363,18 @@ { "type": "string", "enum": [ + "max", + "high", "low", - "medium", - "high" + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low, none. Compatibility aliases: minimal maps to low; medium maps to high; xhigh maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -2376,7 +2382,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -3606,16 +3612,18 @@ { "type": "string", "enum": [ + "max", + "high", "low", - "medium", - "high" + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low, none. Compatibility aliases: minimal maps to low; medium maps to high; xhigh maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -3623,7 +3631,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -4674,4 +4682,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/gemma-4-26b-a4b-it.json b/src/content/workers-ai-models/gemma-4-26b-a4b-it.json index 42293e99990..c07139c6461 100644 --- a/src/content/workers-ai-models/gemma-4-26b-a4b-it.json +++ b/src/content/workers-ai-models/gemma-4-26b-a4b-it.json @@ -302,24 +302,24 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: minimal maps to none; low maps to high; medium maps to high; max maps to high; auto maps to high.", + "default": "none" }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", - "default": true, - "description": "Whether to enable reasoning, enabled by default." + "default": false, + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -1553,24 +1553,24 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: minimal maps to none; low maps to high; medium maps to high; max maps to high; auto maps to high.", + "default": "none" }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", - "default": true, - "description": "Whether to enable reasoning, enabled by default." + "default": false, + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -2374,24 +2374,24 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: minimal maps to none; low maps to high; medium maps to high; max maps to high; auto maps to high.", + "default": "none" }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", - "default": true, - "description": "Whether to enable reasoning, enabled by default." + "default": false, + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -3625,24 +3625,24 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: minimal maps to none; low maps to high; medium maps to high; max maps to high; auto maps to high.", + "default": "none" }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", - "default": true, - "description": "Whether to enable reasoning, enabled by default." + "default": false, + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -4693,4 +4693,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/glm-4.7-flash.json b/src/content/workers-ai-models/glm-4.7-flash.json index 4aa4c8ebd24..254ca5aedd4 100644 --- a/src/content/workers-ai-models/glm-4.7-flash.json +++ b/src/content/workers-ai-models/glm-4.7-flash.json @@ -279,29 +279,13 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "null" - } - ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." - }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -1526,29 +1510,13 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - { - "type": "null" - } - ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." - }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -2594,4 +2562,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/glm-5.2.json b/src/content/workers-ai-models/glm-5.2.json index 21783016702..8049672c846 100644 --- a/src/content/workers-ai-models/glm-5.2.json +++ b/src/content/workers-ai-models/glm-5.2.json @@ -295,16 +295,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, none. Compatibility aliases: low maps to high; medium maps to high; xhigh maps to max; minimal maps to none.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -312,7 +313,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -1542,16 +1543,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, none. Compatibility aliases: low maps to high; medium maps to high; xhigh maps to max; minimal maps to none.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -1559,7 +1561,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -2359,16 +2361,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, none. Compatibility aliases: low maps to high; medium maps to high; xhigh maps to max; minimal maps to none.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -2376,7 +2379,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -3606,16 +3609,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, none. Compatibility aliases: low maps to high; medium maps to high; xhigh maps to max; minimal maps to none.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -3623,7 +3627,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -4674,4 +4678,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/glm-5.3-flash.json b/src/content/workers-ai-models/glm-5.3-flash.json index b3bca043762..0009b0348ff 100644 --- a/src/content/workers-ai-models/glm-5.3-flash.json +++ b/src/content/workers-ai-models/glm-5.3-flash.json @@ -303,16 +303,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "low" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; minimal maps to max; medium maps to max; xhigh maps to max.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -320,7 +321,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -1550,16 +1554,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "low" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; minimal maps to max; medium maps to max; xhigh maps to max.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -1567,7 +1572,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -2367,16 +2375,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "low" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; minimal maps to max; medium maps to max; xhigh maps to max.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -2384,7 +2393,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -3614,16 +3626,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "low" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; minimal maps to max; medium maps to max; xhigh maps to max.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -3631,7 +3644,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -4682,4 +4698,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/glm-5.3.json b/src/content/workers-ai-models/glm-5.3.json index 8642bf431df..3f81497798e 100644 --- a/src/content/workers-ai-models/glm-5.3.json +++ b/src/content/workers-ai-models/glm-5.3.json @@ -295,16 +295,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "low" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; medium maps to max.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -312,7 +313,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -1542,16 +1546,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "low" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; medium maps to max.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -1559,7 +1564,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -2359,16 +2367,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "low" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; medium maps to max.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -2376,7 +2385,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -3606,16 +3618,17 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "max", + "high", + "low" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; medium maps to max.", + "default": "max" }, "chat_template_kwargs": { "type": "object", @@ -3623,7 +3636,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -4674,4 +4690,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/gpt-oss-120b.json b/src/content/workers-ai-models/gpt-oss-120b.json index 1a66743187b..b493330a78b 100644 --- a/src/content/workers-ai-models/gpt-oss-120b.json +++ b/src/content/workers-ai-models/gpt-oss-120b.json @@ -442,12 +442,13 @@ "properties": { "effort": { "type": "string", - "description": "Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.", "enum": [ "low", "medium", "high" - ] + ], + "description": "Reasoning effort. Supported levels: low, medium, high. Reasoning cannot be disabled.", + "default": "medium" }, "summary": { "type": "string", @@ -491,12 +492,13 @@ "properties": { "effort": { "type": "string", - "description": "Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.", "enum": [ "low", "medium", "high" - ] + ], + "description": "Reasoning effort. Supported levels: low, medium, high. Reasoning cannot be disabled.", + "default": "medium" }, "summary": { "type": "string", @@ -537,4 +539,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/gpt-oss-20b.json b/src/content/workers-ai-models/gpt-oss-20b.json index 820e3c3606e..bdf7886b5b6 100644 --- a/src/content/workers-ai-models/gpt-oss-20b.json +++ b/src/content/workers-ai-models/gpt-oss-20b.json @@ -442,12 +442,13 @@ "properties": { "effort": { "type": "string", - "description": "Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.", "enum": [ "low", "medium", "high" - ] + ], + "description": "Reasoning effort. Supported levels: low, medium, high. Reasoning cannot be disabled.", + "default": "medium" }, "summary": { "type": "string", @@ -491,12 +492,13 @@ "properties": { "effort": { "type": "string", - "description": "Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.", "enum": [ "low", "medium", "high" - ] + ], + "description": "Reasoning effort. Supported levels: low, medium, high. Reasoning cannot be disabled.", + "default": "medium" }, "summary": { "type": "string", @@ -537,4 +539,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/kimi-k2.6.json b/src/content/workers-ai-models/kimi-k2.6.json index 6100f49e57f..e7fd24b9e09 100644 --- a/src/content/workers-ai-models/kimi-k2.6.json +++ b/src/content/workers-ai-models/kimi-k2.6.json @@ -307,16 +307,16 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: low maps to high; medium maps to high; max maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -324,7 +324,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -1554,16 +1554,16 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: low maps to high; medium maps to high; max maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -1571,7 +1571,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -2371,16 +2371,16 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: low maps to high; medium maps to high; max maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -2388,7 +2388,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -3618,16 +3618,16 @@ { "type": "string", "enum": [ - "low", - "medium", - "high" + "high", + "none" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: low maps to high; medium maps to high; max maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -3635,7 +3635,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -4686,4 +4686,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/kimi-k2.7-code.json b/src/content/workers-ai-models/kimi-k2.7-code.json index 7f623e06209..a499f6383c5 100644 --- a/src/content/workers-ai-models/kimi-k2.7-code.json +++ b/src/content/workers-ai-models/kimi-k2.7-code.json @@ -303,8 +303,6 @@ { "type": "string", "enum": [ - "low", - "medium", "high" ] }, @@ -312,7 +310,8 @@ "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high. Reasoning cannot be disabled. Compatibility aliases: none maps to high; low maps to high; medium maps to high; max maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -320,7 +319,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -1550,8 +1552,6 @@ { "type": "string", "enum": [ - "low", - "medium", "high" ] }, @@ -1559,7 +1559,8 @@ "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high. Reasoning cannot be disabled. Compatibility aliases: none maps to high; low maps to high; medium maps to high; max maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -1567,7 +1568,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -2367,8 +2371,6 @@ { "type": "string", "enum": [ - "low", - "medium", "high" ] }, @@ -2376,7 +2378,8 @@ "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high. Reasoning cannot be disabled. Compatibility aliases: none maps to high; low maps to high; medium maps to high; max maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -2384,7 +2387,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -3614,8 +3620,6 @@ { "type": "string", "enum": [ - "low", - "medium", "high" ] }, @@ -3623,7 +3627,8 @@ "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: high. Reasoning cannot be disabled. Compatibility aliases: none maps to high; low maps to high; medium maps to high; max maps to high.", + "default": "high" }, "chat_template_kwargs": { "type": "object", @@ -3631,7 +3636,10 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Reasoning is always enabled for this model and cannot be disabled.", + "enum": [ + true + ] }, "clear_thinking": { "type": "boolean", @@ -4682,4 +4690,4 @@ } }, "deprecated": false -} \ No newline at end of file +} From cf75fb4f35fb512d120b1528c9432005150add7c Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Mon, 21 Sep 2026 12:23:22 -0700 Subject: [PATCH 02/12] [Workers AI] Document Qwen and Nemotron reasoning controls --- .../configuration/open-ai-compatibility.mdx | 32 ++++++++++++- .../nemotron-3-120b-a12b.json | 37 +++++++++++---- .../workers-ai-models/qwen3.8-27b.json | 47 ++++++++++++++----- 3 files changed, 93 insertions(+), 23 deletions(-) diff --git a/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx b/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx index 37ae8bc07bf..33e6d92d3cb 100644 --- a/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx +++ b/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx @@ -8,7 +8,7 @@ products: - workers-ai --- -import { Render } from "~/components"; +import { Aside, Render } from "~/components";
@@ -93,6 +93,36 @@ Reasoning controls and defaults depend on the model. Refer to each [model's inpu Gemma 4 supports `reasoning_effort: "none"` (the default) or `"high"`. Kimi K2.6 supports the same two values and defaults to `"high"`. Compatibility aliases such as `"low"` and `"medium"` select `"high"` for these models; they do not represent distinct effort levels. A `"none"` alias does not necessarily disable reasoning on models where reasoning is mandatory. Refer to the model's schema before using it as an off switch. +Qwen 3.8 supports `"low"`, `"medium"`, and `"xhigh"`. It defaults to `"xhigh"`. Other effort names, including `"high"`, `"max"`, and `"none"`, are not aliases. To turn off Qwen 3.8 reasoning, use `chat_template_kwargs: { enable_thinking: false }`. + + + The input schema linked from each model page is also available as JSON. For example, [Gemma 4's synchronous input schema](/workers-ai/models/gemma-4-26b-a4b-it/sync-input.json) documents its effort values and thinking default. ### AI Gateway diff --git a/src/content/workers-ai-models/nemotron-3-120b-a12b.json b/src/content/workers-ai-models/nemotron-3-120b-a12b.json index 54e2e7683a2..8e6c85ca03d 100644 --- a/src/content/workers-ai-models/nemotron-3-120b-a12b.json +++ b/src/content/workers-ai-models/nemotron-3-120b-a12b.json @@ -28,6 +28,23 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "medium", + "low", + "none" + ], + "default_effort": "medium", + "normalizes_to": { + "null": "medium" + }, + "mandatory": false, + "default_enabled": true, + "supports_max_tokens": false + } + }, { "property_id": "terms", "value": "https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-nemotron-open-model-license/" @@ -288,16 +305,17 @@ { "type": "string", "enum": [ + "none", "low", - "medium", - "high" + "medium" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: none, low, medium.", + "default": "medium" }, "chat_template_kwargs": { "type": "object", @@ -305,7 +323,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -1535,16 +1553,17 @@ { "type": "string", "enum": [ + "none", "low", - "medium", - "high" + "medium" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: none, low, medium.", + "default": "medium" }, "chat_template_kwargs": { "type": "object", @@ -1552,7 +1571,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -2598,4 +2617,4 @@ } }, "deprecated": false -} \ No newline at end of file +} diff --git a/src/content/workers-ai-models/qwen3.8-27b.json b/src/content/workers-ai-models/qwen3.8-27b.json index 5339a8f5059..9c62e8be3b2 100644 --- a/src/content/workers-ai-models/qwen3.8-27b.json +++ b/src/content/workers-ai-models/qwen3.8-27b.json @@ -17,6 +17,23 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "xhigh", + "medium", + "low" + ], + "default_effort": "xhigh", + "normalizes_to": { + "null": "xhigh" + }, + "mandatory": false, + "default_enabled": true, + "supports_max_tokens": false + } + }, { "property_id": "vision", "value": "true" @@ -301,14 +318,15 @@ "enum": [ "low", "medium", - "high" + "xhigh" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: low, medium, xhigh.", + "default": "xhigh" }, "chat_template_kwargs": { "type": "object", @@ -316,7 +334,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -1548,14 +1566,15 @@ "enum": [ "low", "medium", - "high" + "xhigh" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: low, medium, xhigh.", + "default": "xhigh" }, "chat_template_kwargs": { "type": "object", @@ -1563,7 +1582,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -2365,14 +2384,15 @@ "enum": [ "low", "medium", - "high" + "xhigh" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: low, medium, xhigh.", + "default": "xhigh" }, "chat_template_kwargs": { "type": "object", @@ -2380,7 +2400,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -3612,14 +3632,15 @@ "enum": [ "low", "medium", - "high" + "xhigh" ] }, { "type": "null" } ], - "description": "Constrains effort on reasoning for reasoning models (o1, o3-mini, etc.)." + "description": "Reasoning effort. Supported levels: low, medium, xhigh.", + "default": "xhigh" }, "chat_template_kwargs": { "type": "object", @@ -3627,7 +3648,7 @@ "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning, enabled by default." + "description": "Whether to enable reasoning for this model." }, "clear_thinking": { "type": "boolean", @@ -4678,4 +4699,4 @@ } }, "deprecated": false -} \ No newline at end of file +} From 6551b4c1a8c014d6da41590df0e63cdf841c395b Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Mon, 21 Sep 2026 12:34:13 -0700 Subject: [PATCH 03/12] [Workers AI] Format model reasoning metadata --- src/components/models/ModelFeatures.astro | 14 ++++- src/util/models/model-format.node.test.ts | 34 +++++++++- src/util/models/model-format.ts | 77 +++++++++++++++++++++++ 3 files changed, 121 insertions(+), 4 deletions(-) diff --git a/src/components/models/ModelFeatures.astro b/src/components/models/ModelFeatures.astro index c3915c40cc3..35200f7ccb4 100644 --- a/src/components/models/ModelFeatures.astro +++ b/src/components/models/ModelFeatures.astro @@ -6,7 +6,11 @@ * beta → Batch → request formats → partner → realtime → unit price → * dashboard pricing link. */ -import { modelCurrencyFormatter, type ModelView } from "~/util/models"; +import { + formatModelReasoning, + modelCurrencyFormatter, + type ModelView, +} from "~/util/models"; interface Props { model: ModelView; @@ -44,6 +48,10 @@ const hasProps = Object.keys(properties).length > 0; const price = Array.isArray(properties.price) ? (properties.price as { price: number; unit: string }[]) : null; +const reasoning = formatModelReasoning( + properties.reasoning_effort, + properties.reasoning, +); --- {hasProps && ( @@ -127,10 +135,10 @@ const price = Array.isArray(properties.price) Yes )} - {properties.reasoning && ( + {reasoning && ( Reasoning - {properties.reasoning_effort ?? "Yes"} + {reasoning} )} {properties.vision && ( diff --git a/src/util/models/model-format.node.test.ts b/src/util/models/model-format.node.test.ts index 9dcc6dac532..49260947edd 100644 --- a/src/util/models/model-format.node.test.ts +++ b/src/util/models/model-format.node.test.ts @@ -1,5 +1,9 @@ import { describe, expect, it } from "vitest"; -import { formatCompactTokens, formatModelPricing } from "./model-format"; +import { + formatCompactTokens, + formatModelPricing, + formatModelReasoning, +} from "./model-format"; describe("model display formatting", () => { it("formats token counts compactly", () => { @@ -7,6 +11,34 @@ describe("model display formatting", () => { expect(formatCompactTokens(null)).toBeNull(); }); + it("formats structured reasoning efforts in a concise natural order", () => { + expect( + formatModelReasoning( + { + supported_efforts: ["xhigh", "medium", "low"], + default_effort: "xhigh", + default_enabled: true, + }, + "true", + ), + ).toBe("Low, Medium, Extra high (default)"); + expect( + formatModelReasoning( + { + supported_efforts: ["medium", "low", "none"], + default_effort: "medium", + }, + "true", + ), + ).toBe("Off, Low, Medium (default)"); + }); + + it("falls back to a clean yes or no when effort metadata is absent", () => { + expect(formatModelReasoning(undefined, "true")).toBe("Yes"); + expect(formatModelReasoning(undefined, "false")).toBe("No"); + expect(formatModelReasoning(undefined, undefined)).toBeNull(); + }); + it("formats supported pricing values and omits nested metadata", () => { expect( formatModelPricing({ diff --git a/src/util/models/model-format.ts b/src/util/models/model-format.ts index 744be21f29f..e5597879108 100644 --- a/src/util/models/model-format.ts +++ b/src/util/models/model-format.ts @@ -15,6 +15,20 @@ const implicitTokenPriceLabels = new Map([ ["output_video_tokens", "Output video"], ]); +const reasoningEffortLabels = new Map([ + ["none", "Off"], + ["minimal", "Minimal"], + ["low", "Low"], + ["medium", "Medium"], + ["high", "High"], + ["xhigh", "Extra high"], + ["max", "Maximum"], +]); + +const reasoningEffortOrder = new Map( + [...reasoningEffortLabels.keys()].map((effort, index) => [effort, index]), +); + export function formatCompactTokens(value: unknown): string | null { const count = Number(value); return Number.isFinite(count) && count > 0 @@ -22,6 +36,69 @@ export function formatCompactTokens(value: unknown): string | null { : null; } +export function formatModelReasoning( + reasoningEffort: unknown, + reasoning: unknown, +): string | null { + if ( + typeof reasoningEffort === "object" && + reasoningEffort !== null && + !Array.isArray(reasoningEffort) + ) { + const metadata = reasoningEffort as Record; + const defaultEffort = + typeof metadata.default_effort === "string" + ? metadata.default_effort.toLowerCase() + : null; + const supportedEfforts = Array.isArray(metadata.supported_efforts) + ? [ + ...new Set( + metadata.supported_efforts + .filter((effort): effort is string => typeof effort === "string") + .map((effort) => effort.toLowerCase()), + ), + ].sort( + (a, b) => + (reasoningEffortOrder.get(a) ?? Number.MAX_SAFE_INTEGER) - + (reasoningEffortOrder.get(b) ?? Number.MAX_SAFE_INTEGER), + ) + : []; + + if (supportedEfforts.length > 0) { + return supportedEfforts + .map((effort) => { + const label = + reasoningEffortLabels.get(effort) ?? + effort.charAt(0).toUpperCase() + effort.slice(1); + return effort === defaultEffort ? `${label} (default)` : label; + }) + .join(", "); + } + + if (defaultEffort) { + const label = + reasoningEffortLabels.get(defaultEffort) ?? + defaultEffort.charAt(0).toUpperCase() + defaultEffort.slice(1); + return `${label} (default)`; + } + + if (typeof metadata.default_enabled === "boolean") { + return metadata.default_enabled ? "Yes" : "No"; + } + } + + if (typeof reasoning === "boolean") { + return reasoning ? "Yes" : "No"; + } + if (typeof reasoning === "string") { + const normalized = reasoning.trim().toLowerCase(); + if (["true", "yes", "1"].includes(normalized)) return "Yes"; + if (["false", "no", "0"].includes(normalized)) return "No"; + } + + return null; +} + export function formatModelPricing( pricing: Record | undefined, ): string[] { From ff8a201d9e5c74a8d8bbde0b9c44e3ba5e91c2ec Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Mon, 21 Sep 2026 13:35:24 -0700 Subject: [PATCH 04/12] [Workers AI] Sync reasoning metadata for model cards --- .../deepseek-v4-flash-0731.json | 20 +++++++++++++++++++ .../deepseek-v4-pro-0813.json | 20 +++++++++++++++++++ .../workers-ai-models/gemma-4-26b-a4b-it.json | 20 +++++++++++++++++++ .../workers-ai-models/glm-4.7-flash.json | 7 +++++++ src/content/workers-ai-models/glm-5.2.json | 20 +++++++++++++++++++ .../workers-ai-models/glm-5.3-flash.json | 20 +++++++++++++++++++ src/content/workers-ai-models/glm-5.3.json | 18 +++++++++++++++++ .../workers-ai-models/gpt-oss-120b.json | 13 ++++++++++++ .../workers-ai-models/gpt-oss-20b.json | 13 ++++++++++++ src/content/workers-ai-models/kimi-k2.6.json | 18 +++++++++++++++++ .../workers-ai-models/kimi-k2.7-code.json | 7 +++++++ src/util/models/model-format.node.test.ts | 12 +++++++++++ src/util/models/model-format.ts | 5 ++++- 13 files changed, 192 insertions(+), 1 deletion(-) diff --git a/src/content/workers-ai-models/deepseek-v4-flash-0731.json b/src/content/workers-ai-models/deepseek-v4-flash-0731.json index 4c5f36ebe78..12d762c2912 100644 --- a/src/content/workers-ai-models/deepseek-v4-flash-0731.json +++ b/src/content/workers-ai-models/deepseek-v4-flash-0731.json @@ -21,6 +21,26 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "max", + "high", + "low", + "none" + ], + "default_effort": "high", + "default_enabled": true, + "mandatory": false, + "normalizes_to": { + "null": "high", + "minimal": "low", + "medium": "high", + "xhigh": "high" + } + } + }, { "property_id": "price", "value": [ diff --git a/src/content/workers-ai-models/deepseek-v4-pro-0813.json b/src/content/workers-ai-models/deepseek-v4-pro-0813.json index c8a833e5263..ba58a6ae356 100644 --- a/src/content/workers-ai-models/deepseek-v4-pro-0813.json +++ b/src/content/workers-ai-models/deepseek-v4-pro-0813.json @@ -17,6 +17,26 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "max", + "high", + "low", + "none" + ], + "default_effort": "high", + "default_enabled": true, + "mandatory": false, + "normalizes_to": { + "null": "high", + "minimal": "low", + "medium": "high", + "xhigh": "high" + } + } + }, { "property_id": "price", "value": [ diff --git a/src/content/workers-ai-models/gemma-4-26b-a4b-it.json b/src/content/workers-ai-models/gemma-4-26b-a4b-it.json index c07139c6461..2454e5f4678 100644 --- a/src/content/workers-ai-models/gemma-4-26b-a4b-it.json +++ b/src/content/workers-ai-models/gemma-4-26b-a4b-it.json @@ -17,6 +17,26 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "high", + "none" + ], + "default_effort": "none", + "normalizes_to": { + "minimal": "none", + "low": "high", + "medium": "high", + "max": "high", + "auto": "high", + "null": "none" + }, + "mandatory": false, + "default_enabled": false + } + }, { "property_id": "terms", "value": "https://ai.google.dev/gemma/docs/gemma_4_license" diff --git a/src/content/workers-ai-models/glm-4.7-flash.json b/src/content/workers-ai-models/glm-4.7-flash.json index 254ca5aedd4..f6716f08014 100644 --- a/src/content/workers-ai-models/glm-4.7-flash.json +++ b/src/content/workers-ai-models/glm-4.7-flash.json @@ -27,6 +27,13 @@ { "property_id": "reasoning", "value": "true" + }, + { + "property_id": "reasoning_effort", + "value": { + "mandatory": false, + "default_enabled": true + } } ], "id": "86b3e51a-4b05-43fa-a403-0f27821919d2", diff --git a/src/content/workers-ai-models/glm-5.2.json b/src/content/workers-ai-models/glm-5.2.json index 8049672c846..318bf0ad990 100644 --- a/src/content/workers-ai-models/glm-5.2.json +++ b/src/content/workers-ai-models/glm-5.2.json @@ -17,6 +17,26 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "max", + "high", + "none" + ], + "default_effort": "max", + "default_enabled": true, + "mandatory": false, + "normalizes_to": { + "null": "max", + "low": "high", + "medium": "high", + "xhigh": "max", + "minimal": "none" + } + } + }, { "property_id": "price", "value": [ diff --git a/src/content/workers-ai-models/glm-5.3-flash.json b/src/content/workers-ai-models/glm-5.3-flash.json index 0009b0348ff..233f9b5c280 100644 --- a/src/content/workers-ai-models/glm-5.3-flash.json +++ b/src/content/workers-ai-models/glm-5.3-flash.json @@ -17,6 +17,26 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "max", + "high", + "low" + ], + "default_effort": "max", + "normalizes_to": { + "none": "max", + "minimal": "max", + "medium": "max", + "xhigh": "max", + "null": "max" + }, + "mandatory": true, + "default_enabled": true + } + }, { "property_id": "terms", "value": "https://huggingface.co/zai-org/GLM-5.3-Flash/blob/main/LICENSE" diff --git a/src/content/workers-ai-models/glm-5.3.json b/src/content/workers-ai-models/glm-5.3.json index 3f81497798e..b12cbe24f14 100644 --- a/src/content/workers-ai-models/glm-5.3.json +++ b/src/content/workers-ai-models/glm-5.3.json @@ -17,6 +17,24 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "max", + "high", + "low" + ], + "default_effort": "max", + "normalizes_to": { + "none": "max", + "medium": "max", + "null": "max" + }, + "mandatory": true, + "default_enabled": true + } + }, { "property_id": "price", "value": [ diff --git a/src/content/workers-ai-models/gpt-oss-120b.json b/src/content/workers-ai-models/gpt-oss-120b.json index b493330a78b..fabf4ffff61 100644 --- a/src/content/workers-ai-models/gpt-oss-120b.json +++ b/src/content/workers-ai-models/gpt-oss-120b.json @@ -31,6 +31,19 @@ { "property_id": "reasoning", "value": "true" + }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "high", + "medium", + "low" + ], + "default_effort": "medium", + "mandatory": true, + "default_enabled": true + } } ], "id": "f9f2250b-1048-4a52-9910-d0bf976616a1", diff --git a/src/content/workers-ai-models/gpt-oss-20b.json b/src/content/workers-ai-models/gpt-oss-20b.json index bdf7886b5b6..f053df1e47a 100644 --- a/src/content/workers-ai-models/gpt-oss-20b.json +++ b/src/content/workers-ai-models/gpt-oss-20b.json @@ -31,6 +31,19 @@ { "property_id": "reasoning", "value": "true" + }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "high", + "medium", + "low" + ], + "default_effort": "medium", + "mandatory": true, + "default_enabled": true + } } ], "id": "188a4e1e-253e-46d0-9616-0bf8c149763f", diff --git a/src/content/workers-ai-models/kimi-k2.6.json b/src/content/workers-ai-models/kimi-k2.6.json index e7fd24b9e09..befef3d09d5 100644 --- a/src/content/workers-ai-models/kimi-k2.6.json +++ b/src/content/workers-ai-models/kimi-k2.6.json @@ -21,6 +21,24 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "supported_efforts": [ + "high", + "none" + ], + "default_effort": "high", + "normalizes_to": { + "low": "high", + "medium": "high", + "max": "high", + "null": "high" + }, + "mandatory": false, + "default_enabled": true + } + }, { "property_id": "terms", "value": "https://huggingface.co/moonshotai/Kimi-K2.6/blob/main/LICENSE" diff --git a/src/content/workers-ai-models/kimi-k2.7-code.json b/src/content/workers-ai-models/kimi-k2.7-code.json index a499f6383c5..c1c6c38fbfb 100644 --- a/src/content/workers-ai-models/kimi-k2.7-code.json +++ b/src/content/workers-ai-models/kimi-k2.7-code.json @@ -17,6 +17,13 @@ "property_id": "reasoning", "value": "true" }, + { + "property_id": "reasoning_effort", + "value": { + "mandatory": true, + "default_enabled": true + } + }, { "property_id": "terms", "value": "https://huggingface.co/moonshotai/Kimi-K2.7-Code/blob/main/LICENSE" diff --git a/src/util/models/model-format.node.test.ts b/src/util/models/model-format.node.test.ts index 49260947edd..2f03480a533 100644 --- a/src/util/models/model-format.node.test.ts +++ b/src/util/models/model-format.node.test.ts @@ -39,6 +39,18 @@ describe("model display formatting", () => { expect(formatModelReasoning(undefined, undefined)).toBeNull(); }); + it("summarizes structured binary reasoning metadata", () => { + expect( + formatModelReasoning({ mandatory: true, default_enabled: true }, "false"), + ).toBe("Always on"); + expect( + formatModelReasoning( + { mandatory: false, default_enabled: true }, + "false", + ), + ).toBe("On by default"); + }); + it("formats supported pricing values and omits nested metadata", () => { expect( formatModelPricing({ diff --git a/src/util/models/model-format.ts b/src/util/models/model-format.ts index e5597879108..59504b9a1ff 100644 --- a/src/util/models/model-format.ts +++ b/src/util/models/model-format.ts @@ -82,8 +82,11 @@ export function formatModelReasoning( return `${label} (default)`; } + if (metadata.mandatory === true) { + return "Always on"; + } if (typeof metadata.default_enabled === "boolean") { - return metadata.default_enabled ? "Yes" : "No"; + return metadata.default_enabled ? "On by default" : "Off by default"; } } From a4057139b52d789ad2815a35d3861aa825d63632 Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Mon, 21 Sep 2026 13:42:41 -0700 Subject: [PATCH 05/12] [Workers AI] Display max reasoning effort concisely --- src/util/models/model-format.node.test.ts | 9 +++++++++ src/util/models/model-format.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/util/models/model-format.node.test.ts b/src/util/models/model-format.node.test.ts index 2f03480a533..d411134c3b0 100644 --- a/src/util/models/model-format.node.test.ts +++ b/src/util/models/model-format.node.test.ts @@ -31,6 +31,15 @@ describe("model display formatting", () => { "true", ), ).toBe("Off, Low, Medium (default)"); + expect( + formatModelReasoning( + { + supported_efforts: ["max", "high", "low"], + default_effort: "max", + }, + "true", + ), + ).toBe("Low, High, Max (default)"); }); it("falls back to a clean yes or no when effort metadata is absent", () => { diff --git a/src/util/models/model-format.ts b/src/util/models/model-format.ts index 59504b9a1ff..e46c3d02d67 100644 --- a/src/util/models/model-format.ts +++ b/src/util/models/model-format.ts @@ -22,7 +22,7 @@ const reasoningEffortLabels = new Map([ ["medium", "Medium"], ["high", "High"], ["xhigh", "Extra high"], - ["max", "Maximum"], + ["max", "Max"], ]); const reasoningEffortOrder = new Map( From 112440c9ddf72a6c4e7ea30d06a7105b2f02cf22 Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Mon, 21 Sep 2026 15:47:17 -0700 Subject: [PATCH 06/12] [Workers AI] Render reasoning efforts as code --- src/components/models/ModelFeatures.astro | 15 +++++++- src/util/models/model-format.node.test.ts | 27 ++++++++++++-- src/util/models/model-format.ts | 45 +++++++++-------------- 3 files changed, 55 insertions(+), 32 deletions(-) diff --git a/src/components/models/ModelFeatures.astro b/src/components/models/ModelFeatures.astro index 35200f7ccb4..6cc778fea6a 100644 --- a/src/components/models/ModelFeatures.astro +++ b/src/components/models/ModelFeatures.astro @@ -138,7 +138,20 @@ const reasoning = formatModelReasoning( {reasoning && ( Reasoning - {reasoning} + + {Array.isArray(reasoning) ? ( + + {reasoning.map((effort) => ( + + {effort.value} + {effort.isDefault && " (default)"} + + ))} + + ) : ( + reasoning + )} + )} {properties.vision && ( diff --git a/src/util/models/model-format.node.test.ts b/src/util/models/model-format.node.test.ts index d411134c3b0..5d245404ab3 100644 --- a/src/util/models/model-format.node.test.ts +++ b/src/util/models/model-format.node.test.ts @@ -21,7 +21,11 @@ describe("model display formatting", () => { }, "true", ), - ).toBe("Low, Medium, Extra high (default)"); + ).toEqual([ + { value: "low", isDefault: false }, + { value: "medium", isDefault: false }, + { value: "xhigh", isDefault: true }, + ]); expect( formatModelReasoning( { @@ -30,7 +34,11 @@ describe("model display formatting", () => { }, "true", ), - ).toBe("Off, Low, Medium (default)"); + ).toEqual([ + { value: "none", isDefault: false }, + { value: "low", isDefault: false }, + { value: "medium", isDefault: true }, + ]); expect( formatModelReasoning( { @@ -39,7 +47,20 @@ describe("model display formatting", () => { }, "true", ), - ).toBe("Low, High, Max (default)"); + ).toEqual([ + { value: "low", isDefault: false }, + { value: "high", isDefault: false }, + { value: "max", isDefault: true }, + ]); + expect( + formatModelReasoning( + { supported_efforts: ["off", "none", "low"] }, + "true", + ), + ).toEqual([ + { value: "none", isDefault: false }, + { value: "low", isDefault: false }, + ]); }); it("falls back to a clean yes or no when effort metadata is absent", () => { diff --git a/src/util/models/model-format.ts b/src/util/models/model-format.ts index e46c3d02d67..33353fbc9d3 100644 --- a/src/util/models/model-format.ts +++ b/src/util/models/model-format.ts @@ -15,20 +15,17 @@ const implicitTokenPriceLabels = new Map([ ["output_video_tokens", "Output video"], ]); -const reasoningEffortLabels = new Map([ - ["none", "Off"], - ["minimal", "Minimal"], - ["low", "Low"], - ["medium", "Medium"], - ["high", "High"], - ["xhigh", "Extra high"], - ["max", "Max"], -]); - const reasoningEffortOrder = new Map( - [...reasoningEffortLabels.keys()].map((effort, index) => [effort, index]), + ["none", "minimal", "low", "medium", "high", "xhigh", "max"].map( + (effort, index) => [effort, index], + ), ); +export interface ModelReasoningEffort { + value: string; + isDefault: boolean; +} + export function formatCompactTokens(value: unknown): string | null { const count = Number(value); return Number.isFinite(count) && count > 0 @@ -39,7 +36,7 @@ export function formatCompactTokens(value: unknown): string | null { export function formatModelReasoning( reasoningEffort: unknown, reasoning: unknown, -): string | null { +): string | ModelReasoningEffort[] | null { if ( typeof reasoningEffort === "object" && reasoningEffort !== null && @@ -50,12 +47,15 @@ export function formatModelReasoning( typeof metadata.default_effort === "string" ? metadata.default_effort.toLowerCase() : null; + const normalizedDefaultEffort = + defaultEffort === "off" ? "none" : defaultEffort; const supportedEfforts = Array.isArray(metadata.supported_efforts) ? [ ...new Set( metadata.supported_efforts .filter((effort): effort is string => typeof effort === "string") - .map((effort) => effort.toLowerCase()), + .map((effort) => effort.toLowerCase()) + .map((effort) => (effort === "off" ? "none" : effort)), ), ].sort( (a, b) => @@ -65,21 +65,10 @@ export function formatModelReasoning( : []; if (supportedEfforts.length > 0) { - return supportedEfforts - .map((effort) => { - const label = - reasoningEffortLabels.get(effort) ?? - effort.charAt(0).toUpperCase() + effort.slice(1); - return effort === defaultEffort ? `${label} (default)` : label; - }) - .join(", "); - } - - if (defaultEffort) { - const label = - reasoningEffortLabels.get(defaultEffort) ?? - defaultEffort.charAt(0).toUpperCase() + defaultEffort.slice(1); - return `${label} (default)`; + return supportedEfforts.map((value) => ({ + value, + isDefault: value === normalizedDefaultEffort, + })); } if (metadata.mandatory === true) { From e70e855bd951b8a56a81a2dc9704ae7e055c3f83 Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Mon, 21 Sep 2026 15:55:52 -0700 Subject: [PATCH 07/12] [Workers AI] Standardize model info table rows --- src/components/models/ModelFeatures.astro | 2 +- src/styles/prose.css | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/models/ModelFeatures.astro b/src/components/models/ModelFeatures.astro index 6cc778fea6a..0f027ba6427 100644 --- a/src/components/models/ModelFeatures.astro +++ b/src/components/models/ModelFeatures.astro @@ -62,7 +62,7 @@ const reasoning = formatModelReasoning( - + {properties.planned_deprecation_date && ( diff --git a/src/styles/prose.css b/src/styles/prose.css index f2d0d6f1e62..334b79d46f5 100644 --- a/src/styles/prose.css +++ b/src/styles/prose.css @@ -241,7 +241,9 @@ .docs-content :where( - tbody:not([class]):has(tr:nth-child(5)) tr:nth-child(even) td:not([class]) + tbody:not([class]):not([data-row-stripes="off"]):has(tr:nth-child(5)) + tr:nth-child(even) + td:not([class]) ) { background: var(--nb-accent); } From 4b2a6c5b3644c85aa84bf32fd030566b62ca93eb Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Mon, 21 Sep 2026 16:34:22 -0700 Subject: [PATCH 08/12] [Workers AI] Move Nemotron reasoning guidance --- src/components/models/ModelDetailPage.astro | 59 ++++++++++++++++++- .../configuration/open-ai-compatibility.mdx | 44 +------------- 2 files changed, 58 insertions(+), 45 deletions(-) diff --git a/src/components/models/ModelDetailPage.astro b/src/components/models/ModelDetailPage.astro index cc5874875ca..e6c2be67371 100644 --- a/src/components/models/ModelDetailPage.astro +++ b/src/components/models/ModelDetailPage.astro @@ -144,7 +144,11 @@ const authorName = model.authorName; const requiresWorkersPaid = model.properties.require_workers_paid === true || model.properties.require_workers_paid === "true"; -const hasReasoningEffortGuidance = model.name === "@cf/zai-org/glm-5.2"; +const hasGlm52ReasoningEffortGuidance = model.name === "@cf/zai-org/glm-5.2"; +const hasNemotronReasoningEffortGuidance = + model.name === "@cf/nvidia/nemotron-3-120b-a12b"; +const hasReasoningEffortGuidance = + hasGlm52ReasoningEffortGuidance || hasNemotronReasoningEffortGuidance; // `hasSchema`: input must have at least one key. const hasSchema = Object.keys(model.schema.input).length > 0; @@ -345,7 +349,7 @@ const headings: MarkdownHeading[] = [ - {hasReasoningEffortGuidance && ( + {hasGlm52ReasoningEffortGuidance && ( )} + {hasNemotronReasoningEffortGuidance && ( + + +

+ Nemotron supports normal reasoning, low reasoning, and reasoning turned + off. It does not currently select these modes from the top-level + reasoning_effort field. Pass the corresponding options + through chat_template_kwargs instead. +

+

+ To use low reasoning, set both enable_thinking and + low_effort: +

+ +

+ The low-effort option appends {`{reasoning effort: low}`}{" "} + to the latest user message. To turn reasoning off, set + enable_thinking to False. For coding agents, + set + force_nonempty_content to True in the same + chat_template_kwargs object. +

+

+ For more information, refer to{" "} + + NVIDIA's Nemotron API client example + + . +

+
+ )} + { /* Defensive dead branch (model not in slice): nova-3 transport pricing. */ model.name === "@cf/deepgram/nova-3" && ( diff --git a/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx b/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx index 33e6d92d3cb..bc5db147942 100644 --- a/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx +++ b/src/content/docs/workers-ai/configuration/open-ai-compatibility.mdx @@ -8,7 +8,7 @@ products: - workers-ai --- -import { Aside, Render } from "~/components"; +import { Render } from "~/components";
@@ -83,48 +83,6 @@ const response = await openai.responses.create({ }); ``` -### Reasoning controls - -Reasoning controls and defaults depend on the model. Refer to each [model's input schema](/workers-ai/models/) for its supported values. - -- **Chat Completions:** Use `reasoning_effort` when the model supports named effort levels. For example, GPT-OSS supports `low`, `medium` (the default), and `high`. Its reasoning is always enabled. -- **Responses:** For GPT-OSS, use `reasoning: { effort: "medium" }` instead of the top-level `reasoning_effort` field. -- **Thinking on or off:** Models such as GLM-4.7-Flash support `chat_template_kwargs: { enable_thinking: false }`. GLM-4.7-Flash has an on/off control, rather than separate low, medium, and high levels. - -Gemma 4 supports `reasoning_effort: "none"` (the default) or `"high"`. Kimi K2.6 supports the same two values and defaults to `"high"`. Compatibility aliases such as `"low"` and `"medium"` select `"high"` for these models; they do not represent distinct effort levels. A `"none"` alias does not necessarily disable reasoning on models where reasoning is mandatory. Refer to the model's schema before using it as an off switch. - -Qwen 3.8 supports `"low"`, `"medium"`, and `"xhigh"`. It defaults to `"xhigh"`. Other effort names, including `"high"`, `"max"`, and `"none"`, are not aliases. To turn off Qwen 3.8 reasoning, use `chat_template_kwargs: { enable_thinking: false }`. - - - -The input schema linked from each model page is also available as JSON. For example, [Gemma 4's synchronous input schema](/workers-ai/models/gemma-4-26b-a4b-it/sync-input.json) documents its effort values and thinking default. - ### AI Gateway These endpoints are also compatible with [AI Gateway](/ai-gateway/usage/providers/workersai/#openai-compatible-endpoints). From 93bae2d586f5de1cfbba82c48151fc2bc79cfd2c Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Mon, 21 Sep 2026 17:19:19 -0700 Subject: [PATCH 09/12] [Workers AI] Publish Nemotron native reasoning controls --- .../nemotron-3-120b-a12b.json | 1839 ++++++++--------- 1 file changed, 900 insertions(+), 939 deletions(-) diff --git a/src/content/workers-ai-models/nemotron-3-120b-a12b.json b/src/content/workers-ai-models/nemotron-3-120b-a12b.json index 8e6c85ca03d..8f4e2775f95 100644 --- a/src/content/workers-ai-models/nemotron-3-120b-a12b.json +++ b/src/content/workers-ai-models/nemotron-3-120b-a12b.json @@ -28,23 +28,6 @@ "property_id": "reasoning", "value": "true" }, - { - "property_id": "reasoning_effort", - "value": { - "supported_efforts": [ - "medium", - "low", - "none" - ], - "default_effort": "medium", - "normalizes_to": { - "null": "medium" - }, - "mandatory": false, - "default_enabled": true, - "supports_max_tokens": false - } - }, { "property_id": "terms", "value": "https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-nemotron-open-model-license/" @@ -67,14 +50,9 @@ { "title": "Prompt", "properties": { - "prompt": { - "type": "string", - "minLength": 1, - "description": "The input text prompt for the model to generate a response." - }, "model": { "type": "string", - "description": "ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, etc')." + "description": "ID of the model to use (for example, '@cf/nvidia/nemotron-3-120b-a12b')." }, "audio": { "anyOf": [ @@ -178,7 +156,7 @@ "type": "null" } ], - "description": "Deprecated in favor of max_completion_tokens. The maximum number of tokens to generate." + "description": "The maximum number of tokens to generate." }, "max_completion_tokens": { "anyOf": [ @@ -200,7 +178,7 @@ "type": "null" } ], - "description": "Set of 16 key-value pairs that can be attached to the object." + "description": "Set of key-value pairs that can be attached to the object." }, "modalities": { "anyOf": [ @@ -218,7 +196,7 @@ "type": "null" } ], - "description": "Output types requested from the model (e.g. ['text'] or ['text', 'audio'])." + "description": "Output types requested from the model." }, "n": { "anyOf": [ @@ -300,35 +278,24 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "none", - "low", - "medium" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: none, low, medium.", - "default": "medium" - }, "chat_template_kwargs": { "type": "object", + "description": "Nemotron chat-template controls for normal reasoning, low-effort reasoning, and non-reasoning responses.", "properties": { "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning for this model." + "description": "Whether to enable reasoning. Reasoning is enabled by default." }, - "clear_thinking": { + "low_effort": { "type": "boolean", "default": false, - "description": "If false, preserves reasoning context between turns." + "description": "When reasoning is enabled, use Nemotron's low-effort reasoning mode, which uses significantly fewer reasoning tokens." + }, + "force_nonempty_content": { + "type": "boolean", + "default": false, + "description": "For coding agent use, Nvidia suggests setting force_nonempty_content=true" } } }, @@ -451,7 +418,7 @@ } ], "default": false, - "description": "Whether to store the output for model distillation / evals." + "description": "Whether to store the output for model distillation or evaluation." }, "stream": { "anyOf": [ @@ -866,6 +833,11 @@ }, "minItems": 1, "maxItems": 128 + }, + "prompt": { + "type": "string", + "minLength": 1, + "description": "The input text prompt for the model to generate a response." } }, "required": [ @@ -875,490 +847,45 @@ { "title": "Messages", "properties": { - "messages": { - "type": "array", - "description": "A list of messages comprising the conversation so far.", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": [ - "developer" - ] - }, - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ] - }, - "text": { - "type": "string" - } - }, - "required": [ - "type", - "text" - ] + "model": { + "type": "string", + "description": "ID of the model to use (for example, '@cf/nvidia/nemotron-3-120b-a12b')." + }, + "audio": { + "anyOf": [ + { + "type": "object", + "description": "Parameters for audio output. Required when modalities includes 'audio'.", + "properties": { + "voice": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" } - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "role", - "content" - ] - }, - { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": [ - "system" - ] - }, - "content": { - "anyOf": [ - { - "type": "string" }, - { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ] - }, - "text": { - "type": "string" - } - }, - "required": [ - "type", - "text" - ] - } - } - ] - }, - "name": { - "type": "string" - } + "required": [ + "id" + ] + } + ] }, - "required": [ - "role", - "content" - ] - }, - { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": [ - "user" - ] - }, - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "text", - "image_url", - "video_url", - "input_audio", - "file" - ] - }, - "text": { - "type": "string" - }, - "image_url": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "detail": { - "type": "string", - "enum": [ - "auto", - "low", - "high" - ], - "default": "auto" - } - } - }, - "video_url": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - } - }, - "input_audio": { - "type": "object", - "properties": { - "data": { - "type": "string" - }, - "format": { - "type": "string", - "enum": [ - "wav", - "mp3" - ] - } - } - }, - "file": { - "type": "object", - "properties": { - "file_data": { - "type": "string" - }, - "file_id": { - "type": "string" - }, - "filename": { - "type": "string" - } - } - } - }, - "required": [ - "type" - ] - }, - "minItems": 1 - } - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "role", - "content" - ] - }, - { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": [ - "assistant" - ] - }, - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - }, - { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "text", - "refusal" - ] - }, - "text": { - "type": "string" - }, - "refusal": { - "type": "string" - } - }, - "required": [ - "type" - ] - } - } - ] - }, - "refusal": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "name": { - "type": "string" - }, - "audio": { - "anyOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ] - } - ] - }, - "tool_calls": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "function" - ] - }, - "function": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "arguments": { - "type": "string", - "description": "JSON-encoded arguments string." - } - }, - "required": [ - "name", - "arguments" - ] - } - }, - "required": [ - "id", - "type", - "function" - ] - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "custom" - ] - }, - "custom": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "input": { - "type": "string" - } - }, - "required": [ - "name", - "input" - ] - } - }, - "required": [ - "id", - "type", - "custom" - ] - } - ] - } - }, - "function_call": { - "anyOf": [ - { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "arguments": { - "type": "string" - } - }, - "required": [ - "name", - "arguments" - ] - } - ] - } - }, - "required": [ - "role" - ] - }, - { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": [ - "tool" - ] - }, - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ] - }, - "text": { - "type": "string" - } - }, - "required": [ - "type", - "text" - ] - } - } - ] - }, - "tool_call_id": { - "type": "string" - } - }, - "required": [ - "role", - "content", - "tool_call_id" - ] - }, - { - "type": "object", - "properties": { - "role": { - "type": "string", - "enum": [ - "function" - ] - }, - "content": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "role", - "content", - "name" - ] - } - ] - }, - "minItems": 1 - }, - "model": { - "type": "string", - "description": "ID of the model to use (e.g. '@cf/zai-org/glm-4.7-flash, etc')." - }, - "audio": { - "anyOf": [ - { - "type": "object", - "description": "Parameters for audio output. Required when modalities includes 'audio'.", - "properties": { - "voice": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ] - } - ] - }, - "format": { - "type": "string", - "enum": [ - "wav", - "aac", - "mp3", - "flac", - "opus", - "pcm16" - ] - } + "format": { + "type": "string", + "enum": [ + "wav", + "aac", + "mp3", + "flac", + "opus", + "pcm16" + ] + } }, "required": [ "voice", @@ -1426,7 +953,7 @@ "type": "null" } ], - "description": "Deprecated in favor of max_completion_tokens. The maximum number of tokens to generate." + "description": "The maximum number of tokens to generate." }, "max_completion_tokens": { "anyOf": [ @@ -1448,7 +975,7 @@ "type": "null" } ], - "description": "Set of 16 key-value pairs that can be attached to the object." + "description": "Set of key-value pairs that can be attached to the object." }, "modalities": { "anyOf": [ @@ -1466,7 +993,7 @@ "type": "null" } ], - "description": "Output types requested from the model (e.g. ['text'] or ['text', 'audio'])." + "description": "Output types requested from the model." }, "n": { "anyOf": [ @@ -1548,35 +1075,24 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "none", - "low", - "medium" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: none, low, medium.", - "default": "medium" - }, "chat_template_kwargs": { "type": "object", + "description": "Nemotron chat-template controls for normal reasoning, low-effort reasoning, and non-reasoning responses.", "properties": { "enable_thinking": { "type": "boolean", "default": true, - "description": "Whether to enable reasoning for this model." + "description": "Whether to enable reasoning. Reasoning is enabled by default." + }, + "low_effort": { + "type": "boolean", + "default": false, + "description": "When reasoning is enabled, use Nemotron's low-effort reasoning mode, which uses significantly fewer reasoning tokens." }, - "clear_thinking": { + "force_nonempty_content": { "type": "boolean", "default": false, - "description": "If false, preserves reasoning context between turns." + "description": "For coding agent use, Nvidia suggests setting force_nonempty_content=true" } } }, @@ -1625,495 +1141,940 @@ "json_schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "schema": { - "type": "object" - }, - "strict": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "schema": { + "type": "object" + }, + "strict": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "type", + "json_schema" + ] + } + ] + } + ] + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "If specified, the system will make a best effort to sample deterministically." + }, + "stop": { + "description": "Up to 4 sequences where the API will stop generating further tokens.", + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "maxItems": 4 + } + ] + }, + "store": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Whether to store the output for model distillation or evaluation." + }, + "stream": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "If true, partial message deltas will be sent as server-sent events." + }, + "stream_options": { + "anyOf": [ + { + "type": "object", + "properties": { + "include_usage": { + "type": "boolean" + }, + "include_obfuscation": { + "type": "boolean" + } + } + } + ] + }, + "temperature": { + "anyOf": [ + { + "type": "number", + "minimum": 0, + "maximum": 2 + }, + { + "type": "null" + } + ], + "default": 1, + "description": "Sampling temperature between 0 and 2." + }, + "tool_choice": { + "anyOf": [ + { + "description": "Controls which (if any) tool is called by the model. 'none' = no tools, 'auto' = model decides, 'required' = must call a tool.", + "oneOf": [ + { + "type": "string", + "enum": [ + "none", + "auto", + "required" + ] + }, + { + "type": "object", + "description": "Force a specific function tool.", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ] + }, + "function": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "type", + "function" + ] + }, + { + "type": "object", + "description": "Force a specific custom tool.", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ] + }, + "custom": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "type", + "custom" + ] + }, + { + "type": "object", + "description": "Constrain to an allowed subset of tools.", + "properties": { + "type": { + "type": "string", + "enum": [ + "allowed_tools" + ] + }, + "allowed_tools": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "auto", + "required" ] + }, + "tools": { + "type": "array", + "items": { + "type": "object" + } } }, "required": [ - "name" + "mode", + "tools" ] } }, "required": [ "type", - "json_schema" + "allowed_tools" ] } ] } ] }, - "seed": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "If specified, the system will make a best effort to sample deterministically." - }, - "stop": { - "description": "Up to 4 sequences where the API will stop generating further tokens.", - "anyOf": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" + "tools": { + "type": "array", + "description": "A list of tools the model may call.", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ] + }, + "function": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to be called." + }, + "description": { + "type": "string", + "description": "A description of what the function does." + }, + "parameters": { + "type": "object", + "description": "The parameters the function accepts, described as a JSON Schema object." + }, + "strict": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Whether to enable strict schema adherence." + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "type", + "function" + ] }, - "minItems": 1, - "maxItems": 4 - } - ] - }, - "store": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "description": "Whether to store the output for model distillation / evals." - }, - "stream": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": false, - "description": "If true, partial message deltas will be sent as server-sent events." - }, - "stream_options": { - "anyOf": [ - { - "type": "object", - "properties": { - "include_usage": { - "type": "boolean" + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ] + }, + "custom": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "format": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "grammar" + ] + }, + "grammar": { + "type": "object", + "properties": { + "definition": { + "type": "string" + }, + "syntax": { + "type": "string", + "enum": [ + "lark", + "regex" + ] + } + }, + "required": [ + "definition", + "syntax" + ] + } + }, + "required": [ + "type", + "grammar" + ] + } + ] + } + }, + "required": [ + "name" + ] + } }, - "include_obfuscation": { - "type": "boolean" - } + "required": [ + "type", + "custom" + ] } - } - ] + ] + } }, - "temperature": { + "top_p": { "anyOf": [ { "type": "number", "minimum": 0, - "maximum": 2 + "maximum": 1 }, { "type": "null" } ], "default": 1, - "description": "Sampling temperature between 0 and 2." + "description": "Nucleus sampling: considers the results of the tokens with top_p probability mass." }, - "tool_choice": { + "user": { + "type": "string", + "description": "A unique identifier representing your end-user, for abuse monitoring." + }, + "web_search_options": { "anyOf": [ { - "description": "Controls which (if any) tool is called by the model. 'none' = no tools, 'auto' = model decides, 'required' = must call a tool.", - "oneOf": [ - { + "type": "object", + "description": "Options for the web search tool (when using built-in web search).", + "properties": { + "search_context_size": { "type": "string", "enum": [ - "none", - "auto", - "required" - ] + "low", + "medium", + "high" + ], + "default": "medium" }, - { + "user_location": { "type": "object", - "description": "Force a specific function tool.", "properties": { "type": { "type": "string", "enum": [ - "function" + "approximate" ] }, - "function": { + "approximate": { "type": "object", "properties": { - "name": { + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "region": { + "type": "string" + }, + "timezone": { "type": "string" } - }, - "required": [ - "name" - ] + } } }, "required": [ "type", - "function" + "approximate" ] - }, - { - "type": "object", - "description": "Force a specific custom tool.", - "properties": { - "type": { - "type": "string", - "enum": [ - "custom" - ] - }, - "custom": { - "type": "object", - "properties": { - "name": { - "type": "string" + } + } + } + ] + }, + "function_call": { + "anyOf": [ + { + "type": "string", + "enum": [ + "none", + "auto" + ] + }, + { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + }, + "functions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to be called." + }, + "description": { + "type": "string", + "description": "A description of what the function does." + }, + "parameters": { + "type": "object", + "description": "The parameters the function accepts, described as a JSON Schema object." + }, + "strict": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": false, + "description": "Whether to enable strict schema adherence." + } + }, + "required": [ + "name" + ] + }, + "minItems": 1, + "maxItems": 128 + }, + "messages": { + "type": "array", + "description": "A list of messages comprising the conversation so far.", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "developer" + ] + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ] + }, + "text": { + "type": "string" + } + }, + "required": [ + "type", + "text" + ] } + } + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "role", + "content" + ] + }, + { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "system" + ] + }, + "content": { + "anyOf": [ + { + "type": "string" }, - "required": [ - "name" - ] - } + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ] + }, + "text": { + "type": "string" + } + }, + "required": [ + "type", + "text" + ] + } + } + ] }, - "required": [ - "type", - "custom" - ] + "name": { + "type": "string" + } }, - { - "type": "object", - "description": "Constrain to an allowed subset of tools.", - "properties": { - "type": { - "type": "string", - "enum": [ - "allowed_tools" - ] - }, - "allowed_tools": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "enum": [ - "auto", - "required" + "required": [ + "role", + "content" + ] + }, + { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "user" + ] + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text", + "image_url", + "video_url", + "input_audio", + "file" + ] + }, + "text": { + "type": "string" + }, + "image_url": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "detail": { + "type": "string", + "enum": [ + "auto", + "low", + "high" + ], + "default": "auto" + } + } + }, + "video_url": { + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + }, + "input_audio": { + "type": "object", + "properties": { + "data": { + "type": "string" + }, + "format": { + "type": "string", + "enum": [ + "wav", + "mp3" + ] + } + } + }, + "file": { + "type": "object", + "properties": { + "file_data": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "filename": { + "type": "string" + } + } + } + }, + "required": [ + "type" ] }, - "tools": { - "type": "array", - "items": { - "type": "object" - } - } - }, - "required": [ - "mode", - "tools" - ] - } + "minItems": 1 + } + ] }, - "required": [ - "type", - "allowed_tools" - ] - } - ] - } - ] - }, - "tools": { - "type": "array", - "description": "A list of tools the model may call.", - "items": { - "oneOf": [ + "name": { + "type": "string" + } + }, + "required": [ + "role", + "content" + ] + }, { "type": "object", "properties": { - "type": { + "role": { "type": "string", "enum": [ - "function" + "assistant" ] }, - "function": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the function to be called." + "content": { + "anyOf": [ + { + "type": "string" }, - "description": { - "type": "string", - "description": "A description of what the function does." + { + "type": "null" }, - "parameters": { - "type": "object", - "description": "The parameters the function accepts, described as a JSON Schema object." + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text", + "refusal" + ] + }, + "text": { + "type": "string" + }, + "refusal": { + "type": "string" + } + }, + "required": [ + "type" + ] + } + } + ] + }, + "refusal": { + "anyOf": [ + { + "type": "string" }, - "strict": { - "anyOf": [ - { - "type": "boolean" + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "audio": { + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + } + ] + }, + "tool_calls": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "function" + ] + }, + "function": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "arguments": { + "type": "string", + "description": "JSON-encoded arguments string." + } + }, + "required": [ + "name", + "arguments" + ] + } + }, + "required": [ + "id", + "type", + "function" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "custom" + ] + }, + "custom": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "input": { + "type": "string" + } + }, + "required": [ + "name", + "input" + ] + } + }, + "required": [ + "id", + "type", + "custom" + ] + } + ] + } + }, + "function_call": { + "anyOf": [ + { + "type": "object", + "properties": { + "name": { + "type": "string" }, - { - "type": "null" + "arguments": { + "type": "string" } - ], - "default": false, - "description": "Whether to enable strict schema adherence." + }, + "required": [ + "name", + "arguments" + ] } - }, - "required": [ - "name" ] } }, "required": [ - "type", - "function" + "role" ] }, { "type": "object", "properties": { - "type": { + "role": { "type": "string", "enum": [ - "custom" + "tool" ] }, - "custom": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { + "content": { + "anyOf": [ + { "type": "string" }, - "format": { - "oneOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "text" - ] - } + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ] }, - "required": [ - "type" - ] + "text": { + "type": "string" + } }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "grammar" - ] - }, - "grammar": { - "type": "object", - "properties": { - "definition": { - "type": "string" - }, - "syntax": { - "type": "string", - "enum": [ - "lark", - "regex" - ] - } - }, - "required": [ - "definition", - "syntax" - ] - } - }, - "required": [ - "type", - "grammar" - ] - } - ] + "required": [ + "type", + "text" + ] + } } - }, - "required": [ - "name" ] + }, + "tool_call_id": { + "type": "string" } }, "required": [ - "type", - "custom" + "role", + "content", + "tool_call_id" ] - } - ] - } - }, - "top_p": { - "anyOf": [ - { - "type": "number", - "minimum": 0, - "maximum": 1 - }, - { - "type": "null" - } - ], - "default": 1, - "description": "Nucleus sampling: considers the results of the tokens with top_p probability mass." - }, - "user": { - "type": "string", - "description": "A unique identifier representing your end-user, for abuse monitoring." - }, - "web_search_options": { - "anyOf": [ - { - "type": "object", - "description": "Options for the web search tool (when using built-in web search).", - "properties": { - "search_context_size": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ], - "default": "medium" - }, - "user_location": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "approximate" - ] - }, - "approximate": { - "type": "object", - "properties": { - "city": { - "type": "string" - }, - "country": { - "type": "string" - }, - "region": { - "type": "string" - }, - "timezone": { - "type": "string" - } - } - } - }, - "required": [ - "type", - "approximate" - ] - } - } - } - ] - }, - "function_call": { - "anyOf": [ - { - "type": "string", - "enum": [ - "none", - "auto" - ] - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ] - } - ] - }, - "functions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the function to be called." }, - "description": { - "type": "string", - "description": "A description of what the function does." - }, - "parameters": { + { "type": "object", - "description": "The parameters the function accepts, described as a JSON Schema object." - }, - "strict": { - "anyOf": [ - { - "type": "boolean" + "properties": { + "role": { + "type": "string", + "enum": [ + "function" + ] }, - { - "type": "null" + "content": { + "type": "string" + }, + "name": { + "type": "string" } - ], - "default": false, - "description": "Whether to enable strict schema adherence." + }, + "required": [ + "role", + "content", + "name" + ] } - }, - "required": [ - "name" ] }, - "minItems": 1, - "maxItems": 128 + "minItems": 1 } }, "required": [ From aaa9804d07ea6f96bd1c7e612892f5fe9abe9582 Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Tue, 22 Sep 2026 15:24:38 -0700 Subject: [PATCH 10/12] [Workers AI] Regenerate reasoning model schemas from Config API Gemma 4 and Kimi K2.7 Code have no reasoning effort levels, so their schemas no longer list reasoning_effort; Gemma's thinking toggle defaults to on. GLM-5.3 documents the minimal and xhigh aliases, and Nemotron's schema matches its production custom schema. --- .../workers-ai-models/gemma-4-26b-a4b-it.json | 87 ++----------------- src/content/workers-ai-models/glm-5.3.json | 10 ++- .../workers-ai-models/gpt-oss-120b.json | 4 +- .../workers-ai-models/gpt-oss-20b.json | 4 +- .../workers-ai-models/kimi-k2.7-code.json | 60 ------------- .../nemotron-3-120b-a12b.json | 4 +- .../workers-ai-models/qwen3.8-27b.json | 4 +- 7 files changed, 19 insertions(+), 154 deletions(-) diff --git a/src/content/workers-ai-models/gemma-4-26b-a4b-it.json b/src/content/workers-ai-models/gemma-4-26b-a4b-it.json index 2454e5f4678..e1c7c66a87e 100644 --- a/src/content/workers-ai-models/gemma-4-26b-a4b-it.json +++ b/src/content/workers-ai-models/gemma-4-26b-a4b-it.json @@ -20,21 +20,8 @@ { "property_id": "reasoning_effort", "value": { - "supported_efforts": [ - "high", - "none" - ], - "default_effort": "none", - "normalizes_to": { - "minimal": "none", - "low": "high", - "medium": "high", - "max": "high", - "auto": "high", - "null": "none" - }, "mandatory": false, - "default_enabled": false + "default_enabled": true } }, { @@ -317,28 +304,12 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "high", - "none" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: minimal maps to none; low maps to high; medium maps to high; max maps to high; auto maps to high.", - "default": "none" - }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", - "default": false, + "default": true, "description": "Whether to enable reasoning for this model." }, "clear_thinking": { @@ -1568,28 +1539,12 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "high", - "none" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: minimal maps to none; low maps to high; medium maps to high; max maps to high; auto maps to high.", - "default": "none" - }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", - "default": false, + "default": true, "description": "Whether to enable reasoning for this model." }, "clear_thinking": { @@ -2389,28 +2344,12 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "high", - "none" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: minimal maps to none; low maps to high; medium maps to high; max maps to high; auto maps to high.", - "default": "none" - }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", - "default": false, + "default": true, "description": "Whether to enable reasoning for this model." }, "clear_thinking": { @@ -3640,28 +3579,12 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "high", - "none" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: high, none. Compatibility aliases: minimal maps to none; low maps to high; medium maps to high; max maps to high; auto maps to high.", - "default": "none" - }, "chat_template_kwargs": { "type": "object", "properties": { "enable_thinking": { "type": "boolean", - "default": false, + "default": true, "description": "Whether to enable reasoning for this model." }, "clear_thinking": { diff --git a/src/content/workers-ai-models/glm-5.3.json b/src/content/workers-ai-models/glm-5.3.json index b12cbe24f14..cfc4e6f2bc5 100644 --- a/src/content/workers-ai-models/glm-5.3.json +++ b/src/content/workers-ai-models/glm-5.3.json @@ -28,7 +28,9 @@ "default_effort": "max", "normalizes_to": { "none": "max", + "minimal": "max", "medium": "max", + "xhigh": "max", "null": "max" }, "mandatory": true, @@ -322,7 +324,7 @@ "type": "null" } ], - "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; medium maps to max.", + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; minimal maps to max; medium maps to max; xhigh maps to max.", "default": "max" }, "chat_template_kwargs": { @@ -1573,7 +1575,7 @@ "type": "null" } ], - "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; medium maps to max.", + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; minimal maps to max; medium maps to max; xhigh maps to max.", "default": "max" }, "chat_template_kwargs": { @@ -2394,7 +2396,7 @@ "type": "null" } ], - "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; medium maps to max.", + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; minimal maps to max; medium maps to max; xhigh maps to max.", "default": "max" }, "chat_template_kwargs": { @@ -3645,7 +3647,7 @@ "type": "null" } ], - "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; medium maps to max.", + "description": "Reasoning effort. Supported levels: max, high, low. Reasoning cannot be disabled. Compatibility aliases: none maps to max; minimal maps to max; medium maps to max; xhigh maps to max.", "default": "max" }, "chat_template_kwargs": { diff --git a/src/content/workers-ai-models/gpt-oss-120b.json b/src/content/workers-ai-models/gpt-oss-120b.json index fabf4ffff61..69c90e34505 100644 --- a/src/content/workers-ai-models/gpt-oss-120b.json +++ b/src/content/workers-ai-models/gpt-oss-120b.json @@ -36,9 +36,9 @@ "property_id": "reasoning_effort", "value": { "supported_efforts": [ - "high", + "low", "medium", - "low" + "high" ], "default_effort": "medium", "mandatory": true, diff --git a/src/content/workers-ai-models/gpt-oss-20b.json b/src/content/workers-ai-models/gpt-oss-20b.json index f053df1e47a..52fc9b4b2e7 100644 --- a/src/content/workers-ai-models/gpt-oss-20b.json +++ b/src/content/workers-ai-models/gpt-oss-20b.json @@ -36,9 +36,9 @@ "property_id": "reasoning_effort", "value": { "supported_efforts": [ - "high", + "low", "medium", - "low" + "high" ], "default_effort": "medium", "mandatory": true, diff --git a/src/content/workers-ai-models/kimi-k2.7-code.json b/src/content/workers-ai-models/kimi-k2.7-code.json index c1c6c38fbfb..b21ddd467ca 100644 --- a/src/content/workers-ai-models/kimi-k2.7-code.json +++ b/src/content/workers-ai-models/kimi-k2.7-code.json @@ -305,21 +305,6 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "high" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: high. Reasoning cannot be disabled. Compatibility aliases: none maps to high; low maps to high; medium maps to high; max maps to high.", - "default": "high" - }, "chat_template_kwargs": { "type": "object", "properties": { @@ -1554,21 +1539,6 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "high" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: high. Reasoning cannot be disabled. Compatibility aliases: none maps to high; low maps to high; medium maps to high; max maps to high.", - "default": "high" - }, "chat_template_kwargs": { "type": "object", "properties": { @@ -2373,21 +2343,6 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "high" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: high. Reasoning cannot be disabled. Compatibility aliases: none maps to high; low maps to high; medium maps to high; max maps to high.", - "default": "high" - }, "chat_template_kwargs": { "type": "object", "properties": { @@ -3622,21 +3577,6 @@ "default": 0, "description": "Penalizes new tokens based on whether they appear in the text so far." }, - "reasoning_effort": { - "anyOf": [ - { - "type": "string", - "enum": [ - "high" - ] - }, - { - "type": "null" - } - ], - "description": "Reasoning effort. Supported levels: high. Reasoning cannot be disabled. Compatibility aliases: none maps to high; low maps to high; medium maps to high; max maps to high.", - "default": "high" - }, "chat_template_kwargs": { "type": "object", "properties": { diff --git a/src/content/workers-ai-models/nemotron-3-120b-a12b.json b/src/content/workers-ai-models/nemotron-3-120b-a12b.json index 8f4e2775f95..f8a48ef66f9 100644 --- a/src/content/workers-ai-models/nemotron-3-120b-a12b.json +++ b/src/content/workers-ai-models/nemotron-3-120b-a12b.json @@ -295,7 +295,7 @@ "force_nonempty_content": { "type": "boolean", "default": false, - "description": "For coding agent use, Nvidia suggests setting force_nonempty_content=true" + "description": "For coding agents, force non-empty assistant content." } } }, @@ -1092,7 +1092,7 @@ "force_nonempty_content": { "type": "boolean", "default": false, - "description": "For coding agent use, Nvidia suggests setting force_nonempty_content=true" + "description": "For coding agents, force non-empty assistant content." } } }, diff --git a/src/content/workers-ai-models/qwen3.8-27b.json b/src/content/workers-ai-models/qwen3.8-27b.json index 9c62e8be3b2..2083f0db086 100644 --- a/src/content/workers-ai-models/qwen3.8-27b.json +++ b/src/content/workers-ai-models/qwen3.8-27b.json @@ -21,9 +21,9 @@ "property_id": "reasoning_effort", "value": { "supported_efforts": [ - "xhigh", + "low", "medium", - "low" + "xhigh" ], "default_effort": "xhigh", "normalizes_to": { From 27bccceedbdac78facdd4cc476491d662fcafb5b Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Tue, 22 Sep 2026 15:32:03 -0700 Subject: [PATCH 11/12] [Workers AI] Show toggle-only reasoning as Yes Models whose reasoning can be turned on or off but has no effort levels now read like the legacy reasoning flag and custom-schema models. --- src/util/models/model-format.node.test.ts | 8 +++++++- src/util/models/model-format.ts | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/util/models/model-format.node.test.ts b/src/util/models/model-format.node.test.ts index 5d245404ab3..daaacf73310 100644 --- a/src/util/models/model-format.node.test.ts +++ b/src/util/models/model-format.node.test.ts @@ -78,7 +78,13 @@ describe("model display formatting", () => { { mandatory: false, default_enabled: true }, "false", ), - ).toBe("On by default"); + ).toBe("Yes"); + expect( + formatModelReasoning( + { mandatory: false, default_enabled: false }, + "false", + ), + ).toBe("Yes"); }); it("formats supported pricing values and omits nested metadata", () => { diff --git a/src/util/models/model-format.ts b/src/util/models/model-format.ts index 33353fbc9d3..37f7848066a 100644 --- a/src/util/models/model-format.ts +++ b/src/util/models/model-format.ts @@ -74,8 +74,9 @@ export function formatModelReasoning( if (metadata.mandatory === true) { return "Always on"; } + // Toggle-only reasoning reads like the legacy boolean flag. if (typeof metadata.default_enabled === "boolean") { - return metadata.default_enabled ? "On by default" : "Off by default"; + return "Yes"; } } From 22ff226d12e73cffe1952d743d061f7cafd2cf1c Mon Sep 17 00:00:00 2001 From: Kastan Day Date: Wed, 23 Sep 2026 15:15:09 -0700 Subject: [PATCH 12/12] [Workers AI] Update Nemotron force_nonempty_content description Match the current production Config API schema wording. --- src/content/workers-ai-models/nemotron-3-120b-a12b.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/workers-ai-models/nemotron-3-120b-a12b.json b/src/content/workers-ai-models/nemotron-3-120b-a12b.json index f8a48ef66f9..8f4e2775f95 100644 --- a/src/content/workers-ai-models/nemotron-3-120b-a12b.json +++ b/src/content/workers-ai-models/nemotron-3-120b-a12b.json @@ -295,7 +295,7 @@ "force_nonempty_content": { "type": "boolean", "default": false, - "description": "For coding agents, force non-empty assistant content." + "description": "For coding agent use, Nvidia suggests setting force_nonempty_content=true" } } }, @@ -1092,7 +1092,7 @@ "force_nonempty_content": { "type": "boolean", "default": false, - "description": "For coding agents, force non-empty assistant content." + "description": "For coding agent use, Nvidia suggests setting force_nonempty_content=true" } } },