From 9a18a2de12163482e59866dc3f4ed12a21926159 Mon Sep 17 00:00:00 2001 From: Rod Boev Date: Thu, 9 Jul 2026 13:00:01 +0530 Subject: [PATCH] fix(agent): probe localhost via IPv4 for LM Studio detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remaining hunk of the PR-branch fixup commit: the LM Studio first-probe assertion now expects the IPv4-resolved URL (the code half — applying the rewrite to `normalized` before deriving lmstudio_url — was folded into the previous cherry-pick's conflict resolution). (cherry picked from commit 7d324b0e47444887fc615e1c428aa30c3dfcd2e8) --- tests/agent/test_model_metadata_local_ctx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/agent/test_model_metadata_local_ctx.py b/tests/agent/test_model_metadata_local_ctx.py index 879ca4bd2643..ccda0a943921 100644 --- a/tests/agent/test_model_metadata_local_ctx.py +++ b/tests/agent/test_model_metadata_local_ctx.py @@ -504,7 +504,7 @@ class TestDetectLocalServerTypeAuth: result = detect_local_server_type("http://localhost:1234/api/v1") assert result == "lm-studio" - assert client_mock.get.call_args_list[0].args[0] == "http://localhost:1234/api/v1/models" + assert client_mock.get.call_args_list[0].args[0] == "http://127.0.0.1:1234/api/v1/models" class TestDetectLocalServerTypeLocalhostIPv4: