The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(agent): defer LM Studio title upgrades
ehz0ahc2dfb29af5ed
diff --git a/agent/title_generator.py b/agent/title_generator.pyindex a0cfa9a96b0..a41701974b2 100644--- a/agent/title_generator.py+++ b/agent/title_generator.py@@ -190,7 +190,7 @@ def title_upgrade_must_wait_for_turn(main_runtime: Optional[dict]) -> bool:Hosted providers multiplex requests independently and keep the turn-start timing."""provider = str((main_runtime or {}).get("provider") or "").strip().lower()- if provider != "custom" and not provider.startswith("custom:"):+ if provider not in {"custom", "lmstudio"} and not provider.startswith("custom:"):return Falsetry:cfg = _title_config()diff --git a/tests/agent/test_title_generator.py b/tests/agent/test_title_generator.pyindex b0e26d6b096..dd415d35696 100644--- a/tests/agent/test_title_generator.py+++ b/tests/agent/test_title_generator.py@@ -392,13 +392,14 @@ class TestMaybeAutoTitle:[({"provider": "custom", "base_url": "http://127.0.0.1:8080/v1"}, {}, True),({"provider": "custom:gptoss-local", "base_url": "http://127.0.0.1:8080/v1"}, {}, True),+ ({"provider": "lmstudio", "base_url": "http://127.0.0.1:1234/v1"}, {}, True),({"provider": "custom", "base_url": "http://127.0.0.1:8080/v1"}, {"base_url": "http://127.0.0.1:8080/v1/"}, True),({"provider": "custom", "base_url": "http://127.0.0.1:8080/v1"}, {"provider": "openrouter"}, False),({"provider": "custom", "base_url": "http://127.0.0.1:8080/v1"}, {"base_url": "http://10.0.0.2:8080/v1"}, False),({"provider": "openrouter", "base_url": "https://openrouter.ai/api/v1"}, {}, False),],)- def test_title_call_waits_for_the_turn_when_it_shares_a_custom_endpoint(self, main_runtime, title_cfg, deferred):+ def test_title_call_waits_for_the_turn_when_it_shares_a_self_hosted_endpoint(self, main_runtime, title_cfg, deferred):"""#117296: a self-hosted server serving the main turn and the concurrent json_schema title requestcan decode the title into the main reply. The upgrade must not go on the wire until the caller startsit after the turn; every other route keeps the turn-start timing."""