feat(#2220): add low and max effort levels
claude --effort now accepts low, medium, high, xhigh, max. Expand EFFORT_LEVELS from 3 to 5, update NixOS enum + description, and fix the stale doc comment in web_ui.rs. Closes #2220
This commit is contained in:
parent
c6e97ef600
commit
742f4ef916
3 changed files with 10 additions and 8 deletions
|
|
@ -583,7 +583,7 @@ pub const DEFAULT_EFFORT: &str = "medium";
|
||||||
|
|
||||||
/// Valid claude `--effort` levels, ascending. The operator picker is
|
/// Valid claude `--effort` levels, ascending. The operator picker is
|
||||||
/// constrained to these; [`is_valid_effort`] guards the persist path.
|
/// constrained to these; [`is_valid_effort`] guards the persist path.
|
||||||
pub const EFFORT_LEVELS: [&str; 3] = ["medium", "high", "xhigh"];
|
pub const EFFORT_LEVELS: [&str; 5] = ["low", "medium", "high", "xhigh", "max"];
|
||||||
|
|
||||||
/// True iff `level` is one of [`EFFORT_LEVELS`].
|
/// True iff `level` is one of [`EFFORT_LEVELS`].
|
||||||
#[must_use]
|
#[must_use]
|
||||||
|
|
|
||||||
|
|
@ -461,7 +461,7 @@ struct StateSnapshot {
|
||||||
/// runtime via `POST /api/effort`; applies on the next session.
|
/// runtime via `POST /api/effort`; applies on the next session.
|
||||||
effort: String,
|
effort: String,
|
||||||
/// Selectable effort levels for the picker, ascending. Fixed set
|
/// Selectable effort levels for the picker, ascending. Fixed set
|
||||||
/// (`medium`, `high`, `xhigh`) — sourced from
|
/// (`low`, `medium`, `high`, `xhigh`, `max`) — sourced from
|
||||||
/// [`crate::events::EFFORT_LEVELS`], not operator-configurable like
|
/// [`crate::events::EFFORT_LEVELS`], not operator-configurable like
|
||||||
/// `available_models`. The frontend renders one button per entry.
|
/// `available_models`. The frontend renders one button per entry.
|
||||||
available_efforts: Vec<String>,
|
available_efforts: Vec<String>,
|
||||||
|
|
|
||||||
|
|
@ -219,9 +219,11 @@ in
|
||||||
|
|
||||||
options.hyperhive.effortLevel = lib.mkOption {
|
options.hyperhive.effortLevel = lib.mkOption {
|
||||||
type = lib.types.enum [
|
type = lib.types.enum [
|
||||||
|
"low"
|
||||||
"medium"
|
"medium"
|
||||||
"high"
|
"high"
|
||||||
"xhigh"
|
"xhigh"
|
||||||
|
"max"
|
||||||
];
|
];
|
||||||
default = "medium";
|
default = "medium";
|
||||||
example = "high";
|
example = "high";
|
||||||
|
|
@ -231,12 +233,12 @@ in
|
||||||
effort as operator-override-file → this env → built-in `"medium"`,
|
effort as operator-override-file → this env → built-in `"medium"`,
|
||||||
and passes the result to `claude --effort` at turn launch.
|
and passes the result to `claude --effort` at turn launch.
|
||||||
|
|
||||||
`"medium"` (the default) keeps token spend low and works well with
|
Ascending scale: `"low"` (minimal thinking budget), `"medium"`
|
||||||
the harness across families. `"high"` matches the current platform
|
(default — balanced), `"high"` (platform default), `"xhigh"`
|
||||||
default; `"xhigh"` is recommended for coding / high-autonomy work on
|
(recommended for autonomous coding on capable models), `"max"`
|
||||||
capable models (Opus 4.8+) at higher token cost. The operator can
|
(maximum thinking budget, highest cost). The operator can override
|
||||||
override at runtime per-agent via the web UI (applied on the next
|
at runtime per-agent via the web UI (applied on the next session);
|
||||||
session); any rebuild that changes this option resets that override.
|
any rebuild that changes this option resets that override.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue