Thinking Level
このコンテンツはまだ日本語訳がありません。
The thinking_level setting is a provider-scoped preference (auto, none, low, medium, high) configured in /config > Models > Text Samplers & Parameters or /personal config. It translates abstract reasoning effort into provider-specific request parameters at runtime, leaving providers without request-side controls unaffected.
Stored in saved_provider_configs.thinking_level and user_saved_provider_configs.thinking_level, the setting defaults to auto and restores automatically when switching active providers.
Shared semantics and overrides
Section titled “Shared semantics and overrides”TomoriBot interprets thinking levels before converting them to vendor fields:
| Level | Intended behavior |
|---|---|
auto | Follows the provider or model default behavior. |
none | Disables thinking if supported; otherwise selects the provider’s lowest safe setting. |
low | Requests light reasoning effort. |
medium | Requests balanced reasoning effort. |
high | Requests maximum available reasoning effort. |
Dynamic request overrides
Section titled “Dynamic request overrides”When a turn sets forceReason = true (such as invoking /respond with reasoning enabled), TomoriBot upgrades an effective level of auto or none to high for that individual generation request. The stored configuration row remains unmodified.
Numeric budget defaults
Section titled “Numeric budget defaults”For providers accepting numeric token budgets rather than named effort strings, TomoriBot maps non-empty levels using defaults from src/utils/provider/thinkingControl.ts:
low: 1,024 tokens (DEFAULT_LOW_BUDGET_TOKENS)medium: 4,096 tokens (DEFAULT_MEDIUM_BUDGET_TOKENS)high: 8,192 tokens (DEFAULT_HIGH_BUDGET_TOKENS)
Provider mappings and runtime constraints
Section titled “Provider mappings and runtime constraints”Google / Vertex
Section titled “Google / Vertex”Gemini behavior branches by model family:
- Gemini 2.5: Maps to numeric
thinkingBudget.autosends-1.nonesends0for Flash models and clamps to128for Pro models (which cannot disable thinking). Flash-Lite clamps upward to512. - Gemini 3 / 3.1: Maps to enum
thinkingLevel(MINIMAL,LOW,MEDIUM,HIGH).autoomits the configuration.noneandminimalmap toMINIMALonly for Flash releases known to accept it (an allow-list inthinkingControl.ts) and toLOWeverywhere else, because Pro models and Gemini 3.7 Flash onward rejectMINIMALwhile every Gemini 3 model acceptsLOW. - Assistant prefill interaction: Gemini suppresses internal thought tags when continuing assistant prefills, emitting reasoning tokens directly into visible response text. The prefill resolver (
resolvePrefillBlockerinsrc/utils/chat/assistantPrefill.ts) permits server prefills on Gemini only when thinking resolves tothinkingBudget: 0orthinkingLevel: MINIMAL.
Anthropic
Section titled “Anthropic”Claude models listed in the profile table in thinkingControl.ts map to adaptive thinking. Each family rejects another family’s off switch with HTTP 400, so an unlisted model receives no thinking fields until its profile is added:
auto:thinking: { type: "adaptive" }low/medium/high:thinking: { type: "adaptive" }paired withoutput_config: { effort }none:thinking: { type: "disabled" }on most models. Sonnet 5.5 uses{ type: "between_tools" }instead, and Opus 5.5 and Fable cannot stop thinking, so they get adaptive thinking ateffort: "low".temperatureandtop_pare omitted whenever thinking is on. Opus 4.7 and later, Sonnet 5 and later, and Haiku 5.5 reject them in every mode, so those models never receive them.
OpenRouter
Section titled “OpenRouter”Maps directly to OpenRouter’s reasoning effort parameter:
auto: Omitsreasoning.none:reasoning: { effort: "none" }.low/medium/high:reasoning: { effort }.
DeepSeek
Section titled “DeepSeek”- Thinking toggle: V4 models (
deepseek-flashand its aliased codenames,deepseek-v4-pro) think at high effort when the switch is omitted, soautokeeps that default andnonesendsthinking: { type: "disabled" }.low,medium, andhighsendthinking: { type: "enabled" }with a matchingreasoning_effort(DeepSeek foldsmediumintohigh). The retireddeepseek-chatanddeepseek-reasonercodenames are sent asdeepseek-flashand follow the same mapping. - Tool replay constraint: When thinking is enabled, DeepSeek returns HTTP 400 if a replayed assistant tool-call turn omits
reasoning_content. TomoriBot enforces the presence of this key (requiresReasoningContentReplay), supplying an empty string fallback ("") when no reasoning was captured. - Degradation ladder protection: Parameter degradation lists
thinkinginmandatoryBodyKeysfor DeepSeek, preventing the adapter from dropping thinking while retaining tools (which would produce tool responses that cannot be replayed).
Z.ai / Z.ai Coding
Section titled “Z.ai / Z.ai Coding”Maps to Z.ai’s thinking flag:
auto: Omitsthinking.none:thinking: { type: "disabled" }.low/medium/high:thinking: { type: "enabled" }.- Temperature and penalty parameters are omitted when thinking is active.
Custom endpoints
Section titled “Custom endpoints”- Ollama: Automatically detected by URL or port
11434, mapping toreasoning_effort("none","low","medium","high"). - Other local servers (vLLM, llama.cpp, KoboldCPP): Do not receive speculative request fields. Thinking on these engines is managed via startup arguments or chat template flags to avoid request validation errors.
NVIDIA NIM
Section titled “NVIDIA NIM”NIM serves diverse model families behind one interface. Because different architectures read different parameters, non-auto levels send multi-switch payloads:
chat_template_kwargs: { enable_thinking: boolean, thinking: boolean }reasoning_effort: "low" | "medium" | "high"nonesendsreasoning_effort: "low"rather than"none"because NIM rejects"none"with HTTP 400 on gpt-oss and Llama.
NovelAI
Section titled “NovelAI”The active profile sets the default: GLM 4.6 enables thinking for auto, while Xialong disables it.
none disables thinking on both; low, medium, and high enable it without distinct effort
budgets. The per-request forceReason override also applies.
GLM represents disabled thinking with /nothink and enabled thinking with <think></think> in its
chat template. Xialong appends /nothink to user turns and closes its assistant thinking block when
thinking is disabled; when enabled, it opens <think> for generation. Kayra and Erato use story
templates and ignore the saved thinking level. No NovelAI text model calls tools.
Response parsing and privacy
Section titled “Response parsing and privacy”- Response parsing: For models outputting thinking tokens (such as Gemma 4 on KoboldCPP),
GemmaThinkingParserstrips thought blocks fromdelta.contentand routes them to thoughts before tool parsing runs. - Thought log suppression: Thought logs are suppressed in channels governed by channel rules.
Source pointers
Section titled “Source pointers”src/constants/thinkingLevels.ts: Thinking level values and localization keys.src/utils/provider/thinkingControl.ts: Provider mapping implementations (buildGoogleThinkingConfig,buildAnthropicThinkingRequest).src/utils/chat/assistantPrefill.ts: Assistant prefill gating against thinking states (resolvePrefillBlocker).src/providers/deepseek/deepseekStreamAdapter.ts: replay policy and mandatory thinking field.src/providers/openaiCompatible/openaiCompatibleMessageBuilder.ts:reasoning_contenthistory replay.