microsoft/autogen · error · ValueError
Strict mode is enabled, but not all input arguments are mark
Error message
Strict mode is enabled, but not all input arguments are marked as required. Default arguments are not allowed in strict mode.
What it means
Error "Strict mode is enabled, but not all input arguments are marked as required. Default arguments are not allowed in strict mode." thrown in microsoft/autogen.
Source
Thrown at python/packages/autogen-core/src/autogen_core/tools/_base.py:132
@property
def schema(self) -> ToolSchema:
model_schema: Dict[str, Any] = self._args_type.model_json_schema()
if "$defs" in model_schema:
model_schema = cast(Dict[str, Any], jsonref.replace_refs(obj=model_schema, proxies=False)) # type: ignore
del model_schema["$defs"]
parameters = ParametersSchema(
type="object",
properties=model_schema["properties"],
required=model_schema.get("required", []),
additionalProperties=model_schema.get("additionalProperties", False),
)
# If strict is enabled, the tool schema should list all properties as required.
assert "required" in parameters
if self._strict and set(parameters["required"]) != set(parameters["properties"].keys()):
raise ValueError(
"Strict mode is enabled, but not all input arguments are marked as required. Default arguments are not allowed in strict mode."
)
assert "additionalProperties" in parameters
if self._strict and parameters["additionalProperties"]:
raise ValueError(
"Strict mode is enabled but additional argument is also enabled. This is not allowed in strict mode."
)
tool_schema = ToolSchema(
name=self._name,
description=self._description,
parameters=parameters,
strict=self._strict,
)
return tool_schema
@propertyView on GitHub (pinned to 027ecf0a37)
Solutions
- Remove default values from parameters or disable strict mode
Example fix
Make all parameters required (no defaults) when strict=True
When it happens
Trigger: Thrown at python/packages/autogen-core/src/autogen_core/tools/_base.py:132 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/autogen@027ecf0a37 (2026-08-15).
Data as JSON: /api/errors/5845fda85c843146.
Report an issue: GitHub.