{"record":{"id":"da0bdacebcd4f6f4","repo":"mem0ai/mem0","slug":"extra-fields-not-allowed-join-extra-fields-da0bda","errorCode":null,"errorMessage":"Extra fields not allowed: {', '.join(extra_fields)}. Please input only the following fields: {', '.join(allowed_fields)}","messagePattern":"Extra fields not allowed: (.+?)\\. Please input only the following fields: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mem0/configs/vector_stores/weaviate.py","lineNumber":35,"sourceCode":"    @model_validator(mode=\"before\")\n    @classmethod\n    def check_connection_params(cls, values: Dict[str, Any]) -> Dict[str, Any]:\n        cluster_url = values.get(\"cluster_url\")\n\n        if not cluster_url:\n            raise ValueError(\"'cluster_url' must be provided.\")\n\n        return values\n\n    @model_validator(mode=\"before\")\n    @classmethod\n    def validate_extra_fields(cls, values: Dict[str, Any]) -> Dict[str, Any]:\n        allowed_fields = set(cls.model_fields.keys())\n        input_fields = set(values.keys())\n        extra_fields = input_fields - allowed_fields\n\n        if extra_fields:\n            raise ValueError(\n                f\"Extra fields not allowed: {', '.join(extra_fields)}. Please input only the following fields: {', '.join(allowed_fields)}\"\n            )\n\n        return values\n\n    model_config = ConfigDict(arbitrary_types_allowed=True)\n","sourceCodeStart":17,"sourceCodeEnd":42,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/configs/vector_stores/weaviate.py#L17-L42","documentation":"WeaviateConfig runs the standard closed-set extra-fields validator: any config key outside {collection_name, embedding_model_dims, cluster_url, auth_client_secret, additional_headers} raises this error, with the rejected and allowed key names embedded in the message. It runs after check_connection_params, so a missing cluster_url surfaces first.","triggerScenarios":"Passing keys like host, port, scheme, api_key, or timeout in the weaviate config dict; using the weaviate-client v3 constructor vocabulary (url, timeout_config) instead of this model's fields.","commonSituations":"Migrating code that built a weaviate_client.WeaviateClient directly and reusing its option names; assuming auth uses 'api_key' instead of 'auth_client_secret'; copying a config block from another provider.","solutions":["Map weaviate-client options to the model fields: API key goes to auth_client_secret, custom HTTP headers to additional_headers","Delete any key not in the allowed list printed by the error","Handle host/port by combining them into cluster_url='http://host:port'"],"exampleFix":"# before\nconfig = {\"cluster_url\": \"http://localhost:8080\", \"api_key\": \"my-key\"}\n\n# after\nconfig = {\"cluster_url\": \"http://localhost:8080\", \"auth_client_secret\": \"my-key\"}","handlingStrategy":"validation","validationCode":"from mem0.configs.vector_stores.weaviate import WeaviateConfig\nextra = set(cfg) - set(WeaviateConfig.model_fields)\nif extra:\n    raise ConfigError(f\"map/remove unknown weaviate keys: {sorted(extra)} (api_key -> auth_client_secret)\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Translate weaviate-client option names to this model's fields before passing config","Combine host/port into cluster_url rather than passing them separately"],"tags":["pydantic","weaviate","vector-store","config","validation"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}