From 2bb2e1d3e2fc14a5876a8c2f1def91d0a24a2086 Mon Sep 17 00:00:00 2001 From: w3irdrobot Date: Thu, 19 Nov 2026 15:54:38 +0000 Subject: [PATCH] Agent: name each ACP reasoning effort by id and label too The `models` extension listed a model's reasoning levels as `{"value": ...}` entries. Paseo's parser requires `id` and `label` on each entry, so it dropped every model's list and showed the startup model's levels for all of them. A level picked there for a model that does not accept it was saved, and the session could not be resumed afterwards (getpaseo/paseo#10242). Each entry now carries the level as `id`, `value` and `label`, the same name the `thought_level` option shows. Co-Authored-By: Claude Fable 5.2 --- apps/maple-agent/crates/maple-agent/src/acp/mod.rs | 11 ++++++++++- apps/maple-agent/crates/maple-agent/src/acp/tests.rs | 5 +++++ apps/maple-agent/docs/local-host.md | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) 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.