Skip to content

Updated sample for Browser Automation Tool - #48975

Open
Mitesh Shah (mitsha-microsoft) wants to merge 1 commit into
feature/azure-ai-projects/vnextfrom
users/mitsha/BATGASamples
Open

Updated sample for Browser Automation Tool#48975
Mitesh Shah (mitsha-microsoft) wants to merge 1 commit into
feature/azure-ai-projects/vnextfrom
users/mitsha/BATGASamples

Conversation

@mitsha-microsoft

@mitsha-microsoft Mitesh Shah (mitsha-microsoft) commented Sep 11, 2026

Copy link
Copy Markdown
Member

Description

Updated the sample for BrowserAutomationTool for GA

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@glharper Glenn Harper (glharper) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip install version in sample should be 2.7.0, otherwise LGTM

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor
[Pilot] PR Pipeline Failure Analysis

What failed

The python - pullrequest check (Build Analyze) failed on build 6825444 for package azure-ai-projects. Both mypy and pyright static-type checks failed on the sample file changed in this PR:
sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_browser_automation.py

Relevant pipeline output
mypy:
samples/agents/tools/sample_agent_browser_automation.py:48: error: No overload variant of "BrowserAutomationTool" matches argument type "BrowserAutomationToolParameters"  [call-overload]
samples/agents/tools/sample_agent_browser_automation.py:48: note: Possible overload variants:
samples/agents/tools/sample_agent_browser_automation.py:48: note:     def __init__(self, *, browser_automation: BrowserAutomationToolParameters) -> BrowserAutomationTool
samples/agents/tools/sample_agent_browser_automation.py:48: note:     def __init__(self, mapping: Mapping[str, Any]) -> BrowserAutomationTool
Found 1 error in 1 file (checked 215 source files)

pyright:
samples/agents/tools/sample_agent_browser_automation.py:48:8 - error: No overloads for "__init__" match the provided arguments
    Argument types: (BrowserAutomationToolParameters) (reportCallIssue)
1 error, 0 warnings, 0 informations

Also unrelated to this PR: pylint failed separately with a pre-existing line-too-long warning in azure/ai/projects/models/_enums.py:2371 (generated code, exit code 16); it does not affect the fixability of the mypy/pyright errors above.

Root cause

The PR renames BrowserAutomationPreviewToolBrowserAutomationTool in the sample, but the constructor call at line 48 still passes the old keyword argument name browser_automation_preview=. The new BrowserAutomationTool.__init__ only accepts the keyword browser_automation= (per the overload signature reported by mypy/pyright), so the call no longer matches any overload.

Affected code: sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_browser_automation.py:48

tool = BrowserAutomationTool(
    browser_automation_preview=BrowserAutomationToolParameters(
        ...
    )
)

Recommended next steps

  • Rename the keyword argument at line 48 from browser_automation_preview= to browser_automation= to match the new BrowserAutomationTool constructor signature.
  • Re-run mypy/pyright locally (azpysdk mypy . / azpysdk pyright . from sdk/ai/azure-ai-projects) to confirm the fix.
  • See https://aka.ms/ci-fix

Automated fix: Fix found, view and apply fix

Generated by Pipeline Analysis Next Steps · auto · 112.5 AIC · ⌖ 2.21 AIC · ⊞ 9.2K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants