Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

avoid strange hacky check for first param type by variable name prefix

Nick Sweetinge0a02faa7f81
diff --git a/browser_use/controller/registry/service.py b/browser_use/controller/registry/service.py
index 20af965a6..f16758951 100644
--- a/browser_use/controller/registry/service.py
+++ b/browser_use/controller/registry/service.py
@@ -143,10 +143,9 @@ class Registry(Generic[Context]):
and hasattr(parameters[0], 'annotation')
and parameters[0].annotation != parameters[0].empty
and issubclass(parameters[0].annotation, BaseModel)
- and
# Additional check: make sure the first parameter name suggests it's actually a pydantic model
- parameters[0].name in ['params', 'param', 'model']
- or parameters[0].name.endswith('_model')
+ # and parameters[0].name in ['params', 'param', 'model']
+ # or parameters[0].name.endswith('_model')
)
except (TypeError, AttributeError):
is_pydantic = False