In the Foundry Agent Service, tool_choice is the mechanism that deterministically controls which tool an agent invokes on a given run. You can set it to "auto" (model decides), "required" (model must call some tool, but not necessarily a specific one), "none" (no tools called), or to a specific tool type object such as {"type": "bing_grounding"} or {"type": "azure_ai_search"} to force that exact tool to be used. To guarantee that a run retrieves information only from the internet (and not from the private Azure AI Search index), you must explicitly force the Bing/web search grounding tool by setting tool_choice to the tool-type object referencing the web search tool, rather than leaving the decision to the model ("auto") or only requiring some unspecified tool call ("required"). Forcing {"type": "azure_ai_search"} would instead guarantee use of the private documentation index, which is not the goal here.
Community Discussion