Python: Added Azure OpenAI Responses File Search sample + Integration test update (#2645)

* added azure responses file search sample + int test update

* sample update to use token credential
This commit is contained in:
Giles Odigwe
2025-12-05 11:01:48 -08:00
committed by GitHub
Unverified
parent f43261094f
commit f5f909f2e2
3 changed files with 74 additions and 4 deletions
@@ -578,7 +578,6 @@ async def test_azure_responses_client_agent_hosted_mcp_tool() -> None:
@pytest.mark.flaky
@skip_if_azure_integration_tests_disabled
@pytest.mark.skip(reason="File search requires API key auth, subscription only allows token auth")
async def test_azure_responses_client_file_search() -> None:
"""Test Azure responses client with file search tool."""
azure_responses_client = AzureOpenAIResponsesClient(credential=AzureCliCredential())
@@ -586,7 +585,7 @@ async def test_azure_responses_client_file_search() -> None:
assert isinstance(azure_responses_client, ChatClientProtocol)
file_id, vector_store = await create_vector_store(azure_responses_client)
# Test that the client will use the web search tool
# Test that the client will use the file search tool
response = await azure_responses_client.get_response(
messages=[
ChatMessage(
@@ -605,7 +604,6 @@ async def test_azure_responses_client_file_search() -> None:
@pytest.mark.flaky
@skip_if_azure_integration_tests_disabled
@pytest.mark.skip(reason="File search requires API key auth, subscription only allows token auth")
async def test_azure_responses_client_file_search_streaming() -> None:
"""Test Azure responses client with file search tool and streaming."""
azure_responses_client = AzureOpenAIResponsesClient(credential=AzureCliCredential())
@@ -613,7 +611,7 @@ async def test_azure_responses_client_file_search_streaming() -> None:
assert isinstance(azure_responses_client, ChatClientProtocol)
file_id, vector_store = await create_vector_store(azure_responses_client)
# Test that the client will use the web search tool
# Test that the client will use the file search tool
response = azure_responses_client.get_streaming_response(
messages=[
ChatMessage(