{"record":{"id":"db085acc480b692f","repo":"microsoft/autogen","slug":"component-config-schema-not-defined","errorCode":null,"errorMessage":"component_config_schema not defined","messagePattern":"component_config_schema not defined","errorType":"exception","errorClass":"AttributeError","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-core/src/autogen_core/_component_config.py","lineNumber":280,"sourceCode":"        ):\n            raise ValueError(\n                f\"Provider module '{module_path}' is not in a trusted namespace. \"\n                f\"Allowed namespaces by default: autogen_core, autogen_agentchat, autogen_ext, \"\n                f\"autogen_studio, autogenstudio. \"\n                f\"To allow additional namespaces, set the AUTOGEN_ALLOWED_PROVIDER_NAMESPACES \"\n                f\"environment variable to a comma-separated list \"\n                f\"(e.g. AUTOGEN_ALLOWED_PROVIDER_NAMESPACES=mycompany_agents,mypackage).\"\n            )\n\n        module = importlib.import_module(module_path)\n        component_class = module.__getattribute__(class_name)\n\n        if not is_component_class(component_class):\n            raise TypeError(\"Invalid component class\")\n\n        # We need to check the schema is valid\n        if not hasattr(component_class, \"component_config_schema\"):\n            raise AttributeError(\"component_config_schema not defined\")\n\n        if not hasattr(component_class, \"component_type\"):\n            raise AttributeError(\"component_type not defined\")\n\n        loaded_config_version = loaded_model.component_version or component_class.component_version\n        if loaded_config_version < component_class.component_version:\n            try:\n                instance = component_class._from_config_past_version(loaded_model.config, loaded_config_version)  # type: ignore\n            except NotImplementedError as e:\n                raise NotImplementedError(\n                    f\"Tried to load component {component_class} which is on version {component_class.component_version} with a config on version {loaded_config_version} but _from_config_past_version is not implemented\"\n                ) from e\n        else:\n            schema = component_class.component_config_schema  # type: ignore\n            validated_config = schema.model_validate(loaded_model.config)\n\n            # We're allowed to use the private method here\n            instance = component_class._from_config(validated_config)  # type: ignore","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-core/src/autogen_core/_component_config.py#L262-L298","documentation":"Error \"component_config_schema not defined\" thrown in microsoft/autogen.","triggerScenarios":"Thrown at python/packages/autogen-core/src/autogen_core/_component_config.py:280 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Define the Pydantic config schema on the component class"],"exampleFix":"Add component_config_schema = MyConfig to the class","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}