Skip to content

Conversation

@4pmtong
Copy link
Collaborator

@4pmtong 4pmtong commented Jan 16, 2026

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?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@nitpicker55555
Copy link
Collaborator

Hi,can you successfully run browsertoolkit after modification?

Comment on lines 959 to 962
default_start_url="about:blank",
cdp_url=f"http://localhost:{env('browser_port', '9222')}",
# cdp_url=f"http://localhost:{env('browser_port', '9222')}",
connect_over_cdp=False,
enabled_tools=[
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks @4pmtong , just to mention though according to cdp branch and #849 connect_over_cdp is updated according to the user configuration

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

"Thanks @a7m-1st ! Good catch on the connect_over_cdp setting. then how about the Azure configuration?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can still merge it though until the cdp branch is merged : )

Regarding azure I have reviewed a similar PR, does this fix it?
#873

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good @a7m-1st! Let's merge this PR first. I'll review #873 for the Azure fix and we can coordinate the integration. Thanks for flagging these! 👍

@4pmtong
Copy link
Collaborator Author

4pmtong commented Jan 16, 2026

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

Copy link
Collaborator

@a7m-1st a7m-1st left a comment

Choose a reason for hiding this comment

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

All in all if ever other thing is just refactoring then we can have a patch for the hybrid browser till the feature branch is merged to sync with latest camel version.

@nitpicker55555
Copy link
Collaborator

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants