From ad1251175418a038ea4828ea616ca63d47df1212 Mon Sep 17 00:00:00 2001 From: Vasco Schiavo <115561717+VascoSch92@users.noreply.github.com> Date: Thu, 18 Jun 2026 17:05:54 +0200 Subject: [PATCH] Fix _GatedLLM.completion override after _return_metrics removal The `_return_metrics` parameter was removed from LLM/TestLLM.completion in 2bedbd8f (removed_in 1.29.0, on this release branch), but tests/agent_server/test_goal_loop.py's _GatedLLM override (added in #3770) still declared it as a positional param and forwarded it to super().completion(), which pyright flagged as an incompatible override and a 5-positional call against the new 4-positional signature. Drop _return_metrics to match. --- tests/agent_server/test_goal_loop.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/agent_server/test_goal_loop.py b/tests/agent_server/test_goal_loop.py index ecc7dd00b7..0f5cdb4a18 100644 --- a/tests/agent_server/test_goal_loop.py +++ b/tests/agent_server/test_goal_loop.py @@ -43,7 +43,6 @@ def completion( self, messages, tools=None, - _return_metrics=False, add_security_risk_prediction=False, on_token=None, **kwargs, @@ -53,7 +52,6 @@ def completion( return super().completion( messages, tools, - _return_metrics, add_security_risk_prediction, on_token, **kwargs,