Ver código fonte

docs: DSV4.1 reasoning_effort contract — low/high/xhigh/max/none or int 1-100 (JSON number)

verified via /tokenize+/detokenize: low=25 high=50 xhigh=75 max=100,
integers verbatim, 'none' drops the effort line, invalid values 400 with
a spec message; behavioral: low 180 vs max 252 reasoning tokens. Recipe
default 'max'=100 confirmed correct.
Alexander Korolev 1 mês atrás
pai
commit
59c79ebe43
1 arquivos alterados com 24 adições e 0 exclusões
  1. 24 0
      history/night-shifts/2026-09-11.md

+ 24 - 0
history/night-shifts/2026-09-11.md

@@ -202,3 +202,27 @@ vs the 1M run (1,090/36.1/1,876 at d0 c1): prefill +27%, decode +10% —
   (Aiden's numbers).
 - Aiden: operator published the request for production-1.2 / the 23-file
   DCP2 set; hub check confirmed only production-1.0 is public.
+
+## reasoning_effort contract (operator question, verified on the live API)
+
+The model's chat template is the DeepSeek "harmony" format: it renders a
+system line `Reasoning Effort: N (range 1-100, the higher the value, the
+more thorough the reasoning)` before the user message. Contract (verified
+via /tokenize + /detokenize, and the template's own 400 message):
+
+- `low` → 25, `high` → 50, `xhigh` → 75, `max` → 100 (string aliases)
+- `none` → no effort line at all
+- any JSON **integer** 1–100 → the number verbatim (strings "50" are
+  rejected: must be a JSON number)
+- anything else (`medium`, `min`, `off`, `minimal`, 101, -5, 1.5, "50")
+  → HTTP 400: "DeepSeek V4.1 reasoning_effort must be low, high, xhigh,
+  max, or an integer within [1, 100] in chat_template_kwargs"
+
+Why the operator's curl "didn't look like it worked": `low` vs default
+renders identically except one number (25 vs 100) — same token count.
+Behavioral check (medium sheep problem): effort low = 180 reasoning
+tokens, max = 252, both answer correctly — the knob is live.
+
+Our recipe default `{"thinking": true, "reasoning_effort": "max"}` = 100 —
+exactly as intended, no change. Gateway note: forward low/high/xhigh/max
+or integers; `medium` is not a valid alias on this model.