metrale_kernels/behavior_defaults.rs
1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3// 2026-09-25: `[behavior]` defaults that the build-time MODEL.toml parse and
4// `ModelBehavior::default()` both read.
5//
6// Owner: kernels crate.
7// Invariants:
8// - `lib.rs` compiles this file as a module and `build_parse_behavior.rs`
9// `include!`s it, so both sides use the same constants. `//!` cannot appear
10// at an `include!` site, which is why this header uses `//`.
11
12/// 2026-09-25: Default `[behavior].max_inter_tool_prose`: the cap on free-text
13/// tokens between tool calls on a tool request. 0 is reserved: the runtime
14/// resolver (`resolve_max_inter_tool_prose`) maps it to "guard disabled". A
15/// model can pin a tighter bound in its MODEL.toml, as
16/// `kernels/strix/qwen3.6-35b-a3b` does with 384.
17pub const DEFAULT_MAX_INTER_TOOL_PROSE: u32 = 3072;
18
19/// 2026-09-25: Default `[behavior].max_thinking_budget`: the anchor E of the
20/// `reasoning_effort` ladder and the budget of a thinking-on request that
21/// names none.
22pub const DEFAULT_MAX_THINKING_BUDGET: u32 = 256;
23
24/// 2026-09-25: Default `[behavior].effort_capped_at_ceiling`: whether the
25/// qualitative `reasoning_effort` levels are clamped at E
26/// (`max_thinking_budget`, or `--max-thinking-budget`).
27///
28/// `false` keeps high = 2E and xhigh = 4E, above the ceiling; at the default
29/// E that is 512 and 1024, which
30/// `effort_ladder_at_default_ceiling_matches_the_historical_absolutes` pins.
31/// `true` clamps every level at E, for a model whose MODEL.toml records that
32/// a larger budget scores worse (`kernels/gb10/qwen3.5-397b-a17b` sets it).
33/// The clamp applies only to the effort ladder; an explicit client token
34/// budget is not clamped.
35pub const DEFAULT_EFFORT_CAPPED_AT_CEILING: bool = false;