v1.21.0
Enhancements โจ
-
Tool & Model Improvements
- Add Tool to_code_prompt and to_tool_calling_prompt by @albertvillanova in https://github.com/huggingface/smolagents/pull/1599
- Improve function body extraction in tools by @HairlessVillager in https://github.com/huggingface/smolagents/pull/1627
- Support passing model_kwargs to TransformersModel by @albertvillanova in https://github.com/huggingface/smolagents/pull/1608
- Support dict messages as direct input to models by @albertvillanova in https://github.com/huggingface/smolagents/pull/1570
-
Executor Improvements
- Enhance
LocalPythonExecutorsecurity by blocking dunder calls by @nnfrog in https://github.com/huggingface/smolagents/pull/1551 - Fix
continuesemantics ofLocalPythonExecutorby @adaminsky in https://github.com/huggingface/smolagents/pull/1645 - Fix
GeneratorExpinLocalPythonExecutorto returnGeneratorinstead oflistby @albertvillanova in https://github.com/huggingface/smolagents/pull/1650
- Enhance
-
Gradio & UI
- Reset agent memory on GradioUI clear button by @albertvillanova in https://github.com/huggingface/smolagents/pull/1611
- Use
gr.Numberfor mapping integer and number type components inlaunch_gradio_demoby @karenwky in https://github.com/huggingface/smolagents/pull/1320
Bug Fixes ๐
- Fix: Prevent empty additional_args from being added to agent prompt by @jokokojote in https://github.com/huggingface/smolagents/pull/1566
- Fix SyntaxError in generated Gradio app due to 'class' attribute by @albertvillanova in https://github.com/huggingface/smolagents/pull/1615
- Fix serialization inconsistency in MultiStepAgent.to_dict/from_dict for managed_agents by @hazrmard in https://github.com/huggingface/smolagents/pull/1577
- Fix a kwargs error in LocalPythonExecutor by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1583
- Fix structured outputs by @MicrosoftJames in https://github.com/huggingface/smolagents/pull/1642
- Fix bug where
AmazonBedrockServerModelcrashes in thinking mode by @benoriol in https://github.com/huggingface/smolagents/pull/1632 - Fix: Remove duplicate line in
tool_calling_agentprompt by @yusuf-eren in https://github.com/huggingface/smolagents/pull/1636 - Fix:
RemotePythonExecutorshould not send variables if none exist by @thomasjpfan in https://github.com/huggingface/smolagents/pull/1605 - Disable parallel tool calls for final answer by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1539
Documentation ๐
- Improve Installation docs with uv option by @albertvillanova in https://github.com/huggingface/smolagents/pull/1550
- Fix and improve MCP server security warnings in docs by @albertvillanova in https://github.com/huggingface/smolagents/pull/1549
- DOC: Fix image link for docs (secure_code_execution.md) by @FacerAin in https://github.com/huggingface/smolagents/pull/1582
- Update title of page "What are agents" by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1546
- Enable multilingual docs by @albertvillanova in https://github.com/huggingface/smolagents/pull/1633
- ๐ [i18n-KO] Translated
index.mdto Korean by @FacerAin in https://github.com/huggingface/smolagents/pull/1581 - ๐ [i18n-KO] Translated
text_to_sql.mdto Korean by @nsbg in https://github.com/huggingface/smolagents/pull/1603
CI / Dependency Updates ๐งช
- Pin mcpadapt to support image/audio content by @albertvillanova in https://github.com/huggingface/smolagents/pull/1558
- Temporarily skip wrongly implemented tests by @albertvillanova in https://github.com/huggingface/smolagents/pull/1571
- CI hotfix: Pin mlx < 0.26.5 by @albertvillanova in https://github.com/huggingface/smolagents/pull/1586
- Support mlx-0.26.5 by @albertvillanova in https://github.com/huggingface/smolagents/pull/1589
- CI hotfix: Pin transformers < 4.54.0 by @albertvillanova in https://github.com/huggingface/smolagents/pull/1620
- Support transformers 4.54.0 by @albertvillanova in https://github.com/huggingface/smolagents/pull/1625
- Fix CI PytestUnknownMarkWarning: Unknown pytest.mark.timeout by @albertvillanova in https://github.com/huggingface/smolagents/pull/1630
- Fix CI quality: remove trailing whitespace by @albertvillanova in https://github.com/huggingface/smolagents/pull/1617
Deprecations & Cleanups ๐งน
- Replace deprecated ast.Num and ast.Str with ast.Constant in tool validation by @WilliamRabuel in https://github.com/huggingface/smolagents/pull/1594
- Remove deprecated
grammarparameter by @albertvillanova in https://github.com/huggingface/smolagents/pull/1651 - Remove deprecated token count attributes by @albertvillanova in https://github.com/huggingface/smolagents/pull/1652
- Remove deprecated agent
logsattribute by @albertvillanova in https://github.com/huggingface/smolagents/pull/1653 - Remove mention of deprecated
ManagedAgentfrom docs by @albertvillanova in https://github.com/huggingface/smolagents/pull/1655 - Remove deprecated default
ssetransport by @albertvillanova in https://github.com/huggingface/smolagents/pull/1656 - Replace duckduckgo_search with ddgs to address package rename warning by @WilliamRabuel in https://github.com/huggingface/smolagents/pull/1593
- Remove unused is_same_item function by @albertvillanova in https://github.com/huggingface/smolagents/pull/1631
- Remove unnecessary import by @rahul-1729 in https://github.com/huggingface/smolagents/pull/1639
- Simplify _is_package_available by @albertvillanova in https://github.com/huggingface/smolagents/pull/1641
Miscellaneous ๐ง
- Add support for Amazon Bedrock API Keys by @colesmcintosh in https://github.com/huggingface/smolagents/pull/1612
- Factorize create_agent_gradio_app_template function by @albertvillanova in https://github.com/huggingface/smolagents/pull/1616
- Fix: Allow passing integers for floats by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1623
- Fix Tool.forward to raise NotImplementedError instead of returning by @HairlessVillager in https://github.com/huggingface/smolagents/pull/1628
- Make validate_tool_arguments raise instead of returning error string by @albertvillanova in https://github.com/huggingface/smolagents/pull/1634
- Remove mention of python in additional args by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1584
- ToolCallingAgent: remove unnecessary addition to
model_outputby @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1622 - Minor fix in toolCallingAgentPrompt by @rahul-1729 in https://github.com/huggingface/smolagents/pull/1574
Maintenance ๐๏ธ
- Bump dev version: v1.21.0.dev0 by @albertvillanova in https://github.com/huggingface/smolagents/pull/1544
- Remove empty issue template by @albertvillanova in https://github.com/huggingface/smolagents/pull/1562
- Improve issue templates by @albertvillanova in https://github.com/huggingface/smolagents/pull/1563
- Add issue template for documentation improvements by @albertvillanova in https://github.com/huggingface/smolagents/pull/1564
- Add uv option to CONTRIBUTING by @albertvillanova in https://github.com/huggingface/smolagents/pull/1561
New Contributors
- @jokokojote made their first contribution in https://github.com/huggingface/smolagents/pull/1566
- @rahul-1729 made their first contribution in https://github.com/huggingface/smolagents/pull/1574
- @WilliamRabuel made their first contribution in https://github.com/huggingface/smolagents/pull/1594
- @FacerAin made their first contribution in https://github.com/huggingface/smolagents/pull/1582
- @thomasjpfan made their first contribution in https://github.com/huggingface/smolagents/pull/1605
- @hazrmard made their first contribution in https://github.com/huggingface/smolagents/pull/1577
- @HairlessVillager made their first contribution in https://github.com/huggingface/smolagents/pull/1628
- @benoriol made their first contribution in https://github.com/huggingface/smolagents/pull/1632
- @yusuf-eren made their first contribution in https://github.com/huggingface/smolagents/pull/1636
- @nnfrog made their first contribution in https://github.com/huggingface/smolagents/pull/1551
- @nsbg made their first contribution in https://github.com/huggingface/smolagents/pull/1603
- @karenwky made their first contribution in https://github.com/huggingface/smolagents/pull/1320
- @MicrosoftJames made their first contribution in https://github.com/huggingface/smolagents/pull/1642
- @adaminsky made their first contribution in https://github.com/huggingface/smolagents/pull/1645
Full Changelog: https://github.com/huggingface/smolagents/compare/v1.20.0...v1.21.0