browser-use/browser-use · error · ValueError

Action '{func.__name__}' has **{param.name} which is not all

Error message

Action '{func.__name__}' has **{param.name} which is not allowed. Actions must have explicit positional parameters only.

What it means

Error "Action '{func.__name__}' has **{param.name} which is not allowed. Actions must have explicit positional parameters only." thrown in browser-use/browser-use.

Source

Thrown at browser_use/tools/registry/service.py:97

		param_model: type[BaseModel] | None = None,
	) -> tuple[Callable, type[BaseModel]]:
		"""
		Normalize action function to accept only kwargs.

		Returns:
			- Normalized function that accepts (*_, params: ParamModel, **special_params)
			- The param model to use for registration
		"""
		sig = signature(func)
		parameters = list(sig.parameters.values())
		special_param_types = self._get_special_param_types()
		special_param_names = set(special_param_types.keys())

		# Step 1: Validate no **kwargs in original function signature
		# if it needs default values it must use a dedicated param_model: BaseModel instead
		for param in parameters:
			if param.kind == Parameter.VAR_KEYWORD:
				raise ValueError(
					f"Action '{func.__name__}' has **{param.name} which is not allowed. "
					f'Actions must have explicit positional parameters only.'
				)

		# Step 2: Separate special and action parameters
		action_params = []
		special_params = []
		param_model_provided = param_model is not None

		for i, param in enumerate(parameters):
			# Check if this is a Type 1 pattern (first param is BaseModel)
			if i == 0 and param_model_provided and param.name not in special_param_names:
				# This is Type 1 pattern - skip the params argument
				continue

			if param.name in special_param_names:
				# Validate special parameter type
				expected_type = special_param_types.get(param.name)

View on GitHub (pinned to 6c73fced2f)

Solutions

  1. Remove **kwargs (variadic keyword params) from the action signature; declare explicit parameters.

When it happens

Trigger: A registered action function declares **kwargs (VAR_KEYWORD parameter).

Common situations: Writing @tools.action functions with **kwargs instead of explicit named parameters.


AI-assisted analysis of browser-use/browser-use@6c73fced2f (2026-08-14). Data as JSON: /api/errors/03219bf3f87024ab. Report an issue: GitHub.