refactor(config): drop unwired context per-model field
This commit is contained in:
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.8.25] - Unreleased
|
||||
|
||||
### Changed
|
||||
|
||||
- Removed the unwired `[context.per_model]` config field; existing configs that still contain it continue to load.
|
||||
|
||||
## [0.8.24] - 2026-05-09
|
||||
|
||||
A bugfix + refactor release picking up the backlog after the v0.8.23 security
|
||||
|
||||
+19
-17
@@ -710,9 +710,6 @@ pub struct ContextConfig {
|
||||
/// Model used for seam/briefing work. Default: "deepseek-v4-flash".
|
||||
#[serde(default)]
|
||||
pub seam_model: Option<String>,
|
||||
/// Per-model threshold overrides.
|
||||
#[serde(default)]
|
||||
pub per_model: Option<HashMap<String, PerModelContextConfig>>,
|
||||
}
|
||||
|
||||
/// Sub-agent model overrides. Keys in `models` can be role names (`worker`,
|
||||
@@ -740,19 +737,6 @@ pub struct SubagentsConfig {
|
||||
pub max_concurrent: Option<usize>,
|
||||
}
|
||||
|
||||
/// Per-model context tuning.
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct PerModelContextConfig {
|
||||
#[serde(default)]
|
||||
pub l1_threshold: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub l2_threshold: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub l3_threshold: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub cycle_threshold: Option<usize>,
|
||||
}
|
||||
|
||||
/// Resolved CLI configuration, including defaults and environment overrides.
|
||||
#[derive(Debug, Clone, Default, Deserialize)]
|
||||
pub struct Config {
|
||||
@@ -2478,7 +2462,6 @@ fn merge_config(base: Config, override_cfg: Config) -> Config {
|
||||
.cycle_threshold
|
||||
.or(base.context.cycle_threshold),
|
||||
seam_model: override_cfg.context.seam_model.or(base.context.seam_model),
|
||||
per_model: override_cfg.context.per_model.or(base.context.per_model),
|
||||
},
|
||||
subagents: override_cfg.subagents.or(base.subagents),
|
||||
strict_tool_mode: override_cfg.strict_tool_mode.or(base.strict_tool_mode),
|
||||
@@ -4200,6 +4183,25 @@ api_key = "old-openrouter-key"
|
||||
assert_eq!(merged.context.enabled, Some(true));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn removed_context_per_model_table_is_ignored_for_compatibility() -> Result<()> {
|
||||
let parsed: ConfigFile = toml::from_str(
|
||||
r#"
|
||||
[context]
|
||||
enabled = true
|
||||
|
||||
[context.per_model.deepseek-v4-pro]
|
||||
l1_threshold = 111
|
||||
l2_threshold = 222
|
||||
l3_threshold = 333
|
||||
cycle_threshold = 444
|
||||
"#,
|
||||
)?;
|
||||
|
||||
assert_eq!(parsed.base.context.enabled, Some(true));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn project_context_pack_defaults_on_and_can_be_disabled() {
|
||||
let mut config = Config::default();
|
||||
|
||||
Reference in New Issue
Block a user