{"record":{"id":"27615eea525eab95","repo":"microsoft/autogen","slug":"strict-mode-is-enabled-but-additional-argument-is","errorCode":null,"errorMessage":"Strict mode is enabled but additional argument is also enabled. This is not allowed in strict mode.","messagePattern":"Strict mode is enabled but additional argument is also enabled\\. This is not allowed in strict mode\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-core/src/autogen_core/tools/_base.py","lineNumber":138,"sourceCode":"            del model_schema[\"$defs\"]\n\n        parameters = ParametersSchema(\n            type=\"object\",\n            properties=model_schema[\"properties\"],\n            required=model_schema.get(\"required\", []),\n            additionalProperties=model_schema.get(\"additionalProperties\", False),\n        )\n\n        # If strict is enabled, the tool schema should list all properties as required.\n        assert \"required\" in parameters\n        if self._strict and set(parameters[\"required\"]) != set(parameters[\"properties\"].keys()):\n            raise ValueError(\n                \"Strict mode is enabled, but not all input arguments are marked as required. Default arguments are not allowed in strict mode.\"\n            )\n\n        assert \"additionalProperties\" in parameters\n        if self._strict and parameters[\"additionalProperties\"]:\n            raise ValueError(\n                \"Strict mode is enabled but additional argument is also enabled. This is not allowed in strict mode.\"\n            )\n\n        tool_schema = ToolSchema(\n            name=self._name,\n            description=self._description,\n            parameters=parameters,\n            strict=self._strict,\n        )\n        return tool_schema\n\n    @property\n    def name(self) -> str:\n        return self._name\n\n    @property\n    def description(self) -> str:\n        return self._description","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-core/src/autogen_core/tools/_base.py#L120-L156","documentation":"Error \"Strict mode is enabled but additional argument is also enabled. This is not allowed in strict mode.\" thrown in microsoft/autogen.","triggerScenarios":"Thrown at python/packages/autogen-core/src/autogen_core/tools/_base.py:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Disable additionalProperties when strict mode is on"],"exampleFix":"Set strict mode without additional argument allowance","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-15T22:17:37.221Z"}