Fix tool calling model in unit2/tool_calling_agents

#135
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: pass model_id="Qwen/Qwen2.5-Coder-32B-Instruct" to InferenceClientModel instead of relying on the library default.

Test plan

  • Run the HF login cell in tool_calling_agents.ipynb
  • Run the ToolCallingAgent example cell; confirm it completes without AgentGenerationError / 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
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment