Fix tool calling model in unit2/tool_calling_agents
#135
by ananyaem - opened
No description provided.
Summary
Fixes ToolCallingAgent failing in tool_calling_agents.ipynb with a 400 Bad Request from the Hugging Face Inference API.
smolagents 1.25.0 changed the default InferenceClientModel to Qwen/Qwen3-Next-80B-A3B-Thinking. That model does not support tool calling on the router endpoint, so the first agent step fails when tools are sent. The notebook now explicitly uses Qwen/Qwen2.5-Coder-32B-Instruct, which matches the other Unit 2 smolagents notebooks and works with ToolCallingAgent.
Changes
unit2/smolagents/tool_calling_agents.ipynb: passmodel_id="Qwen/Qwen2.5-Coder-32B-Instruct"toInferenceClientModelinstead of relying on the library default.
Test plan
- Run the HF login cell in
tool_calling_agents.ipynb - Run the
ToolCallingAgentexample cell; confirm it completes withoutAgentGenerationError/ 400 - Confirm the agent banner shows
InferenceClientModel - Qwen/Qwen2.5-Coder-32B-Instruct - Confirm a tool call (e.g.
web_search) appears in the trace output
ananyaem changed pull request status to open
ananyaem changed pull request title from Fix tool calling model to Fix tool calling model unit2/tool_calling_agent
ananyaem changed pull request title from Fix tool calling model unit2/tool_calling_agent to Fix tool calling model in unit2/tool_calling_agents