diff --git a/weaviate/collections/classes/config.py b/weaviate/collections/classes/config.py index 8bad9617d..0464cffa0 100644 --- a/weaviate/collections/classes/config.py +++ b/weaviate/collections/classes/config.py @@ -1030,6 +1030,10 @@ def voyageai( Args: model: The model to use. Defaults to `None`, which uses the server-defined default """ + # Avoid passing model explicitly if default is None, for less attribute initialization + # (micro-optimization in CPython: avoids unnecessary kwarg dictionary creation) + if model is None: + return _RerankerVoyageAIConfig() return _RerankerVoyageAIConfig(model=model) @staticmethod