-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
- Package Name: azure-ai-projects
- Package Version: 2.0.0b2
- Operating System: Windows
- Python Version: 3.13.4
Describe the bug
I have been trying out the new Microsoft Foundry expereince post Microsoft Ignite and was keen in trying out the browser automation capability. the agent gets created with the browser automation tool but doesnt execute both in code first environment and the foundry portal too.
This is how i have been using azure-ai-projects==2.0.0b2 to create agent with browser automation tool:
tool = BrowserAutomationAgentTool(
browser_automation_preview=BrowserAutomationToolConnectionParameters(
project_connection_id=connection_id
)
)
agent = project_client.agents.create_version(
agent_name = "browser-automation-agent",
definition=PromptAgentDefinition(
model=model_deployment_name,
tools=[tool],
instructions="You are a helpful assistant that can automate web browser tasks using the Browser Automation Tool.",
)
)
response = openai_client.responses.create(
conversation=conversation.id,
extra_body = {
"agent": {
"name": "browser-automation-agent",
"type": "agent_reference"
}
},
input=user_query
)
print(f"Agent Response: {response.output_text}")
Unfortunately, after the agent run, I get this error:
BadRequestError: Error code: 400 - {'error': {'message': "Invalid value: 'bro...iew'. Supported values are: 'code_interpreter', 'function', 'file_search', 'web_search_preview', 'web_search_preview_2025_03_11', 'image_generation', 'mcp', and 'computer_use_preview'.", 'type': 'invalid_request_error', 'param': 'tools[0].type', 'code': 'invalid_value'}}
Attaching a screenshot of the error in foundry portal too:
Any help would be highly appreciated!