Skip to content

Python: [Bug]: HostedWebSearchTool failed with AzureOpenAIChatClient #3629

@TaoChenOSU

Description

@TaoChenOSU

Description

Bug: HostedWebSearchTool failed with AzureOpenAIChatClient
Error message:

agent_framework.exceptions.ServiceResponseException: <class 'agent_framework.azure._chat_client.AzureOpenAIChatClient'> service failed to complete the prompt: Error code: 400 - {'error': {'message': "Unknown parameter: 'web_search_options'.", 'type': 'invalid_request_error', 'param': 'web_search_options', 'code': 'unknown_parameter'}}

Repro: Run this sample with an AzureOpenAIChatClient: https://github.com/microsoft/agent-framework/blob/main/python/samples/getting_started/agents/openai/openai_chat_client_with_web_search.py

Package Versions

agent-framework-core

Python Version

No response

Additional Context

Model: gpt-5-mini

If I removed the web_search_options, it fixed the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpythonsamplesIssue relates to the samples

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions