From 2296fec2103a9bd9486717a242a94cb44f433b88 Mon Sep 17 00:00:00 2001 From: Alex Gierczyk Date: Tue, 12 May 2026 05:58:43 -0700 Subject: [PATCH] fix(auxiliary): treat aux .model: auto as sentinel, not a literal model id When auxiliary..model is set to "auto" in config.yaml, _resolve_task_provider_model() was treating it as a truthy model id and propagating the literal string "auto" to the wire. The provider then returned a 200 OK with an error-text body (e.g. "the model auto does not exist, run --model to pick a different model"), which downstream consumers such as ContextCompressor accept as the compressed summary -- silent corruption with no exception raised. The provider-side auto-resolution path (_resolve_auto via main_runtime fallback) is already wired up and does the right thing when cfg_model is None. The fix is to normalize the auto sentinel at the resolver layer: when cfg_model.lower() == "auto", drop it to None so the resolver can fall through to main_runtime / auto-detect. Reproduction (pre-fix): >>> from agent.auxiliary_client import _resolve_task_provider_model >>> _resolve_task_provider_model("compression") # with model: auto in config ("auto", "auto", None, None, None) Post-fix: >>> _resolve_task_provider_model("compression") ("auto", None, None, None, None) Verified end-to-end: ContextCompressor.compress now produces a real summary (~4KB of compaction text) instead of swallowing the bridge error string. Aux compression on auto/auto config no longer silently corrupts the conversation summary. --- agent/auxiliary_client.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/agent/auxiliary_client.py b/agent/auxiliary_client.py index c24cc972a..c4913fb7c 100644 --- a/agent/auxiliary_client.py +++ b/agent/auxiliary_client.py @@ -5257,6 +5257,16 @@ def _resolve_task_provider_model( cfg_api_key = str(task_config.get("api_key", "")).strip() or None cfg_api_mode = str(task_config.get("api_mode", "")).strip() or None + # 'auto' is a sentinel meaning "inherit from main runtime / auto-detect", not + # a literal model id. Without this, a config of `auxiliary..model: auto` + # propagates the literal string "auto" to the wire, where the provider returns + # a 200 OK with an error-text body (e.g. "the model 'auto' does not exist"), + # which downstream consumers like ContextCompressor accept as the task output. + # The provider-side 'auto' is handled in _resolve_auto() via main_runtime + # fallback, so dropping cfg_model to None here lets that path do its job. + if cfg_model and cfg_model.lower() == "auto": + cfg_model = None + resolved_model = model or cfg_model resolved_api_mode = cfg_api_mode