Skip to content

Browser Automation Tool Doesn't work with azure-ai-projects==2.0.0b2 #44207

@kuljotSB

Description

@kuljotSB
  • 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:

Image

Any help would be highly appreciated!

Metadata

Metadata

Assignees

Labels

AI ProjectsService AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions