Describe the bug
Docs require strict=True for tools used with structured output / output_content_type. FunctionTool.dump_component / load_component omit strict from the config, so a tool saved with strict=True comes back as strict=False after an apparently lossless round-trip.
To Reproduce
from autogen_core.tools import FunctionTool
def add(a: int, b: int) -> int:
"""Add two integers."""
return a + b
tool = FunctionTool(add, description="Add two integers", strict=True)
assert tool.schema.get("strict") is True
cfg = tool.dump_component()
print(sorted(cfg.config.keys()))
# ['description', 'global_imports', 'has_cancellation_support', 'name', 'source_code']
# no 'strict'
restored = FunctionTool.load_component(cfg)
print(restored.schema.get("strict")) # False — BUG
Expected behavior
Config persists strict; restored tool has schema[\"strict\"] is True.
Actual behavior
strict is absent from config; restored tool defaults to False.
Environment
autogen-core 0.7.5
- Python 3.13
Additional context
Likely fix: include strict in the FunctionTool component config _to_config / _from_config path in autogen_core.tools.
Describe the bug
Docs require
strict=Truefor tools used with structured output /output_content_type.FunctionTool.dump_component/load_componentomitstrictfrom the config, so a tool saved withstrict=Truecomes back asstrict=Falseafter an apparently lossless round-trip.To Reproduce
Expected behavior
Config persists
strict; restored tool hasschema[\"strict\"] is True.Actual behavior
strictis absent from config; restored tool defaults toFalse.Environment
autogen-core0.7.5Additional context
Likely fix: include
strictin the FunctionTool component config_to_config/_from_configpath inautogen_core.tools.