diff --git a/apps/maple-agent/crates/maple-agent/src/acp/mod.rs b/apps/maple-agent/crates/maple-agent/src/acp/mod.rs index 9c2bf02a0..34881f7c7 100644 --- a/apps/maple-agent/crates/maple-agent/src/acp/mod.rs +++ b/apps/maple-agent/crates/maple-agent/src/acp/mod.rs @@ -795,7 +795,16 @@ impl AcpConnectionContext { "reasoningEfforts": state .levels .iter() - .map(|level| serde_json::json!({"value": level.as_str()})) + // `id` and `label` as well as `value`: clients + // differ on which key they read, and one that + // requires an absent key drops the whole list. + .map(|level| { + serde_json::json!({ + "id": level.as_str(), + "value": level.as_str(), + "label": level.as_str(), + }) + }) .collect::>(), "reasoningEffort": state.current.as_str(), }), diff --git a/apps/maple-agent/crates/maple-agent/src/acp/tests.rs b/apps/maple-agent/crates/maple-agent/src/acp/tests.rs index 2eb6397ed..2a2481506 100644 --- a/apps/maple-agent/crates/maple-agent/src/acp/tests.rs +++ b/apps/maple-agent/crates/maple-agent/src/acp/tests.rs @@ -1187,6 +1187,11 @@ async fn session_setup_reports_every_models_reasoning_levels() { let reasoner = meta_of(&created["models"], "reasoner"); assert_eq!(levels_of(&reasoner), ["off", "low", "high", "max"]); assert_eq!(reasoner["reasoningEffort"], "high"); + // Each level carries the same name under every key a client may read. + assert_eq!( + reasoner["reasoningEfforts"][0], + json!({"id": "off", "value": "off", "label": "off"}) + ); let always_on = meta_of(&created["models"], "always-on"); assert_eq!(levels_of(&always_on), ["low", "high"]); assert_eq!(always_on["reasoningEffort"], "low"); diff --git a/apps/maple-agent/docs/local-host.md b/apps/maple-agent/docs/local-host.md index c4f5fe842..d9fac228d 100644 --- a/apps/maple-agent/docs/local-host.md +++ b/apps/maple-agent/docs/local-host.md @@ -200,6 +200,7 @@ request on the same connection, opened with `mcp/connect` and closed with The `model` config option stays the selector; `models.availableModels[]` lists the same models with each one's reasoning levels in `_meta` (`reasoningEfforts` and `reasoningEffort`, or `supportsReasoningEffort: false`), +each effort naming its level as `id`, `value` and `label`, read from the state the `thought_level` option shows for that model. A client that probes one session thus learns every model's levels.