:bug: fix the hybrid browser toolkit issue
Description
1. Fix Azure OpenAI Model Initialization
Fixed two issues when using Azure OpenAI models:
- Missing
api_version: Now properly passed toModelFactory.create()as initialization parameter - Incorrect
azure_deployment_nameusage: 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 setconnect_over_cdp=FalseforHybridBrowserToolkit
- Updated
What is the purpose of this pull request?
- [x] Bug fix
- [ ] New Feature
- [ ] Documentation update
- [ ] Other
Hi,can you successfully run browsertoolkit after modification?
Hi,can you successfully run browsertoolkit after modification? Yes, it's running successfully.
Close since we better resubmit an updated PR for the linter changes after the other features have been merged.