diff --git a/src/google/adk/runners.py b/src/google/adk/runners.py index 7e1a2e5d02..1773729719 100644 --- a/src/google/adk/runners.py +++ b/src/google/adk/runners.py @@ -209,6 +209,13 @@ def _validate_runner_params( Raises: ValueError: If parameters are invalid. """ + if plugins is not None: + warnings.warn( + 'The `plugins` argument is deprecated. Please use the `app` argument' + ' to provide plugins instead.', + DeprecationWarning, + ) + if app: if app_name: raise ValueError( @@ -234,12 +241,6 @@ def _validate_runner_params( context_cache_config = None resumability_config = None - if plugins: - warnings.warn( - 'The `plugins` argument is deprecated. Please use the `app` argument' - ' to provide plugins instead.', - DeprecationWarning, - ) return app_name, agent, context_cache_config, resumability_config, plugins def _infer_agent_origin(