eigent icon indicating copy to clipboard operation
eigent copied to clipboard

:bug: fix the hybrid browser toolkit issue

Open 4pmtong opened this issue 10 months ago • 2 comments

Description

1. Fix Azure OpenAI Model Initialization

Fixed two issues when using Azure OpenAI models:

  • Missing api_version: Now properly passed to ModelFactory.create() as initialization parameter
  • Incorrect azure_deployment_name usage: Fixed parameter being incorrectly passed to API calls instead of model initialization

Solution: Updated agent_model() to separate Azure initialization parameters (api_version, azure_deployment_name) from API call parameters. Azure params are now passed as direct kwargs to ModelFactory.create().

2. Update HybridBrowserToolkit Connection Mode

Changed HybridBrowserToolkit initialization in search_agent() to use connect_over_cdp=False instead of CDP connection mode.

Related Files:

  • backend/app/utils/agent.py:
    • Updated agent_model() to handle Azure OpenAI parameters correctly
    • Modified search_agent() to set connect_over_cdp=False for HybridBrowserToolkit

What is the purpose of this pull request?

  • [x] Bug fix
  • [ ] New Feature
  • [ ] Documentation update
  • [ ] Other

4pmtong avatar Jan 16 '26 08:01 4pmtong

Hi,can you successfully run browsertoolkit after modification?

nitpicker55555 avatar Jan 16 '26 09:01 nitpicker55555

Hi,can you successfully run browsertoolkit after modification? Yes, it's running successfully.

4pmtong avatar Jan 16 '26 11:01 4pmtong

Close since we better resubmit an updated PR for the linter changes after the other features have been merged.

nitpicker55555 avatar Jan 17 '26 17:01 nitpicker55555