Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions src/components/models/ModelDetailPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -345,7 +349,7 @@ const headings: MarkdownHeading[] = [

<ModelFeatures model={model} />

{hasReasoningEffortGuidance && (
{hasGlm52ReasoningEffortGuidance && (
<Fragment>
<AnchorHeading
depth={2}
Expand Down Expand Up @@ -379,6 +383,57 @@ const headings: MarkdownHeading[] = [
</Fragment>
)}

{hasNemotronReasoningEffortGuidance && (
<Fragment>
<AnchorHeading
depth={2}
title="Reasoning effort"
slug="reasoning-effort"
/>
<p>
Nemotron supports normal reasoning, low reasoning, and reasoning turned
off. It does not currently select these modes from the top-level
<code>reasoning_effort</code> field. Pass the corresponding options
through <code>chat_template_kwargs</code> instead.
</p>
<p>
To use low reasoning, set both <code>enable_thinking</code> and
<code>low_effort</code>:
</p>
<Code
code={`response = client.chat.completions.create(
model="@cf/nvidia/nemotron-3-120b-a12b",
messages=[{"role": "user", "content": "What is the capital of Japan?"}],
max_tokens=16000,
temperature=1.0,
top_p=0.95,
extra_body={
"chat_template_kwargs": {
"enable_thinking": True,
"low_effort": True,
}
},
)`}
lang="python"
/>
<p>
The low-effort option appends <code>{`{reasoning effort: low}`}</code>{" "}
to the latest user message. To turn reasoning off, set
<code>enable_thinking</code> to <code>False</code>. For coding agents,
set
<code>force_nonempty_content</code> to <code>True</code> in the same
<code>chat_template_kwargs</code> object.
</p>
<p>
For more information, refer to{" "}
<a href="https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8#api-client">
NVIDIA's Nemotron API client example
</a>
.
</p>
</Fragment>
)}

{
/* Defensive dead branch (model not in slice): nova-3 transport pricing. */
model.name === "@cf/deepgram/nova-3" && (
Expand Down
29 changes: 25 additions & 4 deletions src/components/models/ModelFeatures.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 && (
Expand All @@ -54,7 +62,7 @@ const price = Array.isArray(properties.price)
<th />
</tr>
</thead>
<tbody>
<tbody data-row-stripes="off">
{properties.planned_deprecation_date && (
<tr>
<td>
Expand Down Expand Up @@ -127,10 +135,23 @@ const price = Array.isArray(properties.price)
<td>Yes</td>
</tr>
)}
{properties.reasoning && (
{reasoning && (
<tr>
<td>Reasoning</td>
<td>{properties.reasoning_effort ?? "Yes"}</td>
<td>
{Array.isArray(reasoning) ? (
<span class="flex flex-wrap gap-x-4 gap-y-1">
{reasoning.map((effort) => (
<span>
<code>{effort.value}</code>
{effort.isDefault && " (default)"}
</span>
))}
</span>
) : (
reasoning
)}
</td>
</tr>
)}
{properties.vision && (
Expand Down
62 changes: 45 additions & 17 deletions src/content/workers-ai-models/deepseek-v4-flash-0731.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -299,24 +319,26 @@
{
"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",
"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",
Expand Down Expand Up @@ -1546,24 +1568,26 @@
{
"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",
"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",
Expand Down Expand Up @@ -2363,24 +2387,26 @@
{
"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",
"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",
Expand Down Expand Up @@ -3610,24 +3636,26 @@
{
"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",
"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",
Expand Down Expand Up @@ -4678,4 +4706,4 @@
}
},
"deprecated": false
}
}
Loading
Loading