Skip to content

docs(models): document the reasoning token budget - #201

Merged
sre-helmcode merged 3 commits into
mainfrom
docs/thinking-budget
Oct 19, 2026
Merged

sre-helmcode merged 3 commits into
mainfrom
docs/thinking-budget

Conversation

@sre-helmcode

Copy link
Copy Markdown
Contributor

What

New subsection under Controlling reasoning (en + es): thinking_token_budget / thinking_budget on qwen3.6, gemma4 and qwen3.8-flash (Chat Completions): the 1-32768 range, 0 = off, NaN lowers larger values to 32768, and use either a budget or reasoning_effort, not both.

Why

helmcode/nan-devops#895 (in prod since 2026-10-19) accepts both names and sends each model the one it reads. Before that, only thinking_token_budget was accepted and it did nothing on qwen3.8-flash.

Evidence (prod, synthetic key, nonce to bypass the cache)

  • qwen3.8-flash thinking_budget/thinking_token_budget 64: 64 reasoning tokens; none: 899.
  • 0: no reasoning on qwen3.8-flash and qwen3.6.
  • 9999999: 200 (clamped).
  • budget + reasoning_effort: on qwen3.6 the effort wins; on qwen3.8-flash the budget wins (and none + budget still reasons). Hence 'not both'.

Tests

npm run build OK; vitest run 2496/2496 (the docs reasoning test that forbids upstream provider names passes).

🤖 Generated with Claude Code

barckcode and others added 3 commits October 19, 2026 12:10
…thinking_token_budget)

Both names are accepted since nan-devops#895 and each model receives the
one it reads. Values and behaviour measured on prod 2026-10-19: 64 caps
reasoning at 64 tokens on qwen3.8-flash, 0 turns it off on qwen3.8-flash
and qwen3.6, values above 32768 are lowered on NaN, and combining a
budget with reasoning_effort behaves differently per model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ontract wording, Responses)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sre-helmcode
sre-helmcode merged commit e0e697e into main Oct 19, 2026
1 check passed
@barckcode
barckcode deleted the docs/thinking-budget branch October 19, 2026 12:46
barckcode added a commit that referenced this pull request Oct 19, 2026
Resolved into one text per surface:
- deepseek-v4-flash card (en + es): #200's wording (both ceilings,
  per-route signals, remedies) plus #202's non-streamed
  x-nan-truncated-in-reasoning header on the /chat/completions signal.
  #202's voseo phrasing and "raise the budget, or stream" are superseded.
- Controlling reasoning: #200's paragraph keeps #202's three-field rule
  and header (scoped to non-streamed Chat Completions, per nan-devops#901,
  which reads `choices`); #201's token-budget subsection is linked from
  the "effort is a hint" sentence.
- OpenAPI max_tokens: #200's text plus the header. max_output_tokens:
  #202 claimed finish_reason and the header on Responses; replaced by the
  Responses signal (status incomplete, incomplete_details) and the
  ceilings.
- Tests: union of both suites, adjusted to the final text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants