v1.14.0

huggingface/smolagentsv1.14.0Apr 18, 2025by albertvillanova

AI Summary

Introduced MCP Client for managing connections to MCP servers, added Amazon Bedrock Native API support, renamed HfApiModel to InferenceClientModel, and introduced star-pattern-based import authorization.

Key Highlights

  • New MCP Client for managing connections to MCP servers
  • Amazon Bedrock Native API support
  • Renamed HfApiModel to InferenceClientModel
  • Star-pattern-based import authorization for enhanced security
  • Various improvements to tools, executors, and documentation

Breaking Changes

  • Renamed HfApiModel to InferenceClientModel

New Features

  • MCP Client class
  • Amazon Bedrock Native API support
  • InferenceClientModel (rename of HfApiModel)
  • Star-pattern-based import authorization
  • Enhanced Docker executor configuration

Full Release Notes

## New features 🚀
* SmolAgents MCP Client by @grll in https://github.com/huggingface/smolagents/pull/1200
  * Introduce a new `MCPClient` class that allows users to manage connections to one or more MCP servers, making integration with SmolAgents more flexible and scalable.
* Amazon Bedrock Native API Support by @leandrodamascena in https://github.com/huggingface/smolagents/pull/1115
  * Add native support for Amazon Bedrock in the `models` module, enabling seamless interaction with Bedrock-hosted models.

## Important changes 💥
* Rename `HfApiModel` to `InferenceClientModel` by @julien-c in https://github.com/huggingface/smolagents/pull/1198
  * Align the naming with its broader usage beyond the Hugging Face Hub, clarifying its purpose and usage.
* Star-pattern-based import authorization by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1180
  * Enhance import security by introducing a star-pattern-based authorization mechanism, allowing fine-grained control over which modules can be imported.

## Fixes and improvements 🔧
* Unpin pillow < 11.2.0 by @albertvillanova in https://github.com/huggingface/smolagents/pull/1140
* Pass vLLM (VLLMModel) model client params as `client_kwargs` by @sergiopaniego in https://github.com/huggingface/smolagents/pull/1137
* Docs: Add Code Agents in agency table by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1144
* Replace ChatMessage.from_hf_api with from_dict with asdict by @albertvillanova in https://github.com/huggingface/smolagents/pull/1076
* Make to_messages methods compatible with qwen vl by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1148
* Fix get_json_schema for keyword in description by @albertvillanova in https://github.com/huggingface/smolagents/pull/1146
* Support images in stream_to_gradio by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1154
* Fix: adjust PlanningStep user message to avoid azure's content filter by @bpoppinga in https://github.com/huggingface/smolagents/pull/1151
* Refactor code agent system prompt by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1153
* Fix bug authors by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1163
* Fix memory step model output in ToolCallingAgent by @keetrap in https://github.com/huggingface/smolagents/pull/1156
* Parsing model outputs: allow whitespaces after the header of code blobs by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/1172
* Fix: Add default value to optional argument by @rca-umb in https://github.com/huggingface/smolagents/pull/1155
* Add more detail to code execution documentation  by @maeste in https://github.com/huggingface/smolagents/pull/983
* Make TextInspectorTool serializable by @albertvillanova in https://github.com/huggingface/smolagents/pull/1176
* Clarify tool usage in agent step tutorial by @albertvillanova in https://github.com/huggingface/smolagents/pull/1175
* Provide ability to override Agent logger by @sysradium in https://github.com/huggingface/smolagents/pull/1166
* Pin mcpadapt >= 0.0.19 to include security fix by @albertvillanova in https://github.com/huggingface/smolagents/pull/1178
* Fix tool validation with multiple assignments by @albertvillanova in https://github.com/huggingface/smolagents/pull/1177
* Fix typo in the memory.mdx by @alpsencer in https://github.com/huggingface/smolagents/pull/1187
* feat: add custom Docker image support and enhanced configuration for DockerExecutor by @kingdomad in https://github.com/huggingface/smolagents/pull/1057
* Add api_key argument in HfApiModel by @aymeric-roucher in https://github.com/huggingface/smolagents/pull/947
* Implement Tool.from_dict by @albertvillanova in https://github.com/huggingface/smolagents/pull/1006
* Implement Agent.from_dict by @albertvillanova in https://github.com/huggingface/smolagents/pull/1007
* Call recursively Agent.to_dict for managed agents by @albertvillanova in https://github.com/huggingface/smolagents/pull/1008
* Support `Literal` type annotations in `@tool` for defining enums by @stephanlensky in https://github.com/huggingface/smolagents/pull/1195
* Support class docstrings in LocalPythonExecutor by @albertvillanova in https://github.com/huggingface/smolagents/pull/1192
* Reference Inference Providers more clearly by @julien-c in https://github.com/huggingface/smolagents/pull/1197
* Support annotated assignment in LocalPythonExecutor by @albertvillanova in https://github.com/huggingface/smolagents/pull/1193
* Fix evaluate_boolop for non-boolean return type by @ZeusFSX in https://github.com/huggingface/smolagents/pull/1191
* Make MultiStepAgent and abstract class by @sysradium in https://github.com/huggingface/smolagents/pull/1204
* fix: creating tool should not affect function that is being wrapped by @njbrake in https://github.com/huggingface/smolagents/pull/1203
* Remove header comments from MDX docs for proper rendering by @albertvillanova in https://github.com/huggingface/smolagents/pull/1212
* Fix CI test by updating LiteLLM error message by @albertvillanova in https://github.com/huggingface/smolagents/pull/1214
* Fix typo in evaluate_ast() docs: static_tools -> custom_tools by @JungeAlexander in https://github.com/huggingface/smolagents/pull/1217
* Make OpenDeepResearch tools serializable by @albertvillanova in https://github.com/huggingface/smolagents/pull/1206
* Add Security Policy by @albertvillanova in https://github.com/huggingface/smolagents/pull/1208
* Improve docs for stream run by @albertvillanova in https://github.com/huggingface/smolagents/pull/1215
* Skip unsupported stop parameter for reasoning models by @albertvillanova in https://github.com/huggingface/smolagents/pull/1211


## New Contributors
* @leandrodamascena made their first contribution in https://github.com/huggingface/smolagents/pull/1115
* @bpoppinga made their first contribution in https://github.com/huggingface/smolagents/pull/1151
* @rca-umb made their first contribution in https://github.com/huggingface/smolagents/pull/1155
* @alpsencer made their first contribution in https://github.com/huggingface/smolagents/pull/1187
* @stephanlensky made their first contribution in https://github.com/huggingface/smolagents/pull/1195
* @ZeusFSX made their first contribution in https://github.com/huggingface/smolagents/pull/1191
* @JungeAlexander made their first contribution in https://github.com/huggingface/smolagents/pull/1217

**Full Changelog**: https://github.com/huggingface/smolagents/compare/v1.13.0...v1.14.0